/* Self-hosted fonts (drop files into ./fonts and adjust paths)
   For now we fall back to system fonts if these files don't exist yet.
*/
@font-face {
  font-family: "PFMQuestionnaire";
  src: url("./fonts/PFMQuestionnaire-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PFMQuestionnaire";
  src: url("./fonts/PFMQuestionnaire-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --brand: #2563eb;
  --shadow: 0 10px 25px rgba(2, 6, 23, 0.08);

  --radius: 18px;
  --gap: 14px;
  --maxw: 980px;

  /* "juicy" typography */
  --font: "PFMQuestionnaire", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --h1: clamp(28px, 4vw, 40px);
  --h2: clamp(20px, 3vw, 26px);
  --body: 18px;
  --btn: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--body);
  line-height: 1.35;
  background-color: var(--bg);
  background-image: url("/sqlite/register/contact-background.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: none !important;
}

.app {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px;
  position: relative;
  z-index: 1;
}

.app__header {
  margin: 8px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.app__headerMain {
  flex: 1 1 auto;
  min-width: 0;
}

.app__headerLogo {
  flex: 0 0 auto;
  /* Pull the logo slightly away from the extreme right edge */
  margin-right: 18px;
}

.app__headerLogo img {
  /* Bigger + cleaner (no white box) */
  max-height: 74px;
  width: auto;
  object-fit: contain;

  background: transparent;
  padding: 0;
  border-radius: 0;

  /* Subtle depth even with transparent PNG */
  filter: drop-shadow(0 10px 22px rgba(15,23,42,0.22));
}

.brand__title {
  font-size: var(--h1);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand__subtitle {
  margin-top: 6px;
  color: rgba(255,255,255,0.82);
}

.progress {
  margin-top: 14px;
  height: 10px;
  border-radius: 999px;
  background: #e8eefc;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #60a5fa);
  width: 0%;
  transition: width 220ms ease;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 18px;
  grid-template-columns: 1.6fr 1fr;
  position: relative;
  overflow: clip;
}

/* (final page background moved to body + page reveal; no card background override) */


@media (max-width: 860px) {
  .card { grid-template-columns: 1fr; }
}

.card__left { min-width: 0; }
.card__right {
  border-left: 1px solid var(--border);
  padding-left: 16px;
}

/* Sticky “Current plan” on desktop/tablet only (normal flow on mobile) */
@media (min-width: 861px) {
  .card__right {
    position: sticky;
    top: 16px;
    align-self: start;
  }
}

@media (max-width: 860px) {
  .card__right { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 14px; }
}

.h2 { font-size: var(--h2); font-weight: 600; margin: 0 0 10px; }
.p { margin: 0 0 12px; color: var(--muted); }

.field {
  margin: 14px 0;
}

.label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.input, .select {
  width: 100%;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-size: 18px;
  background: #fff;
}

.choiceGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 520px) {
  .choiceGrid { grid-template-columns: 1fr; }
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.choice:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(2,6,23,0.08); }
.choice--active { border-color: rgba(37,99,235,0.55); box-shadow: 0 10px 22px rgba(37,99,235,0.18); }
.choice__emoji { font-size: 22px; }
.choice__title { font-weight: 600; }
.choice__desc { color: var(--muted); font-size: 15px; margin-top: 2px; }

.nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  font-family: var(--font);
  font-size: var(--btn);
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(37,99,235,0.35);
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  flex: 1;
}

/* links inside info text */
.a, a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn--ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--border);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.summary__title { font-weight: 600; font-size: 18px; margin-bottom: 10px; }
.summary__items { display: grid; gap: 8px; }
.summaryItem {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.summaryItem__k { color: var(--muted); }
.summaryItem__v { font-weight: 600; }

.tiny { color: var(--muted); font-size: 14px; }

.summary__total {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.summary__totalLabel { color: var(--muted); }
.summary__totalValue { font-size: 22px; font-weight: 700; }

.upgradeGroup {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.upgradeGroup__title {
  font-weight: 700;
  margin-bottom: 10px;
}

.opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0;
  color: var(--ink);
}

.opt input { margin-top: 4px; }

/* qty controls for rentals */
.optQty {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 8px;
  background: #f8fafc;
}

.qty__btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.qty__num {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
}

.upgradeTotals {
  margin-top: 16px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.upgradeTotals__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0;
}

.tiny { font-size: 13px; color: var(--muted); margin-top: 10px; }
.app__footer { margin-top: 14px; }

/* Extra scroll area at the bottom of the FINAL page to reveal the background image */
.pageReveal {
  height: 90vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
}

.pageReveal__credit {
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
}
.directionToggle {
  display: inline-flex;
  border: 1px solid #cbd5f5;
  border-radius: 14px;
  overflow: hidden;
  margin: 10px 0 18px;
}
.directionToggle button {
  border: none;
  background: transparent;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  color: var(--brand);
}
.directionToggle button.active {
  background: var(--brand);
  color: #fff;
}

.tourList {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: auto;
  max-height: none;
  overflow: visible;
}


/* ════════════════════════════════════════════════════════
   TOUR SELECT LAYOUT — clean rules, written 2026-03-02
   ════════════════════════════════════════════════════════ */

/* ── Direction toggle ───────────────────────────────────── */
.directionToggle {
  display: inline-flex;
  border: 1px solid #cbd5f5;
  border-radius: 14px;
  overflow: hidden;
  margin: 10px 0 18px;
}
.directionToggle button {
  border: none;
  background: transparent;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  color: var(--brand);
}
.directionToggle button.active {
  background: var(--brand);
  color: #fff;
}

/* ── Tour list ──────────────────────────────────────────── */
.tourList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Tour row: flex column so header and detail stack ───── */
.tourSelectLayout .tourRow {
  display: flex !important;
  flex-direction: column;
  gap: 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  transition: border-color 120ms, box-shadow 120ms;
}
.tourSelectLayout .tourRow.active {
  border-color: #2563eb;
  box-shadow: 0 4px 18px rgba(37,99,235,0.12);
}
.tourSelectLayout .tourRow__header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.tourSelectLayout .tourRow__header label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
}
.tourSelectLayout .tourRow__header input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.tourPrice {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  color: var(--brand);
}
.tourSelectLayout .tourRow__detail {
  border-top: 1px dashed #e2e8f0;
  margin-top: 12px;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
}
.tourSelectLayout .tourRow__detail label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tourSelectLayout .tourRow__detail input[type="date"],
.tourSelectLayout .tourRow__detail input[type="number"] {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  width: auto;
  max-width: 220px;
}
.tourSelectLayout .tourRow__detail textarea {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
  width: 100%;
  resize: vertical;
  min-height: 60px;
}
.tourDaysFixed {
  font-size: 0.85rem;
  color: #475569;
}

/* ── Selected tours summary box ────────────────────────── */
.tourSelectCard__selected {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.summaryBox--tours { margin-top: 12px; }

/* ── Calendar strip host: full width above card ─────────── */
#calendarStripHost {
  width: 100%;
  margin: 0 0 16px;
  position: static; /* sticky only on desktop, see below */
}
#calendarStripHost:empty { margin: 0; }

.card.card--calendar {
  display: block;
  grid-template-columns: none;
  padding: 8px 16px 12px;
}
.card.card--calendar h2 {
  margin: 0 0 2px;
  font-size: 0.95rem;
  font-weight: 600;
}
.card.card--calendar .tiny {
  margin: 0 0 8px;
  font-size: 0.78rem;
}

/* ── Calendar box & day cells ───────────────────────────── */
.calendarBox {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 10px;
}
.calendarBox .calendarStrip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
.calendarBox .dayCell {
  flex: 1 1 0;
  min-width: 70px;
  max-width: 160px;
  border-radius: 10px;
  padding: 6px;
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
  border: 1px solid transparent;
}
.calendarBox .dayCell span {
  display: block;
  font-size: 11px;
}
.calendarBox .dayCell.rest {
  background: #f1f5f9;
  color: #475569;
  border-style: dashed;
  border-color: #cbd5e1;
}
.calendarBox .dayCell.tourA {
  background: #dbeafe;
  color: #1d4ed8;
}
.calendarBox .dayCell.tourB {
  background: #fee2e2;
  color: #b91c1c;
}
/* Fire engine red for overlapping days */
.calendarBox .dayCell.overlap,
.calendarBox .dayCell.tourA.overlap,
.calendarBox .dayCell.tourB.overlap {
  background: #cc1111 !important;
  color: #fff !important;
  border: 2px solid #990000 !important;
  font-weight: 700;
}
/* Overlap warning banner */
.overlapWarning {
  background: #fff1f1;
  border: 1px solid #f87171;
  border-radius: 10px;
  padding: 8px 14px;
  color: #b91c1c;
  font-size: 0.88rem;
  margin-top: 10px;
}

/* ── Tour-select step: grid layout & sticky right ──────── */
body.body--tour-select .card {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) clamp(260px, 26vw, 340px);
  gap: 28px;
  align-items: start;
  overflow: visible !important;
}
body.body--tour-select,
body.body--tour-select .card__left,
body.body--tour-select #stepHost,
body.body--tour-select .tourSelectLayout,
body.body--tour-select .tourSelectMain,
body.body--tour-select .tourSelectCard--list {
  overflow: visible !important;
  width: 100%;
}
body.body--tour-select aside.card__right {
  position: sticky;
  top: 130px; /* sits below the sticky calendar (~100px) + small gap */
  align-self: start;
  font-size: 0.88rem;
}
@media (min-width: 861px) {
  body.body--tour-select #calendarStripHost {
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 18px;
    background: var(--bg);
    padding-bottom: 4px;
  }
}

/* ── MOBILE: single column, right panel moves to bottom, no sticky ── */
@media (max-width: 860px) {
  body.body--tour-select .card {
    grid-template-columns: 1fr;   /* stack into one column */
    gap: 20px;
  }
  body.body--tour-select aside.card__right {
    position: static;             /* not sticky on mobile */
    top: auto;
    border-top: 2px solid var(--border);
    padding-top: 18px;
    margin-top: 8px;
    order: 2;                     /* appears after left column */
  }
  body.body--tour-select .card__left {
    order: 1;
  }
  /* calendar is already static on mobile (default in base rule) */
}

/* ── Summary panel (right side) tweaks for tour step ───── */
body.body--tour-select .summary__title { font-size: 0.95rem; margin-bottom: 6px; }
body.body--tour-select .summary__items { gap: 5px; }
body.body--tour-select .summaryToursList { font-size: 0.88rem; gap: 6px; }
body.body--tour-select .summaryTour__price { font-size: 0.88rem; }

.summary__subtitle {
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.92rem;
}
.summaryToursList {
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.summaryTour {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}
.summaryTour__name { font-weight: 600; }
.summaryTour__price { font-weight: 600; color: var(--brand); }
.summaryTour__note { font-size: 0.75rem; color: var(--muted); margin-top: -4px; }
body.body--tour-select #summaryUpgrades .summaryToursList { background: #eef2ff; }
