/* HPS Website — Produktions-Ergänzungen zum Design-CSS
   (ersetzt app.css des Prototyps: Container-Query-Root ohne Prototyp-Switcher) */

/* Die Seite ist ein Query-Container, damit die @container-Regeln des Designs greifen */
.hps-site { container-type: inline-size; container-name: site; }

/* hidden-Attribut gewinnt immer (Overlays/Menüs werden per JS ein-/ausgeblendet) */
[hidden] { display: none !important; }

/* Bild-Platzhalter (aus dem Design) */
.img-ph { position: relative; overflow: hidden; width: 100%; }

/* Parkobjekt-Karten: Öffnungszeiten-Text darf umbrechen (statt Live-Balken) */
.pcard-live { grid-template-columns: auto 1fr; }
.pcard-free.muted { white-space: normal; font-size: 13.5px; text-align: right; line-height: 1.35; }
.pcard-free.muted svg { vertical-align: -2px; }

/* Verbindungssuche: Datum & Uhrzeit nebeneinander (Design-Feldstil) */
.conn-datetime { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.conn-datetime .connsearch-ic { color: var(--mint-600); }
.conn-datetime input[type="date"], .conn-datetime input[type="time"] {
  border: none; outline: none; background: none; font-family: inherit;
  font-size: 16px; color: var(--text); padding: 2px 0; width: 100%;
}
@container site (max-width: 420px) {
  .conn-datetime { grid-template-columns: 1fr; }
}

/* Formular-Feedback */
.form-alert { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.form-alert.ok { background: rgba(46,158,91,.13); color: #1d7544; }
.form-alert.err { background: rgba(210,74,58,.12); color: #a8341f; }

/* Cookie-Banner (Erst-Besuch) */
.cookie-banner {
  position: fixed; left: 18px; right: 18px; bottom: 18px; z-index: 140;
  max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 20px 22px;
}
.cookie-banner h3 { display: flex; align-items: center; gap: 9px; font-size: 17px; margin-bottom: 8px; }
.cookie-banner h3 svg { color: var(--mint-600); }
.cookie-banner p { font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.cookie-banner p a { color: var(--mint-600); font-weight: 600; text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner-actions .btn { flex: 1; min-width: 140px; padding: 12px 16px; min-height: 44px; font-size: 15px; }

/* ---------- Echte Karten (Leaflet/OpenStreetMap) ---------- */
/* isolation: Leaflet nutzt intern z-index bis 1000 — ohne eigenen Stacking-Context
   legen sich Karten-Ebenen und Zoom-Buttons beim Scrollen über den Sticky-Header. */
.hps-map { position: relative; width: 100%; isolation: isolate; z-index: 0; background:
  repeating-linear-gradient(135deg, #e3edea 0 14px, #eef4f2 14px 28px); }
.hps-map .leaflet-container { width: 100%; height: 100%; border-radius: inherit; font-family: var(--font); }
.hps-map-consent {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; text-align: center;
  padding: 20px; border-radius: inherit;
  background: rgba(238,244,242,.92); backdrop-filter: blur(2px);
}
.hps-map-consent p { font-size: 14.5px; color: var(--text-2); max-width: 420px; line-height: 1.5; }
.hps-map-consent p strong { color: var(--petrol); font-size: 16px; }
.hps-map-consent a { color: var(--mint-600); font-weight: 600; text-decoration: underline; }
.hps-map-pin { cursor: pointer; }
.hps-map-marker { background: none; border: none; }
.hps-map-pop h4 { font-size: 17px; margin: 6px 0 4px; color: var(--petrol); }
.hps-map-pop .pmap-pop-meta { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); flex-wrap: wrap; margin: 0; }
.hps-map-pop .btn { font-size: 15px; padding: 11px 16px; min-height: 42px; }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow-lg); font-family: var(--font); }
.leaflet-popup-content { margin: 14px 16px; }
.hps-map-tip { background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); color: var(--petrol); font-weight: 700; font-family: var(--font); font-size: 13.5px; padding: 7px 12px; }
.leaflet-control-attribution { font-size: 10.5px; background: rgba(255,255,255,.85); }
/* Route-Button der Kontakt-Karte über den Leaflet-Ebenen halten */
.kmap-route { z-index: 900; }

/* ---------- Hinweis-Zeile über dem Hauptmenü ---------- */
.notice-topbar .notice-inner { padding: 8px 24px; }
.notice-topbar .notice-inner p { font-size: 14px; }
.notice-topbar .notice-badge { font-size: 12.5px; padding: 4px 10px; }
.notice-topbar .notice-x { width: 30px; height: 30px; }

/* ---------- Hero-Texte bündig zur Inhaltsspalte ----------
   Die Design-Vorlage begrenzt .hero-inner/.bushero-inner auf 720–760px;
   zusammen mit .wrap (margin auto) entsteht eine zentrierte Schmalbox.
   Stattdessen: volle Inhaltsbreite, Textbreite innen begrenzen. */
.hero-inner, .bushero-inner, .objd-hero-inner { max-width: var(--maxw); }
.hero-inner h1 { max-width: 760px; }
.bushero-inner h1 { max-width: 720px; }
.objd-hero-inner h1 { max-width: 760px; }
a.minimap-foot { text-decoration: none; }
a.minimap-foot:hover { background: var(--bg-mint); }

/* Fließtext-Inhalte aus dem CMS (z. B. Stellenangebote) */
.cms-richtext p { margin-bottom: 12px; font-size: 16px; color: var(--text-2); }
.cms-richtext p:last-child { margin-bottom: 0; }
.cms-richtext h3 { margin: 18px 0 8px; font-size: 19px; }
.cms-richtext ul { margin: 0 0 12px 20px; color: var(--text-2); }
.cms-richtext li { margin-bottom: 6px; }
.cms-richtext a { color: var(--mint-600); font-weight: 600; }

/* Liniennetz: Takt-Chip darf Start/Ziel nicht überlagern — bei Platzmangel
   rutscht er in eine eigene Zeile statt über den Text */
.linecard-head { row-gap: 8px; }
.linecard-od { flex: 1 1 200px; flex-wrap: wrap; }
.linecard-od strong { overflow-wrap: anywhere; }
.linecard-takt { flex: none; margin-left: auto; }

/* ---------- Linien-Fahrplanseite ---------- */
.linehead { display: flex; align-items: flex-start; gap: 18px; margin-top: 10px; }
.linehead-badge { min-width: 64px; height: 42px; font-size: 21px; flex: none; margin-top: 6px; }
.linehead h1 { font-size: clamp(26px, 3.6cqi, 40px); }
.linehead-arr { color: var(--mint-600); }
.linehead p { color: var(--text-2); margin-top: 8px; }
.linetable { min-width: 520px; }
.linetable th:first-child, .linetable td:first-child {
  position: sticky; left: 0; background: #fff; z-index: 1;
}
.linetable thead th:first-child { background: var(--bg-mint); }
.linetable td .live-dot { display: inline-block; vertical-align: 1px; }

/* ---------- Haltestellen-Übersicht ---------- */
.stopline-badge { min-width: 40px; height: 24px; font-size: 12.5px; }
.stoplist { column-width: 300px; column-gap: 28px; }
.stoplist-group { break-inside: avoid; margin-bottom: 22px; }
.stoplist-letter { font-size: 15px; color: var(--mint-600); border-bottom: 2px solid var(--bg-mint); padding-bottom: 6px; margin-bottom: 10px; }
.stoplist ul { list-style: none; margin: 0; padding: 0; }
.stoplist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.stoplist li:last-child { border-bottom: none; }
.stoplist-name { font-weight: 600; color: var(--petrol); font-size: 15px; }
.stoplist-lines { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
/* Linien-Badges im Karten-Popup */
.hps-map-pop .stopline-badge { margin-bottom: 4px; }

/* ---------- Parken: einheitliche Kacheln mit Vorschaubild/-video ---------- */
.pcard-media { position: relative; margin: -22px -22px 2px; overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0; }
.pcard-media .img-ph { display: block; }
.pcard-media video, .pcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-media .pcard-art { position: absolute; top: 12px; right: 12px; z-index: 2; box-shadow: var(--shadow); }
/* Gleiche Höhe: Beschreibung auf 2 Zeilen begrenzen, Buttons immer unten bündig */
.pcard-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.9em; }
.pcard-figures { margin-top: auto; }
.pcard { height: 100%; }

/* Parken-Kacheln: einheitliche Zonen — Kopf (2 Adresszeilen reserviert),
   Text (2 Zeilen), Merkmale variabel, Zahlen + Buttons unten fest verankert */
.pcard-titles p { align-items: flex-start; }
.pcard-titles p svg { margin-top: 2px; }
/* Kopfzone fix: Platz für 2-zeiligen Namen ODER 2-zeilige Adresse */
.pcard-head { min-height: 84px; align-items: flex-start; }
/* Zahlenzone fix: Öffnungszeiten max. 2 Zeilen (voller Text als Tooltip) */
.pcard-figures { height: 66px; align-items: center; overflow: hidden; }
.pcard-free.muted { text-align: left;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Footer: zweiter Öffnungszeiten-Block (Stadtbusbüro) */
.hps-footer-hours .hps-hours-h2 { margin-top: 18px; }

/* Newsletter-Einwilligung auf dunklem Grund */
.news-abo-consent { margin-top: 14px; color: rgba(255,255,255,.85); font-size: 13.5px; }
.news-abo-consent a { color: var(--mint); text-decoration: underline; }
.news-abo-consent .cf-check { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); }
