/* Traventuria Booking Funnel 2026/27 — mobile-first.
   Touch targets are min 44px per the spec. Layout is single-column on phones
   and widens on larger viewports. */

.traventuria-booking-calendar {
  max-width: 100%;
  --tbc-touch: 48px;
  --tbc-accent: #1f365c;
  --tbc-secondary: #ffb536;
  --tbc-border: #1f365c;
  /* Offset for the floating site header so scrollIntoView() doesn't tuck the
	   top of the widget underneath it. Override per-site if the header is taller. */
  --tbc-header-offset: 120px;
  scroll-margin-top: var(--tbc-header-offset);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: linear-gradient(to bottom right in oklab, color-mix(in oklab, var(--tbc-accent) 10%, transparent), color-mix(in oklab, var(--tbc-secondary) 10%, transparent));
  padding: 1.25rem;
  border-radius: calc(var(--tbc-touch) / 1.25);
}

.traventuria-booking-calendar__title {
  margin: 0;
  font-family: "Open Sans Condensed";
  text-transform: uppercase;
}

/* --- Sliding panels --- */
.tbc-slider {
  overflow: hidden;
}

.tbc-track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.35s ease;
}

.tbc-panel {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tbc-slider[data-panel="2"] .tbc-track {
  transform: translateX(-100%);
}

/* The off-screen panel is clipped by overflow; JS also marks it inert/aria-hidden. */

/* --- Panel navigation --- */
.tbc-nav {
  display: flex;
  gap: 0.75em;
}

.tbc-nav .tbc-continue {
  flex: 1 1 auto;
}

.tbc-back {
  flex: 0 0 auto;
  height: var(--tbc-touch);
  padding: 0.7em 1.2em;
  border: 0 none;
  border-radius: calc(var(--tbc-touch) / 2);
  font-size: 1.125rem;
  font-family: "Open Sans Condensed";
  text-transform: uppercase;
  color: var(--tbc-accent);
  background: transparent;
  cursor: pointer;
}

.tbc-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tbc-field__title {
  margin: 0;
  font-family: "Open Sans Condensed";
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tbc-accent);
}

.tbc-field__subtitle,
.tbc-field__note {
  font-family: "Open Sans";
  font-weight: 300;
  text-transform: none;
}

.tbc-field__note {
  display: block;
  padding: 0.5em 1em;
  font-weight: 500;
  color: #fff;
  background-color: var(--tbc-accent);
  border-radius: 16px;
}

.tbc-field__help {
  margin: 0;
  font-size: 0.8rem;
  color: #666;
}

.tbc-field__number-input {
  align-self: flex-start;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--tbc-border);
  border-radius: calc(var(--tbc-touch) / 2);
}

/* Text / number inputs */
/* input.tbc-input[type="number"], */
input.tbc-input[type="text"] {
  min-height: var(--tbc-touch);
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--tbc-border);
  border-radius: calc(var(--tbc-touch) / 2);
  font-size: 1.125rem;
  margin: 0;
}

input.tbc-input[type="number"] {
  height: var(--tbc-touch);
  width: 64px;
  padding: 0.5rem 1rem;
  background: transparent;
  margin: 0;
  font-family: "Open Sans Condensed";
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  color: var(--tbc-accent);
  -moz-appearance: textfield;
  border: 0 none;
}

/* WebKit and Blink */
input.tbc-input::-webkit-outer-spin-button,
input.tbc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.tbc-field__number-input-control {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  border-radius: 50%;
}

.tbc-field__number-input-control:hover {
  color: #fff;
  background: var(--tbc-accent);
}

/* The date input only drives flatpickr; the inline calendar is the visible UI. */
.tbc-input.js-range {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.traventuria-booking-calendar .flatpickr-calendar.inline {
  max-width: 100%;
}

/* --- Category cards --- */
.tbc-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
}

.tbc-card {
  color: var(--tbc-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  height: var(--tbc-touch);
  padding: 0 8px;
  border: 1px dashed var(--tbc-border);
  border-radius: calc(var(--tbc-touch) / 2);
  cursor: pointer;
}

.tbc-card:has(input:checked) {
  background: var(--tbc-accent);
  color: #fff;
}

.tbc-card input {
  display: none;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.tbc-card__body {
  display: flex;
  flex-direction: column;
}

.tbc-card__title {
  font-family: "Open Sans Condensed";
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
}

.tbc-card__sub {
  font-size: 0.85rem;
}

/* --- Comparison table (modal pop-up) --- */
.tbc-compare {
  text-align: center;
  margin-top: 0.75em;
}

.tbc-compare__open {
  min-height: var(--tbc-touch);
  border: 0 none;
  font-size: 1.125rem;
  color: var(--tbc-accent);
  background: transparent;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--tbc-secondary);
  cursor: pointer;
}

.tbc-compare__dialog {
  position: fixed;
  inset: 0;
  margin: auto; /* centers in both axes within the viewport */
  width: min(920px, calc(100vw - 1.5em));
  max-width: calc(100vw - 1.5em);
  max-height: calc(100vh - 2em);
  height: fit-content;
  padding: 0.5rem;
  color: var(--tbc-accent);
  border: 0;
  border-radius: calc((var(--tbc-touch) + 32px) / 2);
  overflow: hidden;
}

.tbc-compare__dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.tbc-compare__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  padding: 1rem 1rem 1rem 1.5rem;
}

.tbc-compare__heading {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.tbc-compare__close {
  flex: 0 0 auto;
  width: var(--tbc-touch);
  height: var(--tbc-touch);
  border: 0;
  border-radius: calc(var(--tbc-touch) / 2);
  background: transparent;
  font-size: 1.667rem;
  line-height: 0;
  padding-bottom: 4px;
  cursor: pointer;
}

.tbc-compare__close:hover {
  background: #e8eef4;
}

.tbc-compare__scroll {
  overflow: auto;
  max-height: calc(100vh - 2em - 4em);
  padding: 1em;
}

table.tbc-compare__table {
  width: 100%;
  border: 0 none;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 0;
}

.tbc-compare__table th,
.tbc-compare__table td {
  border: 0 none;
  padding: 0.5em 0.75em;
  text-align: left;
  vertical-align: top;
}

.tbc-compare__table th {
  font-family: "Open Sans Condensed";
}

.tbc-compare__table tbody tr:nth-of-type(odd) {
  border-radius: 4px;
  background-color: #e8eef4;
}

/* --- Button quiz --- */
.tbc-quiz {
  margin: 0;
  padding: 0;
  border: 0;
}

.tbc-quiz__options {
  display: flex;
  gap: 0.75em;
  margin-top: 0.333em;
}

/* Styled radio pills: the native input drives state, CSS shows the selection. */
.tbc-quiz__opt {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--tbc-touch);
  padding: 0 8px;
  border: 1px dashed var(--tbc-border);
  border-radius: calc(var(--tbc-touch) / 2);
  font-size: 1.125rem;
  font-family: "Open Sans Condensed";
  text-transform: uppercase;
  color: var(--tbc-accent);
  cursor: pointer;
}

.tbc-quiz__opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.tbc-quiz__opt:has(input:checked) {
  border-color: var(--tbc-accent);
  background: var(--tbc-accent);
  color: #fff;
}

.tbc-quiz__opt:has(:focus-visible) {
  outline: 2px solid var(--tbc-accent);
  outline-offset: 2px;
}

/* --- Continue button --- */
.tbc-continue {
  height: var(--tbc-touch);
  padding: 8px 64px;
  border: 0;
  border-radius: calc(var(--tbc-touch) / 2);
  background: var(--tbc-accent);
  color: #fff;
  font-family: "Open Sans Condensed";
  text-transform: uppercase;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
}

.tbc-continue:disabled {
  background: #bfc5c2;
  cursor: not-allowed;
}

.traventuria-booking-calendar__error {
  margin: 0.25em 0 0;
  color: #c0392b;
  font-size: 0.9em;
}

/* --- Wider viewports --- */
@media (min-width: 640px) {
  .tbc-cards {
    flex-direction: row;
  }

  .tbc-card {
    flex: 1 1 0;
  }
}

/* -------------------------------------------------------------------------
   Private tuition calculator (second element).
   Renders inside the .traventuria-booking-calendar shell, so it inherits the
   gradient, fonts, field/title/note/button styles and flatpickr theme. Only
   the two range sliders and the price line need their own rules.
   ---------------------------------------------------------------------- */
.traventuria-tuition {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.traventuria-tuition > * {
  margin: 0;
}

.tbc-tuition__subtitle {
  margin: 0;
}

.tbc-tuition__step .tbc-field__subtitle {
  color: var(--tbc-accent);
  font-weight: 600;
}

/* Range sliders in the calendar palette (navy thumb on a soft track). */
input.tbc-tuition__range.tbc-tuition__range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  margin-bottom: 0;
  padding: 4px;
  border-radius: 999px;
  border: 0 none;
  background: #fff;
  outline: none;
  cursor: pointer;
}

.tbc-tuition__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tbc-accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--tbc-accent);
  cursor: pointer;
}

.tbc-tuition__range::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tbc-accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--tbc-accent);
  cursor: pointer;
}

.tbc-tuition__range:focus-visible {
  box-shadow: 0 0 0 3px rgba(31, 54, 92, 0.3);
}

.tbc-tuition__ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  font-family: "Open Sans Condensed", "Open Sans", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--tbc-accent);
  opacity: 0.55;
}

.traventuria-tuition .flatpickr-calendar.inline {
  margin: 0;
}

.tbc-tuition__total {
  gap: 0.15rem;
}

.tbc-tuition__price {
  font-family: "Open Sans Condensed", "Open Sans", sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--tbc-accent);
}

.tbc-tuition__price-sub {
  font-size: 0.9rem;
  color: var(--tbc-accent);
  opacity: 0.7;
}

.tbc-tuition__total__container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}
