/* ==========================================================================
   Enquire Now popup (template-parts/enquiry-modal.php) — sitewide, 2026-10-31.
   Scoped to .ews-enq so nothing here touches header/footer/page styles.
   ========================================================================== */

.ews-enq {
	--enq-ink: var(--navy, #101f4d);
	--enq-muted: var(--text-muted, #4b5470);
	--enq-line: #dfe2ee;
	--enq-violet: #6c3be8;
	--enq-orange: #f26a1b;
	--enq-grad: linear-gradient(120deg, #6c3be8, #f26a1b);
	--enq-error: #d92d4b;
	--enq-radius: 14px;
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: var(--font-base);
}
.ews-enq[hidden] { display: none; }

.ews-enq__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 20, 54, 0.62);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.ews-enq__dialog {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
	width: min(940px, 100%);
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	overflow: hidden;
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 40px 90px -30px rgba(16, 31, 77, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
	opacity: 0;
	transform: translateY(24px) scale(0.97);
	transition: opacity 0.32s ease, transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.ews-enq.is-open .ews-enq__backdrop { opacity: 1; }
.ews-enq.is-open .ews-enq__dialog { opacity: 1; transform: none; }

html.ews-enq-lock,
html.ews-enq-lock body { overflow: hidden; }

/* ---- Close ---- */
.ews-enq__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f2f8;
	color: var(--enq-ink);
	cursor: pointer;
	transition: background 0.2s ease, transform 0.25s ease;
}
.ews-enq__close svg { width: 18px; height: 18px; }
.ews-enq__close:hover { background: #e6e7f2; transform: rotate(90deg); }
.ews-enq__close:focus-visible { outline: 3px solid rgba(108, 59, 232, 0.4); outline-offset: 2px; }

/* ---- Left brand panel ---- */
.ews-enq__aside {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 40px 34px 32px;
	color: #fff;
	background:
		radial-gradient(circle at 110% -10%, rgba(242, 106, 27, 0.55), transparent 45%),
		radial-gradient(circle at -20% 110%, rgba(236, 72, 153, 0.35), transparent 50%),
		linear-gradient(160deg, #241a52 0%, #3b1f8f 55%, #6c3be8 100%);
	overflow: hidden;
}
.ews-enq__aside::after {
	content: "";
	position: absolute;
	right: -70px;
	bottom: -70px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	border: 34px solid rgba(255, 255, 255, 0.06);
	pointer-events: none;
}

.ews-enq__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	padding: 7px 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.22);
}
.ews-enq__pulse {
	position: relative;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #4ade80;
}
.ews-enq__pulse::after {
	content: "";
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid #4ade80;
	animation: ews-enq-pulse 1.8s ease-out infinite;
}
@keyframes ews-enq-pulse {
	from { transform: scale(0.6); opacity: 1; }
	to { transform: scale(1.8); opacity: 0; }
}

.ews-enq .ews-enq__title {
	margin: 0;
	font-size: 28px;
	line-height: 1.2;
	font-weight: 800;
	color: #fff;
	letter-spacing: -0.01em;
}
.ews-enq__lead {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.82);
}

.ews-enq__points {
	display: grid;
	gap: 12px;
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}
.ews-enq__points li {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
}
.ews-enq__point-icon {
	display: grid;
	place-items: center;
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	background: rgba(255, 255, 255, 0.14);
	color: #ffd2b3;
}
.ews-enq__point-icon svg { width: 18px; height: 18px; }

.ews-enq__privacy {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: auto 0 0;
	padding-top: 14px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.ews-enq__privacy svg { flex: 0 0 15px; width: 15px; height: 15px; }

/* ---- Right form panel ---- */
.ews-enq__body {
	position: relative;
	padding: 38px 36px 30px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.ews-enq__form { display: grid; gap: 16px; }
.ews-enq__form[hidden] { display: none; }

.ews-enq__step {
	margin: 0 0 2px;
	padding-right: 44px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--enq-violet);
}

.ews-enq__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ews-enq__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

/* Floating-label field */
.ews-enq__field { position: relative; }

.ews-enq .ews-enq__input {
	display: block;
	width: 100%;
	height: 56px;
	margin: 0;
	padding: 22px 16px 8px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: var(--enq-ink);
	background: #fafbfe;
	border: 1.5px solid var(--enq-line);
	border-radius: var(--enq-radius);
	box-shadow: none;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.ews-enq .ews-enq__input:hover { border-color: #c9cde0; }
.ews-enq .ews-enq__input:focus {
	background: #fff;
	border-color: var(--enq-violet);
	box-shadow: 0 0 0 4px rgba(108, 59, 232, 0.14);
}

.ews-enq__field label {
	position: absolute;
	top: 18px;
	left: 17px;
	font-size: 14.5px;
	font-weight: 500;
	color: #6b7290;
	pointer-events: none;
	transform-origin: left top;
	transition: transform 0.18s ease, color 0.18s ease;
	white-space: nowrap;
}
.ews-enq__field label em { font-style: normal; color: var(--enq-orange); }

.ews-enq__input:focus + label,
.ews-enq__input:not(:placeholder-shown) + label,
.ews-enq__field--select label,
.ews-enq__field--phone label {
	transform: translateY(-10px) scale(0.78);
	font-weight: 700;
	color: var(--enq-muted);
}
.ews-enq__input:focus + label { color: var(--enq-violet); }

/* Phone: fixed +91 prefix */
.ews-enq__field--phone .ews-enq__input { padding-left: 52px; letter-spacing: 0.04em; }
.ews-enq__field--phone label { left: 53px; }
.ews-enq__prefix {
	position: absolute;
	left: 16px;
	top: 27px;
	line-height: 21px;
	font-size: 15px;
	font-weight: 700;
	color: var(--enq-ink);
	pointer-events: none;
}
.ews-enq__prefix::after {
	content: "";
	display: inline-block;
	width: 1px;
	height: 14px;
	margin-left: 9px;
	vertical-align: -2px;
	background: #c9cde0;
}

/* Select chevron */
.ews-enq__field--select .ews-enq__input {
	padding-right: 40px;
	cursor: pointer;
	text-overflow: ellipsis;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c3be8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 18px;
}
.ews-enq__field--select select:invalid { color: #9aa0b8; }
.ews-enq__field--select select option { color: var(--enq-ink); font-weight: 500; }

/* Errors */
.ews-enq__error {
	display: block;
	min-height: 0;
	margin-top: 5px;
	font-size: 12px;
	font-weight: 600;
	color: var(--enq-error);
}
.ews-enq__error:empty { display: none; }
.ews-enq .is-invalid .ews-enq__input,
.ews-enq .ews-enq__input.is-invalid {
	border-color: var(--enq-error);
	background-color: #fff7f8;
}
.ews-enq .is-invalid .ews-enq__input:focus { box-shadow: 0 0 0 4px rgba(217, 45, 75, 0.12); }
.ews-enq .is-invalid label { color: var(--enq-error); }

/* Topic chips */
.ews-enq__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}
.ews-enq__chips legend {
	width: 100%;
	margin-bottom: 8px;
	padding: 0;
	font-size: 13px;
	font-weight: 700;
	color: var(--enq-ink);
}
.ews-enq__chip { position: relative; cursor: pointer; }
.ews-enq__chip input { position: absolute; opacity: 0; pointer-events: none; }
.ews-enq__chip span {
	display: inline-flex;
	align-items: center;
	padding: 9px 15px;
	font-size: 13px;
	font-weight: 600;
	color: var(--enq-muted);
	background: #f4f5fa;
	border: 1.5px solid transparent;
	border-radius: 999px;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.ews-enq__chip:hover span { background: #ecedf6; color: var(--enq-ink); }
.ews-enq__chip input:checked + span {
	color: var(--enq-violet);
	background: rgba(108, 59, 232, 0.08);
	border-color: var(--enq-violet);
}
.ews-enq__chip input:checked + span::before {
	content: "";
	width: 14px;
	height: 14px;
	margin-right: 6px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ews-enq__chip input:focus-visible + span { outline: 3px solid rgba(108, 59, 232, 0.35); outline-offset: 2px; }

/* Consent */
.ews-enq__consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--enq-muted);
	cursor: pointer;
}
.ews-enq__consent input { position: absolute; opacity: 0; pointer-events: none; }
.ews-enq__checkbox {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	border: 1.5px solid #c3c8dc;
	border-radius: 5px;
	background: #fff;
	transition: background 0.2s ease, border-color 0.2s ease;
}
.ews-enq__consent input:checked + .ews-enq__checkbox {
	border-color: var(--enq-violet);
	background: var(--enq-violet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.ews-enq__consent input:focus-visible + .ews-enq__checkbox { outline: 3px solid rgba(108, 59, 232, 0.35); outline-offset: 2px; }

/* Submit */
.ews-enq__submit {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 56px;
	margin-top: 4px;
	padding: 0 24px;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	background: var(--enq-grad);
	background-size: 160% 100%;
	background-position: 0 0;
	border: 0;
	border-radius: 999px;
	box-shadow: 0 14px 28px -12px rgba(108, 59, 232, 0.65);
	cursor: pointer;
	overflow: hidden;
	transition: background-position 0.4s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.ews-enq__submit:hover {
	background-position: 100% 0;
	transform: translateY(-2px);
	box-shadow: 0 18px 32px -12px rgba(242, 106, 27, 0.6);
}
.ews-enq__submit:focus-visible { outline: 3px solid rgba(108, 59, 232, 0.45); outline-offset: 3px; }
.ews-enq__submit-arrow { width: 20px; height: 20px; transition: transform 0.2s ease; }
.ews-enq__submit:hover .ews-enq__submit-arrow { transform: translateX(4px); }
.ews-enq__spinner {
	display: none;
	width: 20px;
	height: 20px;
	border: 2.5px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ews-enq-spin 0.7s linear infinite;
}
.ews-enq__submit.is-loading { pointer-events: none; opacity: 0.92; }
.ews-enq__submit.is-loading .ews-enq__spinner { display: block; }
.ews-enq__submit.is-loading .ews-enq__submit-arrow { display: none; }
@keyframes ews-enq-spin { to { transform: rotate(360deg); } }

.ews-enq__status {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	color: var(--enq-error);
}
.ews-enq__status:empty { display: none; }

/* ---- Success state ---- */
.ews-enq__success {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100%;
	padding: 30px 10px;
	text-align: center;
	animation: ews-enq-fade 0.45s ease both;
}
.ews-enq__success[hidden] { display: none; }
@keyframes ews-enq-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ews-enq__success-icon {
	display: grid;
	place-items: center;
	width: 92px;
	height: 92px;
	margin-bottom: 20px;
	border-radius: 50%;
	background: rgba(23, 163, 74, 0.1);
}
.ews-enq__success-icon svg { width: 60px; height: 60px; }
.ews-enq__success-icon circle { stroke: #17a34a; stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: ews-enq-draw 0.6s ease forwards; }
.ews-enq__success-icon path { stroke: #17a34a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; animation: ews-enq-draw 0.4s 0.45s ease forwards; }
@keyframes ews-enq-draw { to { stroke-dashoffset: 0; } }

.ews-enq .ews-enq__success-title {
	margin: 0 0 8px;
	font-size: 26px;
	font-weight: 800;
	color: var(--enq-ink);
	outline: none;
}
.ews-enq__success-text {
	max-width: 340px;
	margin: 0 0 24px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--enq-muted);
}
.ews-enq__success-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ews-enq__ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 22px;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	color: var(--enq-violet);
	background: #fff;
	border: 1.5px solid rgba(108, 59, 232, 0.35);
	border-radius: 999px;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}
.ews-enq__ghost:hover { background: rgba(108, 59, 232, 0.06); border-color: var(--enq-violet); color: var(--enq-violet); }
.ews-enq__ghost--solid { color: #fff; background: var(--enq-grad); border-color: transparent; }
.ews-enq__ghost--solid:hover { color: #fff; background: var(--enq-grad); filter: brightness(1.06); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
	.ews-enq__dialog { grid-template-columns: 1fr; width: min(560px, 100%); overflow-y: auto; }
	.ews-enq__aside { gap: 10px; padding: 26px 24px 22px; }
	.ews-enq .ews-enq__title { font-size: 22px; padding-right: 40px; }
	.ews-enq__lead { font-size: 13.5px; }
	.ews-enq__points { grid-template-columns: repeat(3, auto); gap: 8px 14px; justify-content: start; }
	.ews-enq__points li { font-size: 12px; gap: 6px; }
	.ews-enq__point-icon { flex-basis: 26px; width: 26px; height: 26px; border-radius: 8px; }
	.ews-enq__point-icon svg { width: 14px; height: 14px; }
	.ews-enq__privacy { display: none; }
	.ews-enq__body { overflow: visible; padding: 24px 24px 26px; }
	.ews-enq__close { background: rgba(255, 255, 255, 0.16); color: #fff; }
	.ews-enq__close:hover { background: rgba(255, 255, 255, 0.26); }
}

/* Phone: bottom sheet */
@media (max-width: 600px) {
	.ews-enq { align-items: flex-end; padding: 0; }
	.ews-enq__dialog {
		width: 100%;
		max-height: 94vh;
		max-height: 94dvh;
		border-radius: 22px 22px 0 0;
		transform: translateY(100%);
		transition: opacity 0.2s ease, transform 0.38s cubic-bezier(0.2, 0.9, 0.3, 1);
	}
	.ews-enq__aside { padding: 22px 18px 18px; }
	.ews-enq__aside::before {
		content: "";
		position: absolute;
		top: 8px;
		left: 50%;
		width: 40px;
		height: 4px;
		margin-left: -20px;
		border-radius: 4px;
		background: rgba(255, 255, 255, 0.35);
	}
	.ews-enq__lead { display: none; }
	.ews-enq__points { grid-template-columns: 1fr; gap: 6px; }
	.ews-enq__points li:nth-child(n+2) { display: none; }
	.ews-enq__body { padding: 20px 18px calc(22px + env(safe-area-inset-bottom)); }
	.ews-enq__row { grid-template-columns: 1fr; gap: 16px; }
	.ews-enq .ews-enq__input { font-size: 16px; } /* stops iOS zoom-on-focus */
}

@media (prefers-reduced-motion: reduce) {
	.ews-enq__backdrop,
	.ews-enq__dialog,
	.ews-enq__submit,
	.ews-enq__close { transition: none; }
	.ews-enq__pulse::after,
	.ews-enq__success,
	.ews-enq__success-icon circle,
	.ews-enq__success-icon path { animation: none; stroke-dashoffset: 0; }
}
