/**
 * Umrah Leads — Unified Stylesheet
 * 
 * Centralized styles for:
 * 1. Design Tokens & Base Reset
 * 2. Shared Card Input Fields (.u-card-field)
 * 3. 320px High-Converting Popup Modal (.u-lead-modal-overlay & .u-lead-modal-card)
 * 4. WhatsApp Bridge Banner & Status Indicators
 * 5. Package Search Filter Bar (.u-lead-search-wrap)
 * 6. Inline Post CTA (.u-lead-inline-card) & Floating Trigger (.u-lead-float-btn)
 * 
 * @package Umrah_Leads
 */

:root {
	--u-lead-primary: #064E3B;
	--u-lead-primary-dark: #04392B;
	--u-lead-gold: #C59A3F;
	--u-lead-wa: #16A34A;
	--u-lead-wa-dark: #15803D;
	--u-lead-navy: #0A1F44;
	--u-lead-slate: #64748B;
	--u-lead-slate-dark: #334155;
	--u-lead-border: #CBD5E1;
	--u-lead-border-light: #E2E8F0;
	--u-lead-bg-soft: #F8FAFC;
	--u-lead-radius: 10px;
	--u-lead-modal-radius: 14px;
}

/* ==========================================================================
   1. Base Box-Sizing & Helpers
   ========================================================================== */
.u-lead-search-wrap,
.u-lead-search-wrap *,
.u-lead-block-wrap,
.u-lead-block-wrap *,
.u-lead-modal-overlay,
.u-lead-modal-overlay * {
	box-sizing: border-box;
}

/* Honeypot hidden off-screen */
.u-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

/* Loading Spinner */
.u-btn-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	border-top-color: #FFFFFF;
	animation: uLeadSpin 0.65s linear infinite;
	margin-left: 0.35rem;
}

@keyframes uLeadSpin {
	to { transform: rotate(360deg); }
}

/* Pulse Animation for Live Agent Dot */
@keyframes uLeadPulse {
	0%, 100% { box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2); }
	50% { box-shadow: 0 0 0 5px rgba(22, 163, 74, 0); }
}

/* ==========================================================================
   2. Shared Card-Style Input & Select Fields (.u-card-field)
   ========================================================================== */
.u-card-field {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background: #FFFFFF;
	border: 1px solid var(--u-lead-border);
	border-radius: var(--u-lead-radius);
	padding: 8px 13px;
	min-height: 56px;
	width: 100%;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
	cursor: pointer;
}

.u-card-field:has(.u-card-field__arrow),
.u-card-field--select {
	padding-right: 36px;
}

.u-card-field:hover {
	border-color: #94A3B8;
}

.u-card-field:focus-within {
	border-color: var(--u-lead-primary);
	box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.15);
}

.u-card-field.has-error {
	border-color: #EF4444 !important;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.u-card-field__label {
	display: block;
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 500;
	color: var(--u-lead-slate);
	line-height: 1.2;
	margin: 0 0 2px 0;
	padding: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
	user-select: none;
}

.u-card-field__input,
.u-card-field__select {
	display: block;
	width: 100%;
	height: auto;
	padding: 0;
	margin: 0;
	font-family: inherit;
	font-size: 15.5px; /* >= 16px effective prevents iOS Safari auto-zoom */
	font-weight: 600;
	color: var(--u-lead-navy);
	line-height: 1.3;
	background: transparent;
	border: none;
	outline: none;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	cursor: inherit;
}

.u-card-field__select {
	cursor: pointer;
}

.u-card-field__input::placeholder {
	color: var(--u-lead-navy);
	font-weight: 600;
	opacity: 1;
	transition: opacity 0.15s ease, color 0.15s ease;
}

.u-card-field__input:focus::placeholder {
	color: transparent !important;
	opacity: 0 !important;
}

.u-card-field__arrow {
	position: absolute;
	right: 13px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--u-lead-navy);
	width: 16px;
	height: 16px;
}

.u-card-field__arrow svg {
	display: block;
	width: 14px;
	height: 14px;
	stroke: currentColor;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	fill: none;
}

/* ==========================================================================
   3. 320px High-Converting Popup Modal (Shared across both blocks)
   ========================================================================== */
.u-lead-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.22s ease, visibility 0.22s ease;
}

.u-lead-modal-overlay.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Exactly 320px width - beautiful, focused, app-like on mobile & desktop */
.u-lead-modal-card {
	position: relative;
	width: 320px;
	max-width: calc(100vw - 24px);
	max-height: calc(100vh - 28px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #FFFFFF;
	border-radius: var(--u-lead-modal-radius);
	box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(0, 0, 0, 0.05);
	padding: 1.15rem 1rem 1rem;
	transform: translateY(14px) scale(0.97);
	transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.u-lead-modal-overlay.is-active .u-lead-modal-card {
	transform: translateY(0) scale(1);
}

/* 3px Top Brand Gradient Bar */
.u-lead-modal-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: linear-gradient(90deg, var(--u-lead-primary) 0%, #047857 50%, var(--u-lead-gold) 100%);
	border-radius: var(--u-lead-modal-radius) var(--u-lead-modal-radius) 0 0;
}

/* Close Button (X) */
.u-lead-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #F1F5F9;
	border: none;
	border-radius: 50%;
	color: var(--u-lead-slate);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
	z-index: 5;
}

.u-lead-modal-close:hover {
	background: var(--u-lead-border-light);
	color: #0F172A;
}

.u-lead-modal-header {
	margin-bottom: 0.85rem;
	padding-right: 28px;
}

.u-lead-modal-title {
	margin: 0;
	font-family: inherit;
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--u-lead-primary);
}

.u-lead-modal-subtitle {
	margin: 0.2rem 0 0;
	font-size: 0.8rem;
	color: var(--u-lead-slate);
	line-height: 1.35;
}

/* Criteria Pill for Search selection */
.u-lead-criteria-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0.65rem;
	background: #F0FDF4;
	border: 1px solid #BBF7D0;
	border-radius: 7px;
	font-size: 0.78rem;
	font-weight: 600;
	color: #166534;
	margin-bottom: 0.75rem;
	line-height: 1.2;
}

/* Modal Form Stack */
.u-lead-modal-form {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

/* Modal Compact Card Fields */
.u-lead-modal-card .u-card-field {
	min-height: 52px;
	padding: 6px 11px;
	border-radius: 9px;
}

.u-lead-modal-card .u-card-field:has(.u-card-field__arrow),
.u-lead-modal-card .u-card-field--select {
	padding-right: 32px;
}

.u-lead-modal-card .u-card-field__label {
	font-size: 11px;
}

.u-lead-modal-card .u-card-field__input,
.u-lead-modal-card .u-card-field__select {
	font-size: 14.5px;
}

.u-lead-modal-card .u-card-field__arrow {
	right: 11px;
}

/* Modal Submit Button */
.u-lead-modal-submit-btn {
	width: 100%;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	background: var(--u-lead-primary);
	color: #FFFFFF !important;
	font-size: 0.95rem;
	font-weight: 700;
	border: none;
	border-radius: 9px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(6, 78, 59, 0.25);
	transition: background-color 0.15s ease, transform 0.15s ease;
	margin-top: 0.25rem;
}

.u-lead-modal-submit-btn:hover {
	background: var(--u-lead-primary-dark);
	transform: translateY(-1px);
}

.u-lead-modal-submit-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

/* Error message box */
.u-lead-modal-error {
	padding: 0.45rem 0.65rem;
	background: #FEF2F2;
	border: 1px solid #FCA5A5;
	border-radius: 6px;
	color: #B91C1C;
	font-size: 0.75rem;
	line-height: 1.35;
	margin-top: 0.35rem;
}

/* Modal Done / Thank-You View */
.u-lead-modal-done {
	padding: 0.85rem 0.75rem;
	background: #ECFDF5;
	border: 1px solid #BBF7D0;
	border-radius: 8px;
	text-align: center;
	margin-bottom: 0.5rem;
}

.u-lead-modal-done-badge {
	display: flex;
	justify-content: center;
	margin-bottom: 0.35rem;
}

.u-lead-modal-done-title {
	margin: 0 0 0.25rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: #065F46;
}

.u-lead-modal-done-text {
	margin: 0;
	font-size: 0.78rem;
	color: #047857;
	line-height: 1.4;
}

/* Done Action Buttons in Modal (Stacked cleanly for 320px) */
.u-lead-done-actions {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	margin-top: 0.65rem;
}

.u-lead-done-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	height: 40px;
	padding: 0 1rem;
	font-size: 0.84rem;
	font-weight: 600;
	border-radius: 8px;
	text-decoration: none !important;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.u-lead-done-btn--wa {
	background: var(--u-lead-wa);
	color: #FFFFFF !important;
}

.u-lead-done-btn--wa:hover {
	background: var(--u-lead-wa-dark);
	transform: translateY(-1px);
}

.u-lead-done-btn--call {
	background: var(--u-lead-slate-dark);
	color: #FFFFFF !important;
}

.u-lead-done-btn--call:hover {
	background: #1E293B;
	transform: translateY(-1px);
}

/* ==========================================================================
   4. WhatsApp Bridge Banner & Live Agent Indicator
   ========================================================================== */
.u-lead-modal-sep {
	display: flex;
	align-items: center;
	text-align: center;
	margin: 0.75rem 0 0.6rem;
	color: #94A3B8;
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.u-lead-modal-sep::before,
.u-lead-modal-sep::after {
	content: "";
	flex: 1;
	border-bottom: 1px solid var(--u-lead-border-light);
}

.u-lead-modal-sep span {
	padding: 0 0.45rem;
}

.u-lead-wa-banner {
	background: var(--u-lead-bg-soft);
	border: 1px solid var(--u-lead-border-light);
	border-radius: 8px;
	padding: 0.65rem 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	width: 100%;
}

.u-lead-wa-meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.u-live-indicator {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.65rem;
	font-weight: 700;
	color: var(--u-lead-wa);
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.u-live-dot {
	width: 6px;
	height: 6px;
	background-color: var(--u-lead-wa);
	border-radius: 50%;
	display: inline-block;
	box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
	animation: uLeadPulse 2s infinite;
}

.u-lead-wa-meta strong {
	font-size: 0.78rem;
	font-weight: 700;
	color: #0F172A;
}

.u-lead-wa-meta small {
	font-size: 0.7rem;
	color: var(--u-lead-slate);
}

.u-lead-wa-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	height: 38px;
	background: var(--u-lead-wa);
	color: #FFFFFF !important;
	font-size: 0.8125rem;
	font-weight: 600;
	border-radius: 7px;
	text-decoration: none !important;
	box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.u-lead-wa-btn:hover {
	background: var(--u-lead-wa-dark);
	transform: translateY(-1px);
}

/* On full-width pages (under package-search bar) */
.u-lead-search-wrap .u-lead-wa-banner {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	padding: 0.9rem 1.25rem;
	border-radius: 10px;
	background: #F0FDF4;
	border-color: #BBF7D0;
}

.u-lead-search-wrap .u-lead-wa-meta strong {
	font-size: 0.95rem;
}

.u-lead-search-wrap .u-lead-wa-meta small {
	font-size: 0.8rem;
}

.u-lead-search-wrap .u-lead-wa-btn {
	height: 42px;
	padding: 0 1.25rem;
	flex-shrink: 0;
	font-size: 0.875rem;
}

@media (max-width: 640px) {
	.u-lead-search-wrap .u-lead-wa-banner {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}
	.u-lead-search-wrap .u-lead-wa-meta {
		align-items: center;
	}
	.u-lead-search-wrap .u-lead-wa-btn {
		width: 100%;
	}
}

/* ==========================================================================
   5. Package Search Bar (.u-lead-search-wrap)
   ========================================================================== */
.u-lead-search-wrap {
	position: relative;
	padding: clamp(1.15rem, 3vw, 1.75rem);
	background: #FFFFFF;
	border: 1px solid var(--u-lead-border-light);
	border-radius: var(--u-lead-modal-radius);
	box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
	margin-block: clamp(2rem, 5vw, 3rem) 0;
	overflow: hidden;
}

.u-lead-search-wrap::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: linear-gradient(90deg, var(--u-lead-primary) 0%, #047857 50%, var(--u-lead-gold) 100%);
}

.u-lead-search__header {
	margin-bottom: 0.85rem;
}

.u-lead-search__title {
	margin: 0;
	font-family: inherit;
	font-size: clamp(1.2rem, 4vw, 1.45rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #0F172A;
	line-height: 1.25;
}

.u-lead-search__intro {
	font-size: clamp(0.84rem, 2.5vw, 0.92rem);
	color: var(--u-lead-slate);
	margin-top: 0.25rem;
	margin-bottom: 1rem;
	line-height: 1.5;
}

.u-lead-search__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
	gap: 0.75rem;
	align-items: stretch;
}

.u-lead-search__btn {
	width: auto;
	min-width: 140px;
	height: 100%;
	min-height: 56px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 1.5rem;
	font-size: 1rem;
	font-weight: 700;
	border-radius: var(--u-lead-radius);
	border: none;
	color: #FFFFFF;
	background-color: var(--u-lead-primary);
	box-shadow: 0 2px 8px rgba(6, 78, 59, 0.2);
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.u-lead-search__btn:hover {
	background-color: var(--u-lead-primary-dark);
	transform: translateY(-1px);
}

@media (max-width: 980px) {
	.u-lead-search__grid {
		grid-template-columns: 1fr 1fr;
	}
	.u-lead-search__grid .u-lead-field--submit {
		grid-column: 1 / -1;
	}
	.u-lead-search__btn {
		width: 100%;
	}
}

@media (max-width: 540px) {
	.u-lead-search__grid {
		grid-template-columns: 1fr;
	}
	.u-lead-search-wrap {
		padding: 1.15rem 1rem;
	}
}

/* ==========================================================================
   6. Inline CTA Card & Persistent Floating Trigger
   ========================================================================== */
.u-lead-inline-card {
	position: relative;
	background: #FFFFFF;
	border: 1px solid var(--u-lead-border-light);
	border-radius: 12px;
	padding: 1.15rem 1.4rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
	margin-block: clamp(2rem, 5vw, 3rem) 1rem;
	overflow: hidden;
}

.u-lead-inline-card::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: linear-gradient(180deg, var(--u-lead-primary) 0%, #047857 50%, var(--u-lead-gold) 100%);
}

.u-lead-inline-card__info {
	flex: 1 1 auto;
}

.u-lead-inline-card__title {
	margin: 0;
	font-size: clamp(1.1rem, 3.5vw, 1.3rem);
	font-weight: 700;
	color: var(--u-lead-primary);
	line-height: 1.25;
}

.u-lead-inline-card__btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	height: 44px;
	padding: 0 1.35rem;
	background: var(--u-lead-primary);
	color: #FFFFFF !important;
	font-size: 0.9375rem;
	font-weight: 600;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(6, 78, 59, 0.25);
	transition: background-color 0.15s ease, transform 0.15s ease;
	white-space: nowrap;
}

.u-lead-inline-card__btn:hover {
	background: var(--u-lead-primary-dark);
	transform: translateY(-1px);
}

@media (max-width: 640px) {
	.u-lead-inline-card {
		flex-direction: column;
		align-items: stretch;
		padding: 1rem 1.15rem;
		gap: 0.85rem;
	}
	.u-lead-inline-card__btn {
		width: 100%;
	}
}

/* ==========================================================================
   Main Right-Bottom Floating Action Badge (Static Pulsing Glow + Shimmer)
   ========================================================================== */
.u-lead-float-btn {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	z-index: 99998;
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.75rem 1.35rem 0.75rem 1.15rem;
	border-radius: 9999px;
	background: linear-gradient(135deg, #064E3B 0%, #047857 55%, #065F46 100%);
	border: 1.5px solid rgba(197, 154, 63, 0.7);
	color: #FFFFFF;
	cursor: pointer;
	overflow: hidden;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	animation: uLeadBadgePulse 2.4s ease-out infinite;
	transition: box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

@keyframes uLeadBadgePulse {
	0% {
		box-shadow: 0 0 0 0 rgba(6, 78, 59, 0.75), 0 4px 16px rgba(6, 78, 59, 0.35);
	}
	70% {
		box-shadow: 0 0 0 14px rgba(6, 78, 59, 0), 0 4px 16px rgba(6, 78, 59, 0.35);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(6, 78, 59, 0), 0 4px 16px rgba(6, 78, 59, 0.35);
	}
}

/* Shimmer Light Beam Effect */
.u-lead-float-btn::after {
	content: "";
	position: absolute;
	top: -50%;
	left: -100%;
	width: 45%;
	height: 200%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
	transform: rotate(28deg);
	animation: uLeadShimmer 3.8s ease-in-out infinite;
	pointer-events: none;
}

@keyframes uLeadShimmer {
	0%, 65% { left: -100%; }
	100% { left: 180%; }
}

.u-lead-float-btn:hover {
	border-color: #F59E0B;
	box-shadow: 0 6px 20px rgba(6, 78, 59, 0.5), 0 0 0 2px rgba(245, 158, 11, 0.6);
}

.u-lead-float-btn:active {
	opacity: 0.92;
}

.u-lead-float-icon {
	font-size: 1.35rem;
	line-height: 1;
	flex-shrink: 0;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.u-lead-float-label {
	font-size: 0.95rem;
	font-weight: 700;
	color: #FFFFFF;
	letter-spacing: -0.01em;
	white-space: nowrap;
}

@media (max-width: 640px) {
	.u-lead-float-btn {
		bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
		right: 1rem;
		padding: 0.55rem 1.05rem 0.55rem 0.85rem;
		gap: 0.55rem;
	}
	.u-lead-float-icon {
		font-size: 1.2rem;
	}
	.u-lead-float-label {
		font-size: 0.88rem;
	}
}
