/* Locals Guide booking flow, step 1: the booking card on the tour page (date list, Travellers stepper, price line,
 * cancellation line, Reserve) and the header "My bookings" link. Loaded after app.css by ggt_theme_assets().
 * Same tokens as app.css; selectors scoped under body.ggt-theme like app.css. */

/* ---------- Header: "My bookings" / "Dashboard" where the cart used to be ---------- */
body.ggt-theme .ggt-header__trips .ggt-icon { width: 22px; height: 22px; }
@media (min-width: 1024px) {
	body.ggt-theme .ggt-header__trips .ggt-icon { display: none; }
}

/* ---------- Tall booking card: the sticky column scrolls inside itself instead of hiding the button ---------- */
@media (min-width: 1024px) {
	body.ggt-theme .ggt-tour__aside { max-height: calc(100vh - var(--ggt-header-h) - 40px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-radius: var(--ggt-radius); }
	body.ggt-theme.admin-bar .ggt-tour__aside { max-height: calc(100vh - var(--ggt-header-h) - 72px); }
}

/* ---------- Form rhythm ---------- */
body.ggt-theme .ggt-reserve { gap: 20px; }
body.ggt-theme .ggt-reserve__group { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
body.ggt-theme .ggt-reserve__legend { display: block; float: left; width: 100%; padding: 0; margin: 0 0 2px; }
body.ggt-theme .ggt-reserve__legend + * { clear: both; }
body.ggt-theme .ggt-reserve .ggt-label { font-size: 14px; font-weight: 700; color: var(--ggt-ink); letter-spacing: 0; }
body.ggt-theme .ggt-reserve .ggt-booking__hint { min-height: 0; margin: 0; font-size: 13px; line-height: 1.45; }
body.ggt-theme .ggt-reserve .ggt-booking__hint:empty { display: none; }

/* ---------- Date list ---------- */
body.ggt-theme .ggt-dates__zone { margin: 0; font-size: 13px; line-height: 1.4; color: var(--ggt-muted); }
body.ggt-theme .ggt-dates__list { display: grid; gap: 8px; margin: 2px 0 0; }
body.ggt-theme .ggt-dates.is-collapsed .ggt-date.is-extra { display: none; }
body.ggt-theme .ggt-dates:not(.is-collapsed) .ggt-dates__list:has(.is-extra) { max-height: 332px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px 4px 2px 2px; margin: 0 -4px 0 -2px; }
body.ggt-theme .ggt-date {
	position: relative;
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr) auto;
	align-items: center;
	gap: 4px 12px;
	padding: 11px 14px;
	background: var(--ggt-paper);
	border: 1px solid var(--ggt-line-strong);
	border-radius: var(--ggt-radius-md);
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
body.ggt-theme .ggt-date:hover { border-color: var(--ggt-accent-line); }
body.ggt-theme .ggt-date.is-selected, body.ggt-theme .ggt-date:has(.ggt-date__radio:checked) { border-color: var(--ggt-accent); background: var(--ggt-accent-soft); box-shadow: inset 0 0 0 1px var(--ggt-accent); }
body.ggt-theme .ggt-date__radio {
	-webkit-appearance: none;
	appearance: none;
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 2px solid var(--ggt-line-strong);
	border-radius: 50%;
	background: var(--ggt-paper);
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}
body.ggt-theme .ggt-date__radio:checked { border-color: var(--ggt-accent); background: var(--ggt-accent); box-shadow: inset 0 0 0 3px var(--ggt-paper); }
body.ggt-theme .ggt-date__radio:focus-visible { outline: 0; box-shadow: var(--ggt-focus); }
body.ggt-theme .ggt-date__radio:checked:focus-visible { box-shadow: inset 0 0 0 3px var(--ggt-paper), var(--ggt-focus); }
body.ggt-theme .ggt-date__when, body.ggt-theme .ggt-date__side { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
body.ggt-theme .ggt-date__side { align-items: flex-end; text-align: right; }
body.ggt-theme .ggt-date__day { font-size: 15px; font-weight: 700; color: var(--ggt-ink); }
body.ggt-theme .ggt-date__time { font-size: 13px; color: var(--ggt-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ggt-theme .ggt-date__price { font-size: 15px; font-weight: 700; color: var(--ggt-ink); white-space: nowrap; }
body.ggt-theme .ggt-date__seats { font-size: 12.5px; color: var(--ggt-muted); white-space: nowrap; }
body.ggt-theme .ggt-date__seats.is-low { color: var(--ggt-warning-ink); font-weight: 600; }
body.ggt-theme .ggt-date__tag { grid-column: 2 / -1; justify-self: start; padding: 1px 8px; border-radius: var(--ggt-pill); background: var(--ggt-success-soft); color: var(--ggt-success-ink); font-size: 12px; font-weight: 600; line-height: 1.6; }
body.ggt-theme .ggt-dates__more { align-self: flex-start; display: inline-flex; align-items: center; min-height: 36px; padding: 4px 0; background: none; border: 0; color: var(--ggt-accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--ggt-accent-line); text-underline-offset: 3px; }
body.ggt-theme .ggt-dates__more:hover { color: var(--ggt-accent-hover); text-decoration-color: currentColor; }
body.ggt-theme .ggt-dates__more[hidden] { display: none; }

/* ---------- Travellers stepper ---------- */
body.ggt-theme .ggt-reserve__group--stepper { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding-top: 16px; border-top: 1px solid var(--ggt-line); }
body.ggt-theme .ggt-reserve__group--stepper + .ggt-reserve__group--stepper { padding-top: 0; border-top: 0; }
body.ggt-theme .ggt-reserve__cap { grid-column: 1 / -1; margin: 0; font-size: 13px; line-height: 1.45; color: var(--ggt-muted); }
body.ggt-theme .ggt-reserve__cap:empty { display: none; }
body.ggt-theme .ggt-stepper { display: inline-flex; align-items: center; gap: 4px; }
body.ggt-theme .ggt-stepper__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--ggt-line-strong);
	border-radius: 50%;
	background: var(--ggt-paper);
	color: var(--ggt-ink);
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease;
}
body.ggt-theme .ggt-stepper__btn:hover:not(:disabled) { border-color: var(--ggt-ink); }
body.ggt-theme .ggt-stepper__btn:focus-visible { outline: 0; box-shadow: var(--ggt-focus); }
body.ggt-theme .ggt-stepper__btn:disabled { color: var(--ggt-line-strong); border-color: var(--ggt-line); cursor: not-allowed; }
body.ggt-theme .ggt-stepper__input {
	-moz-appearance: textfield;
	appearance: textfield;
	width: 44px;
	min-height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ggt-ink);
	font-family: var(--ggt-font-display);
	font-size: 18px;
	font-weight: 800;
	text-align: center;
}
body.ggt-theme .ggt-stepper__input::-webkit-outer-spin-button, body.ggt-theme .ggt-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
body.ggt-theme .ggt-stepper__input:focus-visible { outline: 0; box-shadow: var(--ggt-focus); border-radius: var(--ggt-radius-sm); }

/* ---------- Price line + cancellation ---------- */
body.ggt-theme .ggt-reserve__sum { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--ggt-line); }
body.ggt-theme .ggt-reserve .ggt-booking__total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin: 0; padding: 0; border: 0; font-size: 15px; font-weight: 600; color: var(--ggt-ink); }
body.ggt-theme .ggt-booking__total-value { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 2px 8px; margin-left: auto; text-align: right; }
body.ggt-theme .ggt-booking__calc { font-size: 14px; font-weight: 500; color: var(--ggt-ink-2); white-space: nowrap; }
body.ggt-theme .ggt-booking__calc:empty { display: none; }
body.ggt-theme .ggt-reserve .ggt-booking__total strong { font-family: var(--ggt-font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.01em; color: var(--ggt-ink); white-space: nowrap; }
body.ggt-theme .ggt-reserve__cancel { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--ggt-success-ink); }
body.ggt-theme .ggt-reserve__cancel svg { flex: none; margin-top: 1px; }
body.ggt-theme .ggt-reserve__cancel.is-none { font-weight: 500; color: var(--ggt-muted); }
body.ggt-theme .ggt-reserve__cancel.is-none svg { display: none; }
body.ggt-theme .ggt-reserve__cancel[hidden] { display: none; }

/* ---------- Reserve ---------- */
body.ggt-theme .ggt-reserve .ggt-reserve__submit { width: 100%; min-height: 54px; font-size: 17px; font-weight: 700; }
body.ggt-theme .ggt-reserve .ggt-reserve__submit[aria-busy="true"] { opacity: .75; cursor: progress; }
body.ggt-theme .ggt-reserve__next { margin: -8px 0 0; font-size: 13px; line-height: 1.4; text-align: center; color: var(--ggt-muted); }

@media (prefers-reduced-motion: reduce) {
	body.ggt-theme .ggt-date, body.ggt-theme .ggt-date__radio, body.ggt-theme .ggt-stepper__btn { transition: none; }
}
