/* Vitalscan Booking Gateway. Inherits the Avada palette where present. */
:root {
	--vsgw-accent: #20b8b0;
	--vsgw-accent-deep: #178f89;
	--vsgw-accent-ink: #ffffff;
	--vsgw-ink: #14213d;
	--vsgw-muted: #5b6573;
	--vsgw-line: #dfe3ea;
	--vsgw-bg: #ffffff;
	--vsgw-bg-soft: #f6f8fb;
	--vsgw-error: #c0392b;
	--vsgw-radius: 20px;
	--vsgw-shadow: 0 30px 80px rgba(16, 24, 40, 0.28), 0 2px 8px rgba(16, 24, 40, 0.08);
	--vsgw-font: inherit;
}

html.vsgw-lock, html.vsgw-lock body { overflow: hidden !important; }
/* Avada popups / off-canvas (e.g. the timed promo popup) would otherwise stack under or behind the modal. */
html.vsgw-lock .awb-off-canvas-wrap { display: none !important; }
.vsgw-dialog [hidden], .vsgw-inline [hidden] { display: none !important; }

/* Overlay */
.vsgw-overlay {
	/* Above Avada's header (z-index 9999999) and the reviews slide-in (9999999). */
	position: fixed; inset: 0; z-index: 2147483000;
	display: flex; align-items: center; justify-content: center;
	padding: 24px;
	background: rgba(12, 20, 38, 0.62);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility 0s linear .22s;
}
.vsgw-overlay.is-open { opacity: 1; visibility: visible; transition: opacity .22s ease; }

.vsgw-dialog {
	position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 48px);
	display: flex; flex-direction: column;
	background: var(--vsgw-bg); color: var(--vsgw-ink);
	border-radius: var(--vsgw-radius); box-shadow: var(--vsgw-shadow);
	font-family: var(--vsgw-font); line-height: 1.45;
	transform: translateY(14px) scale(.98); transition: transform .26s cubic-bezier(.2,.8,.2,1);
	overflow: hidden;
}
.vsgw-overlay.is-open .vsgw-dialog { transform: none; }
.vsgw-dialog.is-embed { max-width: 780px; height: min(880px, calc(100vh - 48px)); transition: transform .26s cubic-bezier(.2,.8,.2,1), max-width .2s ease; }
/* Booking page loads off-screen while the form is being filled in, so step 2 appears instantly. */
.vsgw-step-embed.is-prewarm { position: fixed !important; left: -10000px; top: 0; width: min(780px, 100vw); height: min(880px, 100vh); visibility: hidden; pointer-events: none; }

.vsgw-close {
	position: absolute; top: 14px; right: 14px; z-index: 3;
	width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--vsgw-bg-soft); color: var(--vsgw-ink);
	display: inline-flex; align-items: center; justify-content: center;
	transition: background .15s;
}
.vsgw-close:hover, .vsgw-close:focus-visible { background: #e9edf3; outline: none; }
.vsgw-close:focus-visible { box-shadow: 0 0 0 3px rgba(32,184,176,.40); }

/* Step 1: form */
.vsgw-step-form { padding: 36px 36px 28px; overflow: auto; }
.vsgw-steps { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.vsgw-steps span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--vsgw-accent); }
.vsgw-steps strong { font-size: 17px; font-weight: 700; color: var(--vsgw-ink); }
.vsgw-title { margin: 0 0 6px; font-size: 28px; line-height: 1.15; font-weight: 700; color: var(--vsgw-ink); }
.vsgw-sub { margin: 0 0 22px; font-size: 15.5px; color: var(--vsgw-muted); }
/* On scan pages the theme's h2/p rules outrank the plain classes; match the modal there. */
.vsgw-inline-card .vsgw-title { margin: 0 0 6px !important; font-size: 28px !important; line-height: 1.15 !important; font-weight: 700 !important; letter-spacing: normal !important; color: var(--vsgw-ink) !important; }
.vsgw-inline-card .vsgw-sub { margin: 0 0 22px !important; font-size: 15.5px !important; line-height: 1.45 !important; }
.vsgw-inline-card .vsgw-trust { margin: 14px 0 0 !important; line-height: 1.45 !important; }

.vsgw-field { margin-bottom: 14px; }
.vsgw-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--vsgw-ink); }
.vsgw-field input {
	width: 100%; box-sizing: border-box; height: 52px; padding: 0 16px;
	font: inherit; font-size: 16px; color: var(--vsgw-ink);
	background: var(--vsgw-bg); border: 1.5px solid var(--vsgw-line); border-radius: 12px;
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none; appearance: none;
}
.vsgw-field input:focus { outline: none; border-color: var(--vsgw-accent); box-shadow: 0 0 0 4px rgba(32,184,176,.18); }
.vsgw-field input.is-invalid { border-color: var(--vsgw-error); box-shadow: 0 0 0 4px rgba(192,57,43,.12); }
.vsgw-optin { display: flex !important; align-items: flex-start; gap: 10px; margin: 2px 0 14px !important; font-size: 13.5px !important; font-weight: 400 !important; line-height: 1.4 !important; color: var(--vsgw-muted); cursor: pointer; }
.vsgw-optin input { flex: none; width: 18px !important; height: 18px !important; margin: 1px 0 0 !important; accent-color: var(--vsgw-accent); cursor: pointer; }
.vsgw-hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.vsgw-error { margin: -4px 0 12px; font-size: 14px; color: var(--vsgw-error); }

.vsgw-btn {
	position: relative; width: 100%; height: 56px; margin-top: 6px;
	border: 0; border-radius: 14px; cursor: pointer;
	background: var(--vsgw-accent); color: var(--vsgw-accent-ink);
	font: inherit; font-size: 17px; font-weight: 700; letter-spacing: .01em;
	display: inline-flex; align-items: center; justify-content: center;
	transition: transform .12s, filter .15s, box-shadow .15s;
	box-shadow: 0 10px 24px rgba(32,184,176,.30);
}
.vsgw-btn:hover { background: var(--vsgw-accent-deep); transform: translateY(-1px); }
.vsgw-btn:active { transform: translateY(0); }
.vsgw-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(32,184,176,.40); }
.vsgw-btn:disabled { cursor: default; filter: none; transform: none; opacity: .85; }
.vsgw-btn-text::after { content: ' \2192'; }
.vsgw-btn-spin { display: none; width: 20px; height: 20px; margin-left: 10px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: vsgw-spin .8s linear infinite; }
.is-busy .vsgw-btn-spin { display: inline-block; }
.is-busy .vsgw-btn-text::after { content: ''; }
@keyframes vsgw-spin { to { transform: rotate(360deg); } }

.vsgw-trust { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 13px; color: var(--vsgw-muted); }
.vsgw-trust svg { flex: none; color: #2e9e5b; }
.vsgw-phone { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--vsgw-ink); text-decoration: none; }
.vsgw-phone:hover { color: var(--vsgw-accent); }
.vsgw-phone-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--vsgw-line); width: 100%; }

/* Step 2: embed */
.vsgw-step-embed { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.vsgw-embed-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 24px 64px 14px 28px; border-bottom: 1px solid var(--vsgw-line); }
.vsgw-embed-head .vsgw-steps { margin: 0; min-width: 0; }
.vsgw-embed-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vsgw-embed-wrap { position: relative; flex: 1; min-height: 0; background: var(--vsgw-bg-soft); }
.vsgw-iframe { width: 100%; height: 100%; border: 0; display: block; background: transparent; opacity: 0; transition: opacity .25s; }
.is-loaded .vsgw-iframe { opacity: 1; }
.vsgw-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--vsgw-muted); font-size: 15px; }
.is-loaded .vsgw-loading { display: none; }
.vsgw-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--vsgw-line); border-top-color: var(--vsgw-accent); animation: vsgw-spin .8s linear infinite; }

/* Inline gate on booking pages */
.vsgw-inline { position: relative; }
/* Keep the widget laid out (off-screen) while gated, so Meditice measures its real width and height. */
.vsgw-inline > .meditice-ibe { position: absolute !important; left: -10000px; top: 0; width: 100%; visibility: hidden; pointer-events: none; }
.vsgw-inline.is-revealed > .meditice-ibe { position: static !important; left: auto; visibility: visible; pointer-events: auto; }
.vsgw-inline-card {
	max-width: 520px; margin: 0 auto 32px; padding: 32px 32px 24px;
	background: var(--vsgw-bg); border: 1px solid var(--vsgw-line); border-radius: var(--vsgw-radius);
	box-shadow: 0 12px 40px rgba(16,24,40,.08);
}

/* Mobile: full-height sheet */
@media (max-width: 640px) {
	.vsgw-overlay { padding: 0; align-items: flex-end; }
	.vsgw-dialog, .vsgw-dialog.is-embed {
		max-width: none; width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0;
		transform: translateY(24px);
	}
	.vsgw-step-form { padding: 28px 20px 24px; }
	.vsgw-title { font-size: 24px; }
	.vsgw-embed-head { padding: 18px 60px 12px 18px; flex-direction: column; align-items: flex-start; gap: 6px; }
	.vsgw-inline-card { padding: 24px 18px 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.vsgw-overlay, .vsgw-dialog, .vsgw-iframe { transition: none; }
}
