/* =====================================================================
   PegelAlert – Theme: marina
   "Coastal Command" — nautisches Design für Yachtbesitzer.
   Aktivieren: /?theme=marina
   ===================================================================== */

/* ---- Farbpalette ---- */
:root {
  --pa-navy:    #0d1b2a;   /* Tiefsee: Header */
  --pa-ocean:   #0a4d8c;   /* Ozean: Primärfarbe */
  --pa-wave:    #1976d2;   /* Welle: Hover / aktiv */
  --pa-sky:     #e8f4fd;   /* Himmel: Highlight-Hintergründe */
  --pa-foam:    #f2f7fc;   /* Schaum: Seiten-Hintergrund */
  --pa-card:    #ffffff;
  --pa-text:    #1a2738;
  --pa-muted:   #5a7a8f;  
  --pa-border:  #c8d8e8;
  --pa-shadow:  0 2px 14px rgba(13, 27, 42, 0.1);
  --pa-radius:  10px;
}

/* ---- Seite ---- */
body {
  background: var(--pa-foam);
  color: var(--pa-text);
}

/* ---- Header: volle Breite, dunkles Marineblau ---- */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;

  /* Full-bleed: gleiche Technik wie #about-pegelalert */
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: -1rem;        /* Container-top-padding ausgleichen */
  padding: 0.875rem 1.25rem;
  box-sizing: border-box;

  background: var(--pa-navy);
  background-image: linear-gradient(160deg, #0d1b2a 0%, #0e2a45 55%, #0a3d62 100%);
  border-bottom: 3px solid var(--pa-ocean);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.site-logo {
  height: 32px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.site-title { margin: 0; }

.site-title-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.site-spacer { margin-left: auto; }

.site-imprint {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.15s;
}
.site-imprint:hover { color: rgba(255, 255, 255, 0.9); }

/* HR nach Header: dezente Linie */
main > hr {
  border: none;
  border-top: 1px solid var(--pa-border);
  margin: 0 0 1.5rem;
}

/* ---- Stations-Trigger ---- */
.ghost-trigger {
  all: unset;
  font: inherit;
  font-weight: 600;
  color: var(--pa-ocean);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.ghost-trigger::after {
  content: " ▾";
  font-size: 0.7em;
  opacity: 0.65;
  margin-left: 2px;
}
.ghost-trigger:hover {
  color: var(--pa-wave);
  border-bottom-color: var(--pa-wave);
}
.ghost-trigger:focus-visible {
  outline: 2px solid var(--pa-wave);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---- Stations-Popover ---- */
#stationFilter {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--pa-border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font: inherit;
  background: var(--pa-foam);
  transition: border-color 0.15s, box-shadow 0.15s;
}
#stationFilter:focus {
  border-color: var(--pa-wave);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
  outline: none;
}

#stationList li + li { margin-top: 2px; }

.station-option {
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.85rem;
  border: none;
  background: transparent;
  border-radius: 7px;
  font: inherit;
  cursor: pointer;
  color: var(--pa-text);
  transition: background 0.12s, color 0.12s;
}
.station-option:hover,
.station-option:focus {
  background: var(--pa-sky);
  color: var(--pa-ocean);
  outline: none;
}

/* ---- Karte: Rahmen & Schatten ---- */
#map {
  border-radius: var(--pa-radius);
  border: 1.5px solid var(--pa-border);
  box-shadow: var(--pa-shadow);
  overflow: hidden;
}

/* ---- Stations-Card ---- */
.card {
  padding: 1.25rem 1.5rem;
  background: var(--pa-card);
  border-radius: var(--pa-radius);
  border: 1px solid var(--pa-border);
  box-shadow: var(--pa-shadow);
}

#station-panel section { margin-bottom: 1.25rem; }

/* Stationsname */
.station-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pa-navy);
  margin-bottom: 0.15rem;
  line-height: 1.2;
}

/* Koordinaten: wie Instrumenten-Anzeige */
.station-coords {
  color: var(--pa-muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  margin-top: 0;
}

/* Abschnitts-Label: small caps, gedämpft */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pa-muted);
  margin-bottom: 0.8rem;
  padding-bottom: 0.45rem;
  border-bottom: 1.5px solid var(--pa-border);
}

/* HR im Panel */
.panel-divider {
  border: none;
  border-top: 1px solid var(--pa-border);
  margin: 0.75rem 0;
}

/* Abbildungen */
.figure-caption {
  margin-top: 0.4rem;
  color: var(--pa-muted);
  font-size: 0.7rem;
  width: 100%;
  text-align: center;
}

/* Kein-Plot-Hinweis */
.no-plot-notice {
  color: var(--pa-muted);
  font-size: 0.875rem;
  font-style: italic;
}

/* CSV Download */
a[role="button"].secondary {
  background: transparent;
  border: 1.5px solid var(--pa-ocean);
  color: var(--pa-ocean);
  border-radius: 7px;
  padding: 0.3rem 0.85rem;
  font-size: 0.875rem;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
}
a[role="button"].secondary:hover { background: var(--pa-sky); }

/* ---- Formular ---- */
.alert-form { max-width: 1100px; }

.form-intro {
  font-size: 0.875rem;
  color: var(--pa-muted);
  font-weight: 500;
}

.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.two-col-grid .fullwidth { grid-column: 1 / -1; }

form.alert-form label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pa-text);
}

form.alert-form select,
form.alert-form input[type="email"] {
  border: 1.5px solid var(--pa-border);
  border-radius: 7px;
  background: var(--pa-foam);
  transition: border-color 0.15s, box-shadow 0.15s;
}
form.alert-form select:focus,
form.alert-form input[type="email"]:focus {
  border-color: var(--pa-wave);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
  outline: none;
}

/* Wind-Anzeige */
.wind-readout {
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--pa-navy);
  letter-spacing: 0.01em;
}

/* Submit-Button */
.submit-wrap button[type="submit"] {
  background: var(--pa-ocean);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  margin-top: 0.5rem;
}
.submit-wrap button[type="submit"]:hover:not(:disabled) {
  background: var(--pa-wave);
  box-shadow: 0 3px 10px rgba(25, 118, 210, 0.35);
}
.submit-wrap button[type="submit"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Links ---- */
a { color: var(--pa-ocean); }
a:hover { color: var(--pa-wave); }

/* ---- Abschnitt "Über Pegel Alert" ---- */
#about-pegelalert {
  display: block;
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: linear-gradient(180deg, var(--pa-sky) 0%, #d6eaf8 100%);
  border-top: 1.5px solid var(--pa-border);
  padding: 2.5rem 1rem;
  box-sizing: border-box;
  margin-top: 2rem;
}
#about-pegelalert p {
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.75;
  color: #1e3a5a;
  font-size: 1rem;
  text-align: center;
}
#about-pegelalert a {
  color: var(--pa-ocean);
  text-decoration: underline;
}
#about-pegelalert a:hover { color: var(--pa-wave); }

/* ---- Responsiv ---- */
@media (max-width: 600px) {
  .two-col-grid { grid-template-columns: 1fr; }
  .station-name { font-size: 1.35rem; }
}
