/* ════════════════════════════════════════════════════════════════
   TICKETS & ANFAHRT PAGE
   Page-specific styles for the tickets, pricing, arrival, and
   hall rules overview.
   ════════════════════════════════════════════════════════════════ */

/* ── Page header (tickets extras) ── */
.page-header {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.page-header__badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-self: flex-start;
  margin-top: auto;
  flex-shrink: 0;
}
.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}
.header-badge svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Section divider ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
}
.section-header__label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}
.section-header__line {
  height: 1px;
  flex: 1;
  background: var(--border);
}

/* ── Card inner padding ── */
.card-pad {
  padding: 32px 40px;
}

/* ── Card headings ──
   .card-eyebrow is a tiny uppercase tag site-wide (meant for short category
   labels), but on this page it's doing the job of a real section title
   ("So kommst du zu uns", "Was ist erlaubt?") — give it heading weight and
   close the gap to the content below it. */
.card-eyebrow {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
  margin-bottom: 14px;
}

/* ── Price section layout ──
   Three pieces (toggle / seating plan / price list) placed via named grid
   areas so they can be reordered per breakpoint without duplicating markup.
   Desktop: toggle spans the top, plan + list split into two columns below.
   Mobile: plan first, then the toggle, then the list. */
.price-block {
  display: grid;
  gap: 24px 36px;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  grid-template-areas:
    "toggle toggle"
    "plan   list";
  align-items: start;
}
.price-toggle-area {
  grid-area: toggle;
}
.price-plan-area {
  grid-area: plan;
}
.price-list-area {
  grid-area: list;
}

/* Built from .seg (same segmented-control component as the map's view/
   transport toggles, defined below) — two modes: Pre-Season / Meisterschaft. */
.price-toggle-area .seg {
  margin-bottom: 0;
}

/* Same left-bar treatment as .parking-notice / .hausordnung-note / article
   blockquotes — no box, no background, just an accent rule. Overrides the
   border-top version in main.css. */
.teilzahler-note {
  border-top: none;
  border-left: 3px solid var(--navy);
  padding-top: 0;
  padding-left: 14px;
  margin-top: 20px;
}

/* ── Benefits grid (Extras section) ── */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.benefit-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.benefit-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink-faint);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benefit-icon svg {
  width: 18px;
  height: 18px;
}

.benefit-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.benefit-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.benefit-desc {
  font-size: 0.82rem;
  color: var(--ink-dim);
  line-height: 1.6;
}

.benefit-desc a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--border);
}

.benefit-desc a:hover {
  color: var(--ink);
}

/* ── Arrival: flat columns, one hairline between them (no boxes-in-boxes) ── */
.routes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.routes > section + section {
  border-left: 1px solid var(--border);
  padding-left: 40px;
}

.route__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
/* Matches .benefit-icon from the "Mehr als ein Ticket" card above. */
.route__icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink-faint);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.route__icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.route__label {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.route__sub {
  font-size: 0.74rem;
  color: var(--ink-dim);
  margin-top: 1px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.step__key {
  flex-shrink: 0;
  min-width: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
  padding-top: 1px;
}
.step__key--line {
  min-width: 34px;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.step__text {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.step__text strong {
  font-weight: 700;
  color: var(--ink);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* One neutral style for every link here — Apple/Google, VVS/bwegt are
   equally valid choices, not a primary-vs-alternative pair, so nothing
   should look more "clickable" than the other. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 9px;
  background: var(--ink-faint);
  color: var(--ink-soft);
  transition:
    background 0.15s,
    color 0.15s;
  white-space: nowrap;
}
.btn:hover {
  background: var(--border);
  color: var(--ink);
}
.btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Parking notice ── */
.parking-notice {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.65;
  border-left: 3px solid var(--gold);
  padding-left: 14px;
  margin-top: 4px;
}
.parking-notice strong {
  font-weight: 700;
  color: var(--ink);
}

/* ── Map: one bordered unit, canvas + control bar, nothing floats on it ── */
.map-unit {
  position: relative; /* .map-consent (inset:0) covers this whole unit, not just the canvas */
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.map-unit__canvas {
  position: relative;
  background: #e8ecf0;
}

.map-unit__canvas #map {
  width: 100%;
  height: 420px;
  border: none;
  display: block;
}

.map-bar {
  border-top: 1.5px solid var(--border);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  flex-wrap: wrap;
}

.map-bar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Wraps the segmented mode-buttons + the ETA text as two separate, clearly
   distinct pieces — the ETA is not a pill segment, just adjacent text. */
.route-info {
  align-items: center;
  gap: 14px;
}

/* Segmented control — one reusable component. Used by the map's view toggle,
   the map's transport-mode group, AND the Ticketpreise mode toggle
   (.price-toggle-area .seg). Not scoped to .map-bar, since it's shared
   outside the map entirely. main.css resets all <button> chrome (border,
   background, padding) globally, so this has to supply all of it itself. */
.seg {
  display: inline-flex;
  align-items: center;
  background: var(--ink-faint);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}

.seg button {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink-dim);
  background: none;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}

.seg button:hover:not(.active) {
  color: var(--ink-soft);
}

.seg button.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.map-eta {
  font-size: 0.72rem;
  color: var(--ink-dim);
  font-weight: 600;
  white-space: nowrap;
}
.map-eta b {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
/* tickets.js hardcodes style="color:#fff" on the ÖPNV "DB →" link — it made
   sense against the old solid-navy pill, but is unreadable on this light
   background. !important is required to win over that inline style. */
.map-eta a {
  color: var(--navy) !important;
}

/* Hidden until "Mein Standort" actually requests a route — tickets.js sets
   style.display = "flex"/"none" directly (inline style always wins over
   this), so this is purely the correct pre-JS/initial state. */
#mapRouteInfo {
  display: none;
}

.map-location-denied {
  display: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--red);
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}

/* ── Map GDPR consent overlay ──
   Not a centred hero card — a plain, left-aligned panel, same register as
   the rest of the page's prose (parking notice, Hallenordnung note). No
   icon, no photo, no veil; description and legal line are one paragraph. */
.map-consent {
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  border-radius: inherit;
  transition: opacity 0.25s;
  background: var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.map-consent.is-hidden {
  display: none;
}
.map-consent__panel {
  max-width: 420px;
  width: 100%;
}
.map-consent__desc {
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 16px;
  text-align: left;
}
.map-consent__desc strong {
  color: var(--ink);
}
.map-consent__desc a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.map-consent__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--navy);
  color: var(--text-white);
  padding: 11px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.map-consent__btn:hover {
  background: var(--navy-mid);
}
.map-consent__btn:focus-visible {
  outline: 2px solid var(--card);
  outline-offset: 3px;
}

/* ── Allowed items ── */
.allowed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.allowed-col + .allowed-col {
  border-left: 1px solid var(--border);
  padding-left: 32px;
  margin-left: 4px;
}
.allowed-col__heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.allowed-col__heading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.allowed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.allowed-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.allowed-item__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.allowed-item__icon--yes {
  background: rgba(26, 107, 58, 0.1);
}
.allowed-item__icon--no {
  background: rgba(231, 78, 110, 0.1);
}
.allowed-item__icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.allowed-item__icon--yes svg {
  stroke: var(--green);
}
.allowed-item__icon--no svg {
  stroke: var(--red);
}
.allowed-item__text {
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.5;
  padding-top: 4px;
}
.allowed-item__text strong {
  font-weight: 700;
  color: var(--ink);
  display: block;
  font-size: 0.86rem;
}

/* ── Hausordnung source note ── */
.hausordnung-note {
  font-size: 0.78rem;
  color: var(--ink-dim);
  line-height: 1.6;
  border-left: 3px solid var(--navy);
  padding-left: 14px;
  margin-top: 20px;
}
.hausordnung-note strong {
  font-weight: 700;
  color: var(--ink-soft);
}

/* ── Footnotes override (wider than main.css default to match .card-pad) ── */
.footnotes-block {
  padding: 0 40px 8px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  /* Price section: plan first, then the toggle, then the list. */
  .price-block {
    grid-template-columns: 1fr;
    grid-template-areas:
      "plan"
      "toggle"
      "list";
  }
  .page-header__badges {
    display: none;
  }
}

@media (max-width: 640px) {
  .card-pad {
    padding: 20px 18px;
  }
  .footnotes-block {
    padding: 0 18px 8px;
  }
  .benefit-grid {
    grid-template-columns: 1fr;
  }
  .allowed-grid {
    grid-template-columns: 1fr;
  }
  .allowed-col + .allowed-col {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-top: 8px;
  }
}

@media (max-width: 720px) {
  .routes {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .routes > section + section {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 28px;
  }

  .map-unit__canvas #map {
    height: 300px;
  }
  .map-consent {
    padding: 20px;
  }
  .map-consent__desc {
    font-size: 0.82rem;
  }

  /* Two full-width rows instead of trying to fit both groups side by side. */
  .map-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .map-bar .seg {
    width: 100%;
    justify-content: center;
  }
  .map-bar .seg button {
    flex: 1;
    text-align: center;
  }
  .map-bar__right {
    margin-left: 0;
    width: 100%;
  }
  .route-info {
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }
  .map-eta {
    text-align: center;
  }

  .route__header {
    gap: 10px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .actions .btn {
    justify-content: center;
  }
}
