/* =========================================================================
   Silver 13 Taxis Melbourne: booking form, fare estimator, confirmation.

   Loaded after main.css. Everything is scoped to .s13form / .s13* so it does
   not move anything else. White card, 12px radius, pill buttons, deep green
   text, gold primary button, cream panels, Inter.

   Used by template-parts/booking-form.php and fare-estimator.php. Must hold
   inside a hero card about 420px wide and full width on a 360px phone.
   ========================================================================= */

.s13form,
.s13card {
	--s13-green: #173F3A;
	--s13-green-2: #0F2E2A;
	--s13-gold: #F2C94C;
	--s13-gold-2: #E9BB2E;
	--s13-cream: #F7F5EE;
	--s13-line: #DDD8C9;
	--s13-muted: #5A6B67;
	--s13-alert: #B3261E;
	--s13-radius: 12px;
	--s13-field: 10px;
}

/* Card for a form that is not already inside the theme's hero card. */
.s13card {
	background: #fff;
	border-radius: var(--s13-radius);
	padding: 20px;
	box-shadow: 0 10px 30px rgba(15, 46, 42, .12);
	min-width: 0;
}

.s13form {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--s13-green);
	font-size: 15px;
	line-height: 1.45;
	text-align: left;
	min-width: 0;
}
.s13form *, .s13form *::before, .s13form *::after { box-sizing: border-box; }
.s13form [hidden] { display: none !important; }

/* Steps: one at a time once steps.js is running. */
.bookform--steps.is-stepped .bstep:not(.is-active) { display: none; }
.bf-js .s13form.bookform--steps:not(.is-stepped) .bstep:not([data-step="1"]) { display: none; }

/* ---------- Header: title and the 01 / 02 pill ---------- */
.s13form__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.s13form__title { margin: 0; font: 700 20px/1.2 "Inter", sans-serif; color: var(--s13-green); letter-spacing: -.01em; outline: none; }
.s13form__count { flex-shrink: 0; padding: 5px 11px; border: 1px solid var(--s13-line); border-radius: 999px; font: 600 12px/1 "Inter", sans-serif; color: var(--s13-muted); font-variant-numeric: tabular-nums; white-space: nowrap; background: #fff; }

/* ---------- Segmented toggle ---------- */
.s13seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 14px; background: var(--s13-cream); border-radius: 999px; }
.s13seg__btn { min-width: 0; min-height: 40px; padding: 6px 8px; border: 0; border-radius: 999px; background: transparent; color: var(--s13-muted); font: 600 14px/1.2 "Inter", sans-serif; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.s13seg__btn small { font-weight: 500; font-size: 12px; }
.s13seg__btn:hover { color: var(--s13-green); }
.s13seg__btn[aria-pressed="true"] { background: #fff; color: var(--s13-green); box-shadow: 0 1px 3px rgba(15, 46, 42, .18); }
.s13seg__btn:focus-visible { outline: 2px solid var(--s13-green); outline-offset: 2px; }

/* ---------- Fields ---------- */
.s13form .s13form__field { position: relative; margin: 0 0 12px; min-width: 0; }
.s13form .s13form__field > label,
.s13form .s13count > label,
.s13form .s13form__set > legend { display: block; margin: 0 0 5px; padding: 0; font: 600 11.5px/1.3 "Inter", sans-serif; letter-spacing: .07em; text-transform: uppercase; color: var(--s13-green); }
.s13form__opt { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--s13-muted); }

.s13form .s13form__field input[type="text"],
.s13form .s13form__field input[type="email"],
.s13form .s13form__field input[type="date"],
.s13form .s13form__field input[type="time"],
.s13form .s13form__field select,
.s13form .s13form__field textarea,
.s13form .s13count select {
	display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 46px; margin: 0; padding: 10px 12px;
	border: 1.5px solid var(--s13-line); border-radius: var(--s13-field) !important; background-color: #fff;
	color: var(--s13-green); font: 500 16px/1.3 "Inter", sans-serif; box-shadow: none;
	-webkit-appearance: none; appearance: none;
}
.s13form .s13form__field textarea { min-height: 72px; resize: vertical; }
.s13form .s13form__field select,
.s13form .s13count select {
	padding-right: 34px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23173F3A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center;
}
.s13form .s13form__field input::placeholder,
.s13form .s13form__field textarea::placeholder { color: #8A9793; opacity: 1; }
.s13form .s13form__field input:hover,
.s13form .s13form__field select:hover,
.s13form .s13form__field textarea:hover { border-color: #C4BEAB; }
.s13form .s13form__field input:focus,
.s13form .s13form__field select:focus,
.s13form .s13form__field textarea:focus,
.s13form .s13count select:focus { outline: none; border-color: var(--s13-green); box-shadow: 0 0 0 3px rgba(242, 201, 76, .45); }
.s13form .s13form__field input[readonly] { background-color: var(--s13-cream); border-color: var(--s13-line); font-weight: 600; cursor: default; }
.s13form .s13form__field input[readonly]:focus { box-shadow: none; border-color: var(--s13-line); }
.s13form .is-bad,
.s13form .phonegroup:has(.is-bad) { border-color: var(--s13-alert) !important; }

/* Date and time inputs carry their own minimum width in most browsers, which
   pushes a two column grid wider than a 360px phone. */
.s13form input[type="date"], .s13form input[type="time"] { min-width: 0; -webkit-min-logical-width: 0; }
.s13form input[type="date"]::-webkit-date-and-time-value,
.s13form input[type="time"]::-webkit-date-and-time-value { text-align: left; }

.s13form__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.s13form__row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 12px; }
@media (max-width: 379px) {
	.s13form__row { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.s13form__row--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.s13form__row--3 > :last-child { grid-column: 1 / -1; }
}

/* Phone field with its country code picker (markup from inc/config.php). */
.s13form .phonegroup { display: flex; align-items: stretch; min-height: 46px; border: 1.5px solid var(--s13-line); border-radius: var(--s13-field) !important; background: #fff; overflow: visible; }
.s13form .phonegroup:focus-within { border-color: var(--s13-green); box-shadow: 0 0 0 3px rgba(242, 201, 76, .45); }
.s13form .phonegroup input[type="tel"] { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; padding: 10px 12px 10px 4px; color: var(--s13-green); font: 500 16px/1.3 "Inter", sans-serif; box-shadow: none; outline: none; border-radius: 0 var(--s13-field) var(--s13-field) 0; }
.s13form .ccpick__btn { border-radius: var(--s13-field) 0 0 var(--s13-field); color: var(--s13-green); }
.s13form .ccpick__item:hover, .s13form .ccpick__item.is-active { background: var(--s13-cream); }

/* Address suggestions (built by main.js inside the field). */
.s13form .acmenu { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--s13-line); border-radius: var(--s13-field); box-shadow: 0 12px 28px rgba(15, 46, 42, .18); overflow-y: auto; }
.s13form .acmenu--up { top: auto; bottom: 100%; margin: 0 0 4px; }
.s13form .acitem { padding: 9px 10px; border-radius: 7px; font-size: 14px; line-height: 1.35; color: var(--s13-green); cursor: pointer; }
.s13form .acitem:hover, .s13form .acitem.is-active, .s13form .acitem[aria-selected="true"] { background: var(--s13-cream); }

.s13form__set { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.s13form__hint { margin: -4px 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--s13-muted); }
.s13form__set .s13form__hint { margin: 8px 0 0; }
.s13form__err { margin: 0 0 12px; padding: 9px 12px; border-radius: var(--s13-field); background: #FCEDEB; color: var(--s13-alert); font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.s13form__legal { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--s13-muted); text-align: center; }
.s13form__legal a, .s13fare__help a, .s13thanks__help a { color: var(--s13-green); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.s13form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Vehicle preference ---------- */
.s13veh { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.s13veh__opt { position: relative; display: block; min-width: 0; margin: 0; cursor: pointer; }
.s13veh__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.s13veh__box { display: flex; flex-direction: column; gap: 2px; height: 100%; min-height: 64px; padding: 9px 10px; border: 1.5px solid var(--s13-line); border-radius: var(--s13-field); background: #fff; transition: border-color .15s ease, background-color .15s ease; }
.s13veh__box b { font: 700 13.5px/1.25 "Inter", sans-serif; color: var(--s13-green); overflow-wrap: anywhere; }
.s13veh__box small { font-size: 11.5px; line-height: 1.3; color: var(--s13-muted); }
.s13veh__price { margin-top: auto; padding-top: 3px; font: 700 12.5px/1.2 "Inter", sans-serif; color: var(--s13-green); font-variant-numeric: tabular-nums; white-space: nowrap; }
.s13veh__price:empty { display: none; }
.s13veh__opt:hover .s13veh__box { border-color: #C4BEAB; }
.s13veh__opt input:checked + .s13veh__box { border-color: var(--s13-green); background: var(--s13-cream); box-shadow: inset 0 0 0 1px var(--s13-green); }
.s13veh__opt input:focus-visible + .s13veh__box { outline: 2px solid var(--s13-green); outline-offset: 2px; }
.s13veh__opt.is-toosmall { cursor: not-allowed; }
.s13veh__opt.is-toosmall .s13veh__box { opacity: .45; }
@media (max-width: 379px) {
	.s13veh { grid-template-columns: minmax(0, 1fr); gap: 6px; }
	.s13veh__box { flex-direction: row; flex-wrap: wrap; align-items: baseline; min-height: 0; gap: 2px 10px; }
	.s13veh__price { margin: 0 0 0 auto; padding: 0; }
}

/* ---------- Fare estimate ---------- */
.s13fare { margin: 0 0 14px; padding: 13px 14px; border-radius: var(--s13-radius); background: var(--s13-cream); border: 1px solid #ECE8DB; }
.s13fare__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.s13fare__label { font: 600 11.5px/1.3 "Inter", sans-serif; letter-spacing: .07em; text-transform: uppercase; color: var(--s13-green); }
.s13fare__value { font: 800 22px/1.1 "Inter", sans-serif; color: var(--s13-green); font-variant-numeric: tabular-nums; white-space: nowrap; }
.s13fare[data-idle="true"] .s13fare__value { display: none; }
.s13fare__note { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--s13-green); overflow-wrap: anywhere; }
.s13fare__help { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid #E4DFCF; font-size: 12.5px; line-height: 1.5; color: var(--s13-muted); }
.s13fare .s13fare__items { margin: 10px 0 0; padding: 0; border: 0; border-top: 1px solid #E4DFCF; background: transparent; border-radius: 0; }
.s13fare .s13fare__items .farebreak__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border: 0; border-bottom: 1px dashed #E4DFCF; font-size: 13px; line-height: 1.35; color: var(--s13-green); background: transparent; }
.s13fare .s13fare__items .farebreak__row:last-child { border-bottom: 0; }
.s13fare .s13fare__items .farebreak__row span { min-width: 0; }
.s13fare .s13fare__items .farebreak__row b { flex-shrink: 0; font-weight: 700; color: var(--s13-green); font-variant-numeric: tabular-nums; white-space: nowrap; }
.s13fare .s13fare__items .farebreak__row--head { font-weight: 700; }

/* ---------- Buttons ---------- */
.s13btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 12px 22px; border: 1.5px solid transparent; border-radius: 999px; font: 700 16px/1.2 "Inter", sans-serif; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .15s ease; }
.s13btn svg { flex-shrink: 0; }
.s13btn--primary { background: var(--s13-gold); color: var(--s13-green); }
.s13btn--primary:hover { background: var(--s13-gold-2); color: var(--s13-green); }
.s13btn--ghost { background: transparent; color: var(--s13-green); border-color: var(--s13-green); }
.s13btn--ghost:hover { background: var(--s13-cream); color: var(--s13-green); }
.s13btn:active { transform: translateY(1px); }
.s13btn:focus-visible { outline: 2px solid var(--s13-green); outline-offset: 3px; }
.s13btn:disabled { opacity: .6; cursor: default; }

/* ---------- Step 2: trip summary ---------- */
.s13sum { margin: 0 0 14px; padding: 11px 14px; border-radius: var(--s13-radius); background: var(--s13-cream); border: 1px solid #ECE8DB; }
.s13sum__list { margin: 0; }
.s13sum__list > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; padding: 3px 0; font-size: 13px; line-height: 1.4; }
.s13sum__list dt { margin: 0; color: var(--s13-muted); font-weight: 500; }
.s13sum__list dd { margin: 0; color: var(--s13-green); font-weight: 600; overflow-wrap: anywhere; }
.s13sum__edit { margin: 6px 0 0; padding: 4px 0; border: 0; background: none; color: var(--s13-green); font: 700 13px/1.2 "Inter", sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.s13sum__edit:focus-visible { outline: 2px solid var(--s13-green); outline-offset: 2px; }

/* ---------- Counters ---------- */
.s13count { min-width: 0; }
.s13count__ctl { display: flex; align-items: center; height: 46px; border: 1.5px solid var(--s13-line); border-radius: var(--s13-field); background: #fff; overflow: hidden; }
.s13count__ctl:focus-within { border-color: var(--s13-green); box-shadow: 0 0 0 3px rgba(242, 201, 76, .45); }
.s13count__btn { flex: 0 0 34px; height: 100%; padding: 0; border: 0; background: transparent; color: var(--s13-green); display: grid; place-items: center; cursor: pointer; }
.s13count__btn:hover:not(:disabled) { background: var(--s13-cream); }
.s13count__btn:disabled { color: #BDB8A8; cursor: default; }
.s13form .s13count__ctl input { flex: 1; min-width: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0 !important; background: transparent; box-shadow: none; text-align: center; color: var(--s13-green); font: 700 16px/1 "Inter", sans-serif; -moz-appearance: textfield; appearance: textfield; }
.s13count__ctl input::-webkit-outer-spin-button, .s13count__ctl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.s13form .s13count__ctl input:focus { outline: none; box-shadow: none; }

/* ---------- Payment preference ---------- */
.s13pay { display: flex; flex-wrap: wrap; gap: 8px; }
.s13pay__opt { position: relative; margin: 0; cursor: pointer; }
.s13pay__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.s13pay__opt span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 15px; border: 1.5px solid var(--s13-line); border-radius: 999px; background: #fff; color: var(--s13-green); font: 600 14px/1.2 "Inter", sans-serif; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.s13pay__opt:hover span { border-color: #C4BEAB; }
.s13pay__opt input:checked + span { background: var(--s13-green); border-color: var(--s13-green); color: #fff; }
.s13pay__opt input:focus-visible + span { outline: 2px solid var(--s13-green); outline-offset: 2px; }

/* ---------- Return trip ---------- */
.s13ret { margin: 0 0 12px; padding: 10px 12px; border: 1.5px solid var(--s13-line); border-radius: var(--s13-radius); }
.s13ret:has(.js-return-toggle:checked) { border-color: var(--s13-green); }
.s13ret__toggle { display: flex; align-items: center; gap: 10px; margin: 0; min-height: 36px; cursor: pointer; }
.s13ret__toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.s13ret__switch { position: relative; flex-shrink: 0; width: 42px; height: 24px; border-radius: 999px; background: #CFCABA; transition: background-color .15s ease; }
.s13ret__switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s ease; }
.s13ret__toggle input:checked ~ .s13ret__switch { background: var(--s13-green); }
.s13ret__toggle input:checked ~ .s13ret__switch::after { transform: translateX(18px); }
.s13ret__toggle input:focus-visible ~ .s13ret__switch { outline: 2px solid var(--s13-green); outline-offset: 2px; }
.s13ret__txt { min-width: 0; }
.s13ret__txt b { display: block; font: 700 14px/1.3 "Inter", sans-serif; color: var(--s13-green); }
.s13ret__txt small { display: block; font-size: 12.5px; line-height: 1.35; color: var(--s13-muted); }
.s13ret .js-return-fields { margin-top: 10px; }
.s13ret .js-return-fields .s13form__field:last-child,
.s13ret .js-return-fields .s13form__row:last-child .s13form__field { margin-bottom: 0; }
@media (max-width: 379px) { .s13ret .js-return-fields .s13form__row .s13form__field:first-child { margin-bottom: 12px; } }

/* ---------- Estimator ---------- */
.s13form--estimator .s13btn { margin-top: 2px; }

/* ---------- Confirmation ---------- */
.s13thanks { padding: 8px 0 4px; text-align: center; outline: none; }
.s13thanks__tick { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; background: var(--s13-gold); color: var(--s13-green); }
.s13thanks__title { margin: 0 0 6px; font: 800 24px/1.2 "Inter", sans-serif; color: var(--s13-green); }
.s13thanks__lede { margin: 0 0 16px; font-size: 15.5px; line-height: 1.5; color: var(--s13-green); }
.s13thanks__recap { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--s13-radius); background: var(--s13-cream); text-align: left; }
.s13thanks__row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; padding: 4px 0; font-size: 13.5px; line-height: 1.4; }
.s13thanks__row dt { margin: 0; color: var(--s13-muted); }
.s13thanks__row dd { margin: 0; font-weight: 600; color: var(--s13-green); overflow-wrap: anywhere; }
.s13thanks__help { margin: 0 0 14px; font-size: 13.5px; color: var(--s13-muted); }
.s13thanks__btns { display: grid; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
	.s13form *, .s13btn { transition: none !important; }
}

/* Small phones: a slightly smaller title so it sits beside the step pill. */
@media (max-width: 400px) { .s13form__title { font-size: 18px; } }
.s13thanks__help a, .s13fare__help a[href^="tel:"] { white-space: nowrap; }
.s13form input[name="flight_number"], .s13form input[name="return_flight_number"] { text-transform: uppercase; }
.s13form input[name="flight_number"]::placeholder, .s13form input[name="return_flight_number"]::placeholder { text-transform: none; }
