/*!
 * TripNGo booking form. Ported from reference/prototype.html (v21–v24 booking rules).
 * Everything is scoped under .tng so nothing leaks into the theme; the booking panel is always navy.
 */

/* ---------- tokens (primitives + the prototype's on-dark semantic layer) ---------- */
.tng {
	--navy-950: #07141c; --navy-900: #0a1b26; --navy-800: #0f2432; --navy-700: #163245; --navy-600: #1f4058;
	--gold-800: #5f4d38; --gold-700: #7a6143; --gold-600: #aa9072; --gold-500: #c7a47c; --gold-400: #d7b487; --gold-300: #e4c9a5;
	--ivory-100: #f6f1e7; --warm-white: #f3ece0;
	--font-display: "Noto Serif Display", "Times New Roman", serif;
	--font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	--step--1: clamp(0.75rem, 0.73rem + 0.1vw, 0.8125rem);
	--step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
	--step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
	--step-2: clamp(1.55rem, 1.3rem + 1.1vw, 2.15rem);
	--step-3: clamp(2rem, 1.5rem + 2.3vw, 3.3rem);
	--space-1: clamp(0.5rem, 0.46rem + 0.2vw, 0.625rem);
	--space-2: clamp(0.875rem, 0.8rem + 0.35vw, 1.1rem);
	--space-3: clamp(1.3rem, 1.1rem + 0.9vw, 1.9rem);
	--space-4: clamp(2rem, 1.5rem + 2.2vw, 3.6rem);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
	--dur-1: 0.25s; --dur-2: 0.55s;
	/* on-dark semantic layer */
	--bg: var(--navy-800); --bg-raised: var(--navy-900); --bg-sunken: var(--navy-950);
	--ink: #f3ece0; --ink-muted: #b9c3c8; --ink-faint: #7f98a8;
	--line: rgb(199 164 124 / 0.22); --line-strong: rgb(199 164 124 / 0.55);
	--accent: var(--gold-500); --accent-hi: var(--gold-400); --accent-ink: var(--navy-900); --focus: var(--gold-300);
	--btn-bg: var(--accent); --btn-bg-hover: var(--accent-hi); --btn-ink: var(--accent-ink); --btn-line: var(--line-strong);
	--field-line: var(--line-strong);
	--panel-bg: rgb(10 27 38 / 0.9); --panel-line: var(--line-strong);
	--bad: #e8a090;
	color: var(--ink);
	font-family: var(--font-sans);
	font-size: var(--step-0);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
	.tng { --dur-1: 0.01s; --dur-2: 0.01s; }
	.tng *, .tng *::before, .tng *::after { transition-duration: 0.01s !important; animation-duration: 0.01s !important; }
}

/* ---------- scoped reset ---------- */
.tng *, .tng *::before, .tng *::after { box-sizing: border-box; }
.tng h2, .tng h3, .tng p, .tng ul, .tng ol, .tng dl, .tng dd { margin: 0; padding: 0; }
.tng ul, .tng ol { list-style: none; }
.tng button, .tng input, .tng select, .tng textarea { font: inherit; color: inherit; letter-spacing: inherit; }
.tng [hidden] { display: none !important; }
.tng :focus-visible { outline: 1px solid var(--focus); outline-offset: 4px; }
.tng h2, .tng h3 { font-family: var(--font-display); font-weight: 300; line-height: 1.08; letter-spacing: -.012em; color: var(--ink); }
.tng h2 { font-size: var(--step-3); }
.tng h3 { font-size: var(--step-1); line-height: 1.25; }
.tng .muted { color: var(--ink-muted); }
.tng .sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tng a { color: var(--accent-hi); }

/* ---------- buttons ---------- */
.tng .btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .9rem; padding: 1.05rem 2rem; background: var(--btn-bg); color: var(--btn-ink); border: 1px solid var(--btn-bg); border-radius: 0; font-size: var(--step--1); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; overflow: hidden; isolation: isolate; transition: color var(--dur-1) var(--ease-in-out), border-color var(--dur-1); }
.tng .btn::before { content: ""; position: absolute; inset: 0; background: var(--btn-bg-hover); transform: translateY(101%); transition: transform var(--dur-2) var(--ease-out); z-index: -1; }
.tng .btn:hover::before { transform: none; }
.tng .btn .arr { inline-size: 1.6rem; block-size: 1px; background: currentColor; position: relative; transition: inline-size var(--dur-2) var(--ease-out); }
.tng .btn .arr::after { content: ""; position: absolute; inset-inline-end: 0; inset-block-start: -3px; inline-size: 7px; block-size: 7px; border-top: 1px solid currentColor; border-inline-end: 1px solid currentColor; transform: rotate(45deg); }
.tng .btn:hover .arr { inline-size: 2.3rem; }
.tng .btn.ghost { background: transparent; color: var(--ink); border-color: var(--btn-line); }
.tng .btn.ghost::before { background: var(--accent); }
.tng .btn.ghost:hover { color: var(--accent-ink); border-color: var(--accent); }
.tng .btn[disabled], .tng .btn[aria-busy="true"] { opacity: .6; cursor: progress; }

/* ---------- booking panel ---------- */
.tng .book { background: var(--panel-bg); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid var(--panel-line); padding: var(--space-4); display: grid; gap: var(--space-3); color: var(--ink); min-inline-size: 0; }
.tng .book-head { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: space-between; align-items: baseline; }
.tng .book-head h2 { font-size: var(--step-2); }
.tng .seg { position: relative; display: inline-flex; gap: 0; border: 1px solid var(--line-strong); padding: .22rem; }
.tng .seg input { position: absolute; opacity: 0; pointer-events: none; }
.tng .seg label { cursor: pointer; font-size: var(--step--1); letter-spacing: .2em; text-transform: uppercase; font-weight: 500; padding: .65rem 1.4rem; border: 0; color: var(--ink-muted); transition: background .4s var(--ease-out), color .3s; }
.tng .seg label:hover { color: var(--ink); }
.tng .seg input:checked + label { background: var(--accent); color: var(--navy-950); }
.tng .seg input:focus-visible + label { outline: 1px solid var(--focus); outline-offset: 2px; }

.tng .route { display: grid; gap: var(--space-2); grid-template-columns: 1fr; align-items: end; }
.tng .route-swap { justify-self: start; inline-size: 2.6rem; block-size: 2.6rem; border: 1px solid var(--line-strong); background: none; color: var(--accent); cursor: pointer; border-radius: 50%; transition: transform var(--dur-2) var(--ease-out), background var(--dur-1); }
.tng .route-swap:hover { background: var(--line); transform: rotate(180deg); }
.tng .route-swap:disabled { opacity: .35; cursor: default; transform: none !important; background: none !important; }
.tng .fields { display: grid; gap: var(--space-2) var(--space-3); grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.tng .fields.two { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.tng .field { position: relative; display: flex; flex-direction: column; gap: .35rem; min-inline-size: 0; }
.tng .field.wide { grid-column: 1 / -1; }
.tng .field label, .tng .field .lbl { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 500; color: var(--accent); }
.tng .field .hint { color: var(--ink-faint); letter-spacing: .06em; text-transform: none; }
.tng .field input, .tng .field select, .tng .field textarea { inline-size: 100%; background: transparent; border: 0; border-block-end: 1px solid var(--field-line); border-radius: 0; padding: .7rem 0; font-size: var(--step-0); color: var(--ink); outline: 0; transition: border-color var(--dur-1); color-scheme: dark; min-block-size: 3rem; }
.tng .field textarea { min-block-size: 7rem; resize: vertical; }
.tng .field select option { background: var(--navy-900); color: #f3ece0; }
.tng .field input::placeholder, .tng .field textarea::placeholder { color: var(--ink-faint); }
.tng .field input:focus, .tng .field select:focus, .tng .field textarea:focus { border-color: var(--accent-hi); }
.tng .field [aria-invalid="true"], .tng .dp-btn.bad { border-color: var(--bad); }
.tng .err { font-size: var(--step--1); color: var(--bad); margin: 0; }
.tng .field input[readonly] { color: var(--ink-muted); border-color: var(--line); }

/* steps */
.tng .bk-steps { list-style: none; display: flex; gap: var(--space-2); margin: 0; padding: 0; }
.tng .bk-steps li { flex: 1; display: flex; align-items: center; gap: .6rem; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); position: relative; padding-block-end: .7rem; border-block-end: 1px solid var(--line); transition: color .4s, border-color .4s; }
.tng .bk-steps .n { inline-size: 1.7rem; block-size: 1.7rem; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; font-size: .7rem; letter-spacing: 0; flex: none; transition: all .4s var(--ease-out); }
.tng .bk-steps li.on { color: var(--accent-hi); border-color: var(--accent); }
.tng .bk-steps li.on .n { background: var(--accent); color: var(--navy-950); border-color: var(--accent); }
.tng .bk-steps li.done { color: var(--ink-muted); border-color: var(--accent); }
.tng .bk-steps li.done .n { border-color: var(--accent); color: var(--accent); }
@media (max-width: 47.99rem) {
	.tng .bk-steps .l { display: none; }
	.tng .bk-steps li.on .l { display: inline; }
	.tng .bk-steps li { flex: 0 0 auto; }
	.tng .bk-steps li.on { flex: 1; }
}

/* panes */
.tng .panes { position: relative; min-inline-size: 0; }
.tng .pane { display: grid; gap: var(--space-3); min-inline-size: 0; }
.tng .pane[hidden] { display: none; }
.tng .pane.enter { animation: tng-in var(--dur-2) var(--ease-out); }
@keyframes tng-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.tng .pane-h { font-family: var(--font-sans); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 500; color: var(--accent); margin: 0; }
.tng .leg { font-family: var(--font-display); font-weight: 300; font-size: var(--step-1); margin: 0; color: var(--ink); }
.tng .leg-row { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: space-between; align-items: baseline; }
.tng .chk { display: flex; gap: .6rem; align-items: center; font-size: var(--step--1); color: var(--ink-muted); cursor: pointer; }
.tng .chk input { accent-color: var(--accent); inline-size: 1.05rem; block-size: 1.05rem; flex: none; }
.tng .chk.terms { align-items: flex-start; }
.tng .chk.terms input { margin-block-start: .25rem; }
.tng .retblock { display: grid; gap: var(--space-3); padding-block-start: var(--space-3); border-block-start: 1px solid var(--line); }
.tng .vehicle-line { font-size: var(--step--1); color: var(--ink-muted); margin: 0; }
.tng .vehicle-line b { color: var(--accent-hi); font-weight: 500; }
.tng .note { font-size: var(--step--1); color: var(--ink-muted); margin: 0; padding: var(--space-2); border: 1px solid var(--line); }

/* stepper (adults, children, child seats) */
.tng .stepper { display: flex; align-items: center; border-block-end: 1px solid var(--field-line); min-block-size: 3rem; }
.tng .stepper button { inline-size: 2.4rem; block-size: 2.4rem; border: 1px solid var(--line-strong); background: none; color: var(--accent); cursor: pointer; font-size: 1.1rem; line-height: 1; flex: none; }
.tng .stepper button:disabled { opacity: .3; cursor: default; }
.tng .stepper output { flex: 1; text-align: center; font-size: var(--step-0); }

/* phone with country prefix */
.tng .phone { display: grid; grid-template-columns: minmax(6.5rem, 34%) 1fr; gap: .6rem; }

/* date picker */
.tng .field.dp { position: relative; }
.tng .dp-btn { inline-size: 100%; text-align: start; background: transparent; border: 0; border-block-end: 1px solid var(--field-line); padding: .7rem 0; font-size: var(--step-0); color: var(--ink); cursor: pointer; transition: border-color var(--dur-1); min-block-size: 3rem; }
.tng .dp-btn.empty { color: var(--ink-faint); }
.tng .dp-btn:hover, .tng .dp-btn:focus-visible { border-color: var(--accent-hi); }
.tng .dp-pop { position: absolute; z-index: 30; inset-block-start: calc(100% + .4rem); inset-inline-start: 0; inline-size: min(19rem, calc(100vw - 2.5rem)); background: var(--navy-900); border: 1px solid var(--line-strong); padding: 1rem; box-shadow: 0 24px 60px rgb(0 0 0 / .45); }
.tng .dp-pop.right { inset-inline-start: auto; inset-inline-end: 0; }
.tng .dp-head { display: flex; align-items: center; justify-content: space-between; margin-block-end: .7rem; }
.tng .dp-head b { font-family: var(--font-display); font-weight: 400; font-size: var(--step-0); text-transform: capitalize; }
.tng .dp-nav { inline-size: 2rem; block-size: 2rem; border: 1px solid var(--line-strong); background: none; color: var(--accent); cursor: pointer; display: grid; place-items: center; font-size: 1rem; }
.tng .dp-nav:disabled { opacity: .3; cursor: default; }
.tng .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.tng .dp-grid .wd { font-style: normal; font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); padding-block: .3rem; }
.tng .dp-grid button { aspect-ratio: 1; border: 0; background: none; color: var(--ink); cursor: pointer; font-size: .85rem; transition: background .2s; min-inline-size: 0; }
.tng .dp-grid button:hover:not(:disabled) { background: var(--line); }
.tng .dp-grid button:disabled { color: var(--ink-faint); opacity: .4; cursor: default; }
.tng .dp-grid button.today { outline: 1px solid var(--line-strong); }
.tng .dp-grid button[aria-selected="true"] { background: var(--accent); color: var(--navy-950); }

/* place suggestions */
.tng .sug { position: absolute; inset-inline: 0; inset-block-start: calc(100% + .25rem); z-index: 30; margin: 0; padding: .35rem 0; list-style: none; background: #0e2430; border: 1px solid var(--line-strong); box-shadow: 0 18px 40px rgb(0 0 0 / .35); max-block-size: 16rem; overflow: auto; }
.tng .sug .cap { padding: .45rem 1rem .25rem; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); }
.tng .sug li[role=option] { padding: .6rem 1rem; cursor: pointer; font-size: .92rem; line-height: 1.35; color: var(--ink); }
.tng .sug li[role=option] small { display: block; font-size: .72rem; color: var(--ink-faint); letter-spacing: .04em; }
.tng .sug li[role=option][aria-selected=true], .tng .sug li[role=option]:hover { background: var(--line); color: var(--accent); }

/* cards: extras, payment */
.tng .extras, .tng .pays { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.tng .vcard { position: relative; display: grid; gap: .15rem; padding: var(--space-3); border: 1px solid var(--line-strong); cursor: pointer; transition: border-color .3s, background .3s, transform .4s var(--ease-out); }
.tng .vcard:hover { transform: translateY(-2px); border-color: var(--accent); }
.tng .vcard > input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tng .vcard:has(> input:checked), .tng .vcard.on { border-color: var(--accent-hi); background: rgb(199 164 124 / .09); }
.tng .vcard:has(> input:focus-visible) { outline: 1px solid var(--focus); outline-offset: 3px; }
.tng .vcard.static { cursor: default; }
.tng .vcard.static:hover { transform: none; }
.tng .vt { font-family: var(--font-display); font-size: var(--step-1); color: var(--ink); }
.tng .vm { font-size: var(--step--1); color: var(--ink-muted); }
.tng .vp { font-size: var(--step-1); color: var(--accent-hi); margin-block-start: .4rem; }
.tng .xcard::after { content: ""; position: absolute; inset-block-start: var(--space-3); inset-inline-end: var(--space-3); inline-size: 1.1rem; block-size: 1.1rem; border: 1px solid var(--line-strong); transition: all .3s; }
.tng .xcard:has(> input:checked)::after { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a1b26' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/80% no-repeat; border-color: var(--accent); }
.tng .vcard .stepper { margin-block-start: .6rem; position: relative; z-index: 1; }
.tng .inc { font-size: var(--step--1); color: var(--ink-muted); margin: 0; }

/* summary */
.tng .sum { display: grid; margin: 0; border-block-start: 1px solid var(--line); }
.tng .sum > div { display: grid; gap: .2rem var(--space-3); padding-block: .8rem; border-block-end: 1px solid var(--line); }
.tng .sum dt { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.tng .sum dd { margin: 0; display: grid; gap: .1rem; min-inline-size: 0; overflow-wrap: anywhere; }
.tng .sum dd b { font-weight: 400; font-size: var(--step-0); color: var(--ink); }
.tng .sum dd b.big { font-family: var(--font-display); font-size: var(--step-2); color: var(--accent-hi); }
.tng .sum dd span { font-size: var(--step--1); color: var(--ink-muted); }
.tng .lines { display: grid; gap: .15rem; font-size: var(--step--1); color: var(--ink-muted); }
.tng .lines div { display: flex; justify-content: space-between; gap: 1rem; }
.tng .lines .amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 48rem) { .tng .sum > div { grid-template-columns: 9rem 1fr; align-items: baseline; } }

/* done */
.tng .pane.done { justify-items: center; text-align: center; padding-block: var(--space-4); }
.tng .tick { inline-size: 4.5rem; block-size: 4.5rem; fill: none; stroke: var(--accent); stroke-width: 2; }
.tng .tick circle { stroke-dasharray: 160; } .tng .tick path { stroke-dasharray: 60; stroke-linecap: round; stroke-linejoin: round; }
.tng .pane.done h3 { font-size: var(--step-3); margin: 0; }
.tng .refline { margin: 0; font-size: var(--step--1); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-muted); }
.tng .refline b { color: var(--accent-hi); font-weight: 500; margin-inline-start: .5rem; }

/* footer */
.tng .book-foot { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: center; justify-content: space-between; }
.tng .status { font-size: var(--step--1); color: var(--accent); margin: 0; order: 3; flex: 1 0 100%; min-block-size: 1.2em; }
.tng .bk-total { margin: 0; display: flex; gap: .8rem; align-items: baseline; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-muted); }
.tng .bk-total b { font-family: var(--font-display); font-size: var(--step-2); letter-spacing: 0; color: var(--accent-hi); font-weight: 400; }
.tng .book-foot.fin > :not(.status) { display: none; }
.tng .book-foot.fin .status { text-align: center; }
.tng .hp { position: absolute !important; inset-inline-start: -10000px; inline-size: 1px; block-size: 1px; overflow: hidden; }

@media (min-width: 48rem) {
	.tng .route { grid-template-columns: 1fr auto 1fr; }
	.tng .route-swap { justify-self: center; margin-block-end: .3rem; }
}
@media (max-width: 47.99rem) {
	.tng .book { padding: var(--space-3) var(--space-2); }
	.tng .book-foot .btn { flex: 1; }
	.tng .book-foot .bk-total { order: -1; flex: 1 0 100%; justify-content: space-between; }
	.tng .book-foot .btn.ghost { flex: 0 0 auto; }
	.tng .phone { grid-template-columns: 1fr; }
}
@media (max-width: 23rem) {
	.tng .bk-steps { gap: .25rem; }
	.tng .bk-steps li { min-inline-size: 0; font-size: .68rem; letter-spacing: 0; }
	.tng .seg label { padding-inline: .6rem; font-size: .72rem; letter-spacing: .04em; }
	.tng .book { padding-inline: .75rem; }
}
