/**
 * Public styles for Geobuddy Contact Guard.
 *
 * @package    Geobuddy_Contact_Guard
 * @subpackage Geobuddy_Contact_Guard/assets/css
 * @author     BuddyDevelopers <support@buddydevelopers.com>
 */

/* -------------------------------------------------------------------------- */
/* Reveal button                                                              */
/* -------------------------------------------------------------------------- */

.geobuddy-contact-guard {
	display: block;
	align-items: center;
	gap: 5px;
}

.geobuddy-show-number.loading {
	opacity: 0.7;
	cursor: not-allowed;
	pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/* Modal system                                                               */
/* -------------------------------------------------------------------------- */

body.gcg-modal-open {
	overflow: hidden;
}

.gcg-modal-overlay,
.custom-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.gcg-modal,
.custom-popup-container {
	position: relative;
	width: 100%;
	max-width: 500px;
	background: #fff;
	border-radius: 16px;
	box-shadow:
		0 24px 48px rgba(15, 23, 42, 0.18),
		0 0 0 1px rgba(15, 23, 42, 0.06);
	overflow: hidden;
	transform: translateY(12px) scale(0.98);
	opacity: 0;
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.gcg-modal--visible {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.gcg-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 0;
}

.gcg-modal__header--centered {
	flex-direction: column;
	align-items: center;
	padding-top: 28px;
	text-align: center;
}

.gcg-modal__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(0, 115, 170, 0.12), rgba(0, 115, 170, 0.06));
	color: var(--gcg-btn-bg, #ff8251);
}

.gcg-modal__icon svg {
	width: 24px;
	height: 24px;
}

.gcg-modal__close,
.popup-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 10px;
	background: transparent;
	color: #64748b;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.gcg-modal__header--centered .gcg-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
}

.gcg-modal__close:hover,
.popup-close:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.gcg-modal__body {
	padding: 16px 28px 24px;
}

.gcg-modal__title,
.popup-left-section h2 {
	margin: 12px 0 8px;
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.3;
	color: #0f172a;
	letter-spacing: -0.02em;
}

.gcg-modal__subtitle {
	margin: 0 0 24px;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: #64748b;
}

/* -------------------------------------------------------------------------- */
/* Contact reveal modal                                                       */
/* -------------------------------------------------------------------------- */

.gcg-contact-modal .gcg-modal__body {
	text-align: center;
	padding-top: 0;
	padding-bottom: 28px;
}

.gcg-contact-modal .gcg-modal__title {
	text-align: center;
}

.gcg-contact-value {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 8px;
	padding: 18px 20px;
	border-radius: 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	font-size: 1.125rem;
	font-weight: 600;
	color: #0f172a;
	word-break: break-word;
}

.gcg-contact-value a {
	color: var(--gcg-btn-bg, #ff8251);
	text-decoration: none;
}

.gcg-contact-value a:hover {
	text-decoration: underline;
}

.popup-field-icon {
	font-size: 1.125rem;
	color: var(--gcg-btn-bg, #ff8251);
	flex-shrink: 0;
}

/* -------------------------------------------------------------------------- */
/* Loader                                                                     */
/* -------------------------------------------------------------------------- */

.geobuddy-loader-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

.geobuddy-loader-container {
	background: #fff;
	border-radius: 16px;
	padding: 32px 40px;
	box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
	text-align: center;
	min-width: 200px;
}

.geobuddy-loader-spinner {
	display: inline-block;
	width: 44px;
	height: 44px;
	border: 3px solid rgba(0, 115, 170, 0.15);
	border-radius: 50%;
	border-top-color: var(--gcg-btn-bg, #ff8251);
	animation: gcg-spin 0.75s linear infinite;
	margin: 0 auto 16px;
}

@keyframes gcg-spin {
	to {
		transform: rotate(360deg);
	}
}

.geobuddy-loader-text {
	margin: 0;
	font-size: 0.9375rem;
	color: #475569;
	font-weight: 500;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media screen and (max-width: 480px) {
	.gcg-modal-overlay,
	.custom-popup-overlay {
		padding: 12px;
		align-items: flex-end;
	}

	.gcg-modal,
	.custom-popup-container {
		border-radius: 16px 16px 0 0;
		max-width: 100%;
	}

	.gcg-modal__body {
		padding-left: 20px;
		padding-right: 20px;
	}

	.gcg-modal__header {
		padding-left: 20px;
		padding-right: 20px;
	}
}
