/**
 * Contact Us Page Stylesheet
 *
 * Adheres strictly to Cab Service Sri Lanka brand design system:
 * Deep Navy (#143250), Forest Green (#126B45), Warm Gold (#F2BC25), Warm Surface (#FBF8F2 / #F8FAFC).
 * Contrast: Gold buttons strictly use Deep Navy text (#143250).
 * Accessible validation using :user-invalid and :user-valid.
 *
 * @package Cab_Service_Sri_Lanka
 */

/* ==========================================================================
   0. Full-Bleed Hero Alignment (Eliminate Top Gap Behind Floating Header)
   ========================================================================== */

body.csl-page-contact .csl-main,
body:has(.csl-contact-page) .csl-main,
body.page-id-113 .csl-main {
	padding-top: 0 !important;
}

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */

.csl-contact-page {
	background-color: #f8fafc;
	min-height: 100vh;
}

.csl-contact-hero {
	background: linear-gradient(175deg, #0c2238 0%, #143250 85%, #183e63 100%);
	color: #ffffff;
	padding-top: calc(var(--csl-header-height, 68px) + clamp(2.5rem, 5vw, 4rem));
	padding-bottom: clamp(3rem, 5vw, 4.5rem);
	position: relative;
	overflow: hidden;
}

body.admin-bar .csl-contact-hero {
	padding-top: calc(var(--csl-header-height, 68px) + 32px + clamp(2.5rem, 5vw, 4rem));
}

@media (max-width: 782px) {
	.csl-contact-hero {
		padding-top: calc(var(--csl-header-height, 68px) + clamp(1.75rem, 4vw, 2.5rem));
	}

	body.admin-bar .csl-contact-hero {
		padding-top: calc(var(--csl-header-height, 68px) + 46px + clamp(1.75rem, 4vw, 2.5rem));
	}
}

.csl-contact-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 85% 20%, rgba(242, 188, 37, 0.12) 0%, transparent 50%),
	            radial-gradient(circle at 15% 90%, rgba(18, 107, 69, 0.2) 0%, transparent 60%);
	pointer-events: none;
}

.csl-contact-hero__inner {
	position: relative;
	z-index: 2;
	max-width: 820px;
	margin: 0 auto;
	text-align: center;
}

.csl-contact-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(242, 188, 37, 0.15);
	border: 1px solid rgba(242, 188, 37, 0.35);
	color: #f2bc25;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 18px;
}

.csl-contact-hero__title {
	color: #ffffff;
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
	margin: 0 0 16px;
}

.csl-contact-hero__subtitle {
	color: #dbe7f3;
	font-size: clamp(1rem, 1.8vw, 1.125rem);
	line-height: 1.6;
	margin: 0 auto 28px;
	max-width: 720px;
}

.csl-contact-hero__pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

.csl-contact-hero__pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #f1f5f9;
	font-size: 0.8125rem;
	font-weight: 600;
	padding: 7px 14px;
	border-radius: 999px;
	backdrop-filter: blur(8px);
}

.csl-contact-hero__pill svg {
	color: #f2bc25;
	flex-shrink: 0;
}

/* ==========================================================================
   2. MAIN CONTENT GRID (FORM & CHANNELS)
   ========================================================================== */

.csl-contact-main {
	padding: 56px 0 80px;
}

.csl-contact-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	align-items: start;
}

@media (min-width: 992px) {
	.csl-contact-grid {
		grid-template-columns: 1.15fr 0.85fr;
		gap: 36px;
	}
}

/* Common Card Base */
.csl-contact-card {
	background: #ffffff;
	border-radius: 20px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 10px 30px -6px rgba(20, 50, 80, 0.06), 0 4px 12px -2px rgba(20, 50, 80, 0.03);
	padding: 32px 28px;
	position: relative;
}

@media (min-width: 768px) {
	.csl-contact-card {
		padding: 40px 36px;
	}
}

/* ==========================================================================
   3. EMAIL FORM STYLES
   ========================================================================== */

.csl-contact-card__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #126b45;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.csl-contact-card__title {
	color: #143250;
	font-size: 1.625rem;
	font-weight: 800;
	margin: 0 0 10px;
	letter-spacing: -0.01em;
}

.csl-contact-card__desc {
	color: #52637a;
	font-size: 0.9375rem;
	line-height: 1.55;
	margin: 0 0 28px;
}

.csl-contact-form__row--2col {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
}

@media (min-width: 640px) {
	.csl-contact-form__row--2col {
		grid-template-columns: 1fr 1fr;
	}
}

.csl-form-field {
	margin-bottom: 20px;
	position: relative;
}

.csl-form-label {
	display: block;
	color: #143250;
	font-size: 0.875rem;
	font-weight: 700;
	margin-bottom: 6px;
}

.csl-form-req {
	color: #dc2626;
	margin-left: 2px;
}

.csl-form-hint {
	display: block;
	color: #64748b;
	font-size: 0.75rem;
	margin-top: 5px;
	line-height: 1.4;
}

.csl-form-field__footer {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}

.csl-form-char-count {
	font-size: 0.75rem;
	color: #94a3b8;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.csl-form-input,
.csl-form-textarea,
.csl-form-select {
	width: 100%;
	padding: 12px 16px;
	font-size: 0.9375rem;
	color: #143250;
	background-color: #ffffff;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
	font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	box-sizing: border-box;
}

/* Phone Group with Country Code Dropdown and Leading Phone Icon */
.csl-contact-phone-group {
	display: flex;
	align-items: stretch;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
	background: #ffffff;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.csl-contact-phone-group:focus-within {
	border-color: #126b45;
	box-shadow: 0 0 0 3px rgba(18, 107, 69, 0.15);
}

.csl-contact-phone-group .csl-md-phone-code {
	flex: 0 0 auto;
	background: #f8fafc;
	border-right: 1px solid #cbd5e1;
	display: flex;
	align-items: center;
	padding: 0;
}

.csl-contact-phone-group .csl-md-phone-code select,
.csl-md-phone-group.csl-contact-phone-group .csl-md-phone-code select {
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: #143250 !important;
	font-weight: 700 !important;
	font-size: 0.875rem !important;
	padding: 10px 22px 10px 10px !important;
	cursor: pointer;
	outline: none !important;
	box-shadow: none !important;
	width: auto !important;
	max-width: 96px !important;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 480px) {
	.csl-contact-phone-group .csl-md-phone-code select,
	.csl-md-phone-group.csl-contact-phone-group .csl-md-phone-code select {
		max-width: 90px !important;
		padding-right: 20px !important;
	}
}

.csl-contact-phone-input {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1;
	min-width: 0;
}

.csl-contact-phone-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #64748b;
	pointer-events: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: color 0.2s ease;
}

.csl-contact-phone-group:focus-within .csl-contact-phone-icon {
	color: #126b45;
}

.csl-contact-phone-group.csl-md-phone-group .csl-contact-phone-input input[type="tel"].csl-contact-phone-input-field,
.csl-contact-phone-group.csl-md-phone-group .csl-contact-phone-input input[type="tel"],
.csl-contact-phone-group.csl-md-phone-group input[type="tel"].csl-contact-phone-input-field,
.csl-contact-phone-group.csl-md-phone-group input[type="tel"],
.csl-contact-phone-group input[type="tel"],
.csl-contact-phone-input-field {
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	flex: 1 1 auto !important;
	width: 100% !important;
	min-height: 48px !important;
	padding: 12px 12px 12px 38px !important;
	font-size: 0.9375rem !important;
	line-height: 1.5 !important;
	color: #143250 !important;
}

.csl-contact-phone-group.csl-md-phone-group .csl-contact-phone-input input[type="tel"]:focus,
.csl-contact-phone-group input[type="tel"]:focus,
.csl-contact-phone-input-field:focus {
	outline: none !important;
	box-shadow: none !important;
}

.csl-contact-phone-group input[type="tel"]::placeholder {
	color: #94a3b8 !important;
	opacity: 1 !important;
}

.csl-contact-phone-group:has(.csl-contact-phone-input-field:user-invalid) {
	border-color: #dc2626;
	background-color: #fffaf9;
}

.csl-form-textarea {
	resize: vertical;
	min-height: 120px;
	line-height: 1.5;
}

.csl-form-select-wrap {
	position: relative;
}

.csl-form-select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 40px;
	cursor: pointer;
}

.csl-form-select-chevron {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: #64748b;
}

.csl-form-input:focus,
.csl-form-textarea:focus,
.csl-form-select:focus {
	outline: none;
	border-color: #126b45;
	box-shadow: 0 0 0 3px rgba(18, 107, 69, 0.15);
}

/* Modern Accessible Validation (:user-invalid and :user-valid) */
.csl-form-input:user-invalid,
.csl-form-textarea:user-invalid {
	border-color: #dc2626;
	background-color: #fffaf9;
}

.csl-form-input:user-invalid:focus,
.csl-form-textarea:user-invalid:focus {
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.csl-form-input:user-valid:not(:placeholder-shown):focus,
.csl-form-textarea:user-valid:not(:placeholder-shown):focus {
	border-color: #126b45;
}

.csl-form-error {
	display: none;
	color: #dc2626;
	font-size: 0.75rem;
	font-weight: 600;
	margin-top: 5px;
}

.csl-form-error.is-visible {
	display: block;
}

/* Submit Row */
.csl-contact-form__submit-row {
	margin-top: 28px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

@media (min-width: 640px) {
	.csl-contact-form__submit-row {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.csl-contact-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: #f2bc25;
	color: #143250 !important;
	font-size: 1rem;
	font-weight: 800;
	padding: 14px 28px;
	border-radius: 12px;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(242, 188, 37, 0.35);
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.csl-contact-submit-btn:hover {
	background: #e5b01f;
	color: #143250 !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(242, 188, 37, 0.45);
}

.csl-contact-submit-btn:active {
	transform: translateY(0);
}

.csl-contact-submit-btn:disabled {
	opacity: 0.75;
	cursor: not-allowed;
	transform: none;
}

.csl-contact-submit-spinner {
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(20, 50, 80, 0.3);
	border-top-color: #143250;
	border-radius: 50%;
	animation: csl-spin 0.8s linear infinite;
}

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

.csl-contact-form__disclaimer {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #64748b;
	font-size: 0.8125rem;
	margin: 0;
}

/* ==========================================================================
   4. WHATSAPP FEATURED CARD (RIGHT COLUMN)
   ========================================================================== */

.csl-contact-card--whatsapp {
	background: linear-gradient(165deg, #f0fdf4 0%, #ffffff 60%);
	border: 2px solid #bbf7d0;
	box-shadow: 0 12px 36px -8px rgba(18, 107, 69, 0.12);
	margin-bottom: 24px;
}

.csl-contact-wa-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #dcfce7;
	color: #15803d;
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	padding: 5px 12px;
	border-radius: 999px;
	margin-bottom: 20px;
}

.csl-contact-wa-dot {
	width: 8px;
	height: 8px;
	background-color: #16a34a;
	border-radius: 50%;
	box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25);
	animation: csl-pulse 2s infinite;
}

@keyframes csl-pulse {
	0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4); }
	70% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
	100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.csl-contact-wa-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 14px;
}

.csl-contact-wa-icon {
	width: 52px;
	height: 52px;
	background: #126b45;
	color: #ffffff;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 8px 18px -4px rgba(18, 107, 69, 0.35);
}

.csl-contact-wa-icon svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

.csl-contact-wa-title {
	color: #143250;
	font-size: 1.5rem;
	font-weight: 800;
	margin: 0;
	letter-spacing: -0.01em;
}

.csl-contact-wa-phone {
	color: #126b45;
	font-size: 1rem;
	font-weight: 700;
	margin: 2px 0 0;
}

.csl-contact-wa-desc {
	color: #475569;
	font-size: 0.9375rem;
	line-height: 1.55;
	margin: 0 0 22px;
}

.csl-contact-wa-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: #126b45;
	color: #ffffff !important;
	font-size: 1rem;
	font-weight: 800;
	padding: 15px 24px;
	border-radius: 12px;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(18, 107, 69, 0.3);
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.csl-contact-wa-cta:hover {
	background: #0d5235;
	color: #ffffff !important;
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(18, 107, 69, 0.4);
}

.csl-contact-wa-cta svg:first-child {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* Quick Topic Starters */
.csl-contact-starters {
	margin-top: 24px;
	padding-top: 22px;
	border-top: 1px dashed #cbd5e1;
}

.csl-contact-starters__label {
	color: #334155;
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin: 0 0 12px;
}

.csl-contact-starters__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
}

@media (min-width: 480px) {
	.csl-contact-starters__grid {
		grid-template-columns: 1fr 1fr;
	}
}

.csl-contact-starter-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	padding: 10px 14px;
	text-decoration: none;
	color: #143250;
	font-size: 0.8125rem;
	font-weight: 700;
	transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.csl-contact-starter-btn:hover {
	border-color: #126b45;
	background: #f0fdf4;
	color: #126b45;
	transform: translateY(-1px);
	box-shadow: 0 3px 8px rgba(18, 107, 69, 0.08);
}

.csl-contact-starter-icon {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: #f0fdf4;
	color: #126b45;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.csl-contact-starter-icon svg {
	width: 18px;
	height: 18px;
}

.csl-contact-starter-btn:hover .csl-contact-starter-icon {
	background: #126b45;
	color: #ffffff;
}

.csl-contact-starter-text {
	flex-grow: 1;
}

.csl-contact-starter-arrow {
	color: #94a3b8;
	flex-shrink: 0;
	transition: transform 0.2s ease, color 0.2s ease;
}

.csl-contact-starter-btn:hover .csl-contact-starter-arrow {
	transform: translate(2px, -2px);
	color: #126b45;
}

/* ==========================================================================
   5. OTHER CHANNELS CARD
   ========================================================================== */

.csl-contact-card--info {
	background: #ffffff;
}

.csl-contact-channels-heading {
	color: #143250;
	font-size: 1.125rem;
	font-weight: 800;
	margin: 0 0 20px;
	letter-spacing: -0.01em;
}

.csl-contact-channels-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.csl-contact-channel-item {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.csl-contact-channel-icon {
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background: #f1f5f9;
	color: #143250;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.csl-contact-channel-tag {
	display: block;
	color: #64748b;
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 2px;
}

.csl-contact-channel-link {
	display: inline-block;
	color: #143250;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
	transition: color 0.2s ease;
}

.csl-contact-channel-link:hover {
	color: #126b45;
	text-decoration: underline;
}

.csl-contact-channel-text {
	display: block;
	color: #143250;
	font-size: 0.9375rem;
	font-weight: 700;
}

.csl-contact-channel-sub {
	color: #64748b;
	font-size: 0.8125rem;
	line-height: 1.45;
	margin: 3px 0 0;
}

/* ==========================================================================
   6. ALERTS & FEEDBACK STATES
   ========================================================================== */

.csl-contact-alert {
	border-radius: 14px;
	padding: 20px 24px;
	margin-bottom: 28px;
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.csl-contact-alert--success {
	background: #f0fdf4;
	border: 1.5px solid #86efac;
	color: #14532d;
}

.csl-contact-alert--error {
	background: #fef2f2;
	border: 1.5px solid #fecaca;
	color: #991b1b;
}

.csl-contact-alert__icon {
	flex-shrink: 0;
	margin-top: 2px;
}

.csl-contact-alert--success .csl-contact-alert__icon {
	color: #16a34a;
}

.csl-contact-alert--error .csl-contact-alert__icon {
	color: #dc2626;
}

.csl-contact-alert__title {
	font-size: 1.0625rem;
	font-weight: 800;
	margin: 0 0 6px;
	color: inherit;
}

.csl-contact-alert__msg {
	font-size: 0.9375rem;
	line-height: 1.5;
	margin: 0 0 8px;
	color: inherit;
}

.csl-contact-alert__ref {
	font-size: 0.875rem;
	margin: 0 0 14px;
	color: #334155;
}

.csl-contact-alert__action {
	margin-top: 12px;
}

.csl-contact-alert__action .csl-button--whatsapp {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #16a34a;
	color: #ffffff !important;
	padding: 10px 20px;
	border-radius: 999px;
	font-size: 0.875rem;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.csl-contact-alert__action .csl-button--whatsapp:hover {
	background: #15803d;
	color: #ffffff !important;
}

/* ==========================================================================
   7. FAQ ACCORDION SECTION
   ========================================================================== */

.csl-contact-faq {
	background: #ffffff;
	border-top: 1px solid #e2e8f0;
	padding: 72px 0 88px;
}

.csl-contact-faq__header {
	max-width: 680px;
	margin: 0 auto 48px;
	text-align: center;
}

.csl-contact-faq__eyebrow {
	display: inline-block;
	color: #126b45;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-bottom: 8px;
}

.csl-contact-faq__title {
	color: #143250;
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	font-weight: 800;
	margin: 0 0 12px;
	letter-spacing: -0.015em;
}

.csl-contact-faq__subtitle {
	color: #52637a;
	font-size: 1rem;
	line-height: 1.55;
	margin: 0;
}

.csl-contact-faq__list {
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.csl-contact-faq__item {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.csl-contact-faq__item[open] {
	border-color: rgba(18, 107, 69, 0.4);
	box-shadow: 0 6px 20px -4px rgba(20, 50, 80, 0.05);
	background: #ffffff;
}

.csl-contact-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	cursor: pointer;
	font-size: 1.0625rem;
	font-weight: 700;
	color: #143250;
	list-style: none;
	user-select: none;
}

.csl-contact-faq__question::-webkit-details-marker {
	display: none;
}

.csl-contact-faq__arrow {
	color: #64748b;
	flex-shrink: 0;
	transition: transform 0.25s ease, color 0.2s ease;
}

.csl-contact-faq__item[open] .csl-contact-faq__arrow {
	transform: rotate(180deg);
	color: #126b45;
}

.csl-contact-faq__answer {
	padding: 0 24px 22px;
	color: #475569;
	font-size: 0.9375rem;
	line-height: 1.65;
}

.csl-contact-faq__answer p {
	margin: 0;
}

