/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #173c3f;
  background: #f4f7f1;
  --tinte: #173c3f;
  --wasser: #087f86;
  --wasser-dunkel: #075f66;
  --papier: #fffef8;
  --linie: #cddbd2;
}

body {
  margin: 0;
  min-width: 20rem;
  background:
    radial-gradient(circle at 90% -10%, rgb(127 197 190 / 22%), transparent 30rem),
    #f4f7f1;
}

a {
  color: var(--wasser-dunkel);
  text-underline-offset: 0.18em;
}

a:hover {
  color: #043f44;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.startseite {
  box-sizing: border-box;
  min-height: 100dvh;
  max-width: 44rem;
  margin: 0 auto;
  padding: 20vh 1.25rem 3rem;
}

.startseite h1 {
  margin: 0.25rem 0 1rem;
  font-size: clamp(2.25rem, 9vw, 4.5rem);
  line-height: 0.98;
}

.startseite p {
  max-width: 38rem;
  font-size: 1.125rem;
  line-height: 1.55;
}

.startseite .status {
  margin: 0;
  color: #087f8c;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primaer-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  color: white;
  background: var(--wasser-dunkel);
  font-weight: 750;
  text-decoration: none;
}

.primaer-link:hover {
  color: white;
  background: #043f44;
}

.seitenkopf {
  box-sizing: border-box;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  width: min(72rem, 100%);
  margin: 0 auto;
  padding: 1.15rem 1.25rem;
}

.seitenkopf p {
  display: none;
  margin: 0;
  color: #537072;
  font-size: 0.9rem;
}

.wortmarke {
  color: var(--tinte);
  font-size: 1.15rem;
  font-weight: 850;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.kopf-link,
.zurueck-link {
  font-weight: 700;
}

.orte-seite,
.detailseite {
  box-sizing: border-box;
  width: min(72rem, 100%);
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

.intro {
  max-width: 46rem;
  margin-bottom: 2rem;
}

.intro h1,
.detailkarte h1 {
  max-width: 42rem;
  margin: 0.2rem 0 1rem;
  color: #103436;
  font-size: clamp(2.35rem, 10vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.intro > p:last-child {
  max-width: 43rem;
  margin: 0;
  color: #415e60;
  font-size: 1.08rem;
  line-height: 1.6;
}

.eyebrow,
.ortstyp {
  margin: 0;
  color: var(--wasser);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.karte {
  height: min(62dvh, 36rem);
  min-height: 24rem;
  overflow: hidden;
  border: 1px solid #b9d0c5;
  border-radius: 1.25rem;
  box-shadow: 0 1.25rem 3rem rgb(18 61 63 / 10%);
}

.karten-hinweis {
  margin: 0.7rem 0 0;
  color: #607779;
  font-size: 0.78rem;
  line-height: 1.5;
}

.ortsliste {
  padding: 4rem 0;
}

.abschnittskopf {
  margin-bottom: 1.25rem;
}

.abschnittskopf h2,
.quellenbox h2,
.leerstand h2 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  letter-spacing: -0.035em;
}

.kartenraster {
  display: grid;
  gap: 0.85rem;
}

.ortskarte,
.detailkarte,
.quellenbox,
.leerstand {
  border: 1px solid var(--linie);
  border-radius: 1rem;
  background: rgb(255 254 248 / 92%);
}

.ortskarte {
  padding: 1.2rem;
}

.ortskarte h3 {
  margin: 0.35rem 0 0.55rem;
  font-size: 1.3rem;
  line-height: 1.15;
}

.ortskarte h3 a {
  color: var(--tinte);
  text-decoration: none;
}

.ortskarte p:not(.ortstyp) {
  min-height: 2.5em;
  margin: 0 0 1.25rem;
  color: #526d6e;
  line-height: 1.4;
}

.detail-link {
  font-size: 0.9rem;
  font-weight: 750;
}

.quellenabschnitt > h2 {
  margin: 0.25rem 0 1.25rem;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  letter-spacing: -0.035em;
}

.quellenraster {
  display: grid;
  gap: 0.85rem;
}

.quellenbox h3 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.2;
}

.quellenbox,
.leerstand {
  padding: 1.5rem;
}

.quellenbox dl,
.ortsdaten {
  display: grid;
  gap: 0;
  margin: 1.5rem 0;
}

.quellenbox dl div,
.ortsdaten div {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--linie);
}

dt {
  color: #607779;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

dd {
  margin: 0;
  line-height: 1.45;
}

.detailseite {
  max-width: 54rem;
}

.zurueck-link {
  display: inline-block;
  margin-bottom: 1.25rem;
}

.detailkarte {
  padding: clamp(1.4rem, 5vw, 3rem);
}

.detailkarte h1 {
  margin-top: 0.4rem;
  font-size: clamp(2.2rem, 9vw, 4.5rem);
}

.adresse {
  color: #526d6e;
  font-size: 1.08rem;
}

.ehrlichkeits-hinweis {
  margin: 1.5rem 0 0;
  padding: 1rem;
  border-left: 0.3rem solid #efb75b;
  background: #fff7e7;
  line-height: 1.5;
}

.detailseite .quellenbox {
  margin-top: 1rem;
}

@media (min-width: 42rem) {
  .seitenkopf p {
    display: block;
  }

  .orte-seite,
  .detailseite {
    padding-right: 2rem;
    padding-left: 2rem;
  }

  .kartenraster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quellenraster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quellenbox dl div,
  .ortsdaten div {
    grid-template-columns: minmax(8rem, 0.35fr) 1fr;
    gap: 1rem;
  }
}

@media (min-width: 64rem) {
  .kartenraster {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Map exploration */

.kartenabschnitt {
  min-width: 0;
}

.kartenwerkzeuge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.35rem;
  scrollbar-width: thin;
}

.filtergruppe {
  display: flex;
  gap: 0.45rem;
}

.filterchip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.55rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid #aac5bb;
  border-radius: 999px;
  color: var(--tinte);
  background: rgb(255 254 248 / 88%);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.filterchip:hover {
  border-color: var(--wasser);
  background: white;
}

.filterchip:focus-visible,
.panel-schliessen:focus-visible,
.ortskarte a:focus-visible {
  outline: 3px solid #f0a93c;
  outline-offset: 3px;
}

.filterchip.ist-aktiv {
  border-color: var(--tinte);
  color: white;
  background: var(--tinte);
}

.filterchip--fee {
  margin-left: auto;
  border-width: 2px;
}

.legendenpunkt {
  display: inline-block;
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgb(23 60 63 / 35%);
}

.legendenpunkt--water { background: #1879b9; }
.legendenpunkt--green { background: #397a49; }
.legendenpunkt--indoor { background: #7650a1; }
.legendenpunkt--swimming { background: #b45b2a; }

.kartenbereich {
  position: relative;
  min-width: 0;
}

.ort-panel {
  position: absolute;
  z-index: 4;
  right: 0.65rem;
  bottom: 0.65rem;
  left: 0.65rem;
  max-height: min(72%, 32rem);
  overflow-y: auto;
  border: 1px solid #9fbdb2;
  border-radius: 1rem;
  background: var(--papier);
  box-shadow: 0 1.25rem 3rem rgb(13 43 45 / 28%);
  overscroll-behavior: contain;
}

.ort-panel__kopf {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 1rem;
  border-bottom: 1px solid var(--linie);
  background: rgb(255 254 248 / 96%);
  backdrop-filter: blur(0.5rem);
}

.ort-panel__kopf p {
  margin: 0;
  color: #607779;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel-schliessen {
  padding: 0.35rem 0;
  border: 0;
  color: var(--wasser-dunkel);
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.ort-panel turbo-frame {
  display: block;
}

.ort-panel turbo-frame[hidden],
.ort-vorschau[hidden],
.detail-ladezustand[hidden],
.detail-fehler[hidden] {
  display: none;
}

.ort-panel[aria-busy="true"] .ort-panel__kopf p::after {
  content: " · Lädt";
}

.detail-ladezustand,
.detail-fehler {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--linie);
}

.detail-ladezustand p,
.detail-fehler p {
  margin: 0;
  color: #607779;
  font-weight: 700;
}

.detail-skelett {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.detail-skelett span {
  display: block;
  height: 0.8rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #dce8e2 25%, #f4f7f3 50%, #dce8e2 75%);
  background-size: 200% 100%;
  animation: detail-skelett-laden 1.4s ease-in-out infinite;
}

.detail-skelett span:nth-child(2) { width: 82%; }
.detail-skelett span:nth-child(3) { width: 58%; }

.detail-fehler button {
  margin-top: 0.8rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid #8fafaa;
  border-radius: 999px;
  color: var(--wasser-dunkel);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

@keyframes detail-skelett-laden {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .detail-skelett span { animation: none; }
}

.panel-ladehinweis {
  margin: 0;
  padding: 1.5rem;
  color: #607779;
}

.ort-panel .detailkarte,
.ort-panel .quellenbox {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ort-panel .detailkarte {
  padding: 1.15rem;
}

.ort-panel .detailkarte h2 {
  max-width: 42rem;
  margin-top: 0.6rem;
  margin-bottom: 1rem;
  color: #103436;
  font-size: clamp(1.65rem, 7vw, 2.35rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.ort-panel .ortsdaten {
  margin-bottom: 0;
}

.ort-panel .quellenbox {
  border-top: 1px solid var(--linie);
}

.ort-panel .quellenbox h2 {
  font-size: 1.35rem;
}

.detailseite-link {
  display: block;
  margin-top: 1rem;
  font-weight: 750;
}

.detail-meta,
.ortskarte__meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.kostenstatus {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 1.5rem;
  padding: 0.15rem 0.48rem;
  border: 1px solid #a9beb6;
  border-radius: 0.35rem;
  color: #425d5f;
  background: #f3f6f2;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.15;
}

.kostenstatus--free {
  border-color: #76a383;
  color: #285d36;
  background: #edf7ee;
}

.kostenstatus--paid {
  border-color: #c49b8e;
  color: #743b31;
  background: #fff2ed;
}

.ortskarte--ausgewaehlt {
  border-color: var(--wasser-dunkel);
  box-shadow: 0 0 0 3px rgb(8 127 134 / 18%);
}

.detailkarte h1:focus,
.detailkarte h2:focus {
  outline: none;
}

@media (max-width: 41.99rem) {
  .orte-seite {
    padding-top: 1rem;
  }

  .intro {
    margin-bottom: 1.5rem;
  }

  .intro h1 {
    font-size: clamp(2.35rem, 14vw, 3.5rem);
  }

  .karte {
    height: 34rem;
    min-height: 34rem;
  }

  .kartenwerkzeuge {
    flex-wrap: wrap;
    overflow: visible;
  }

  .filtergruppe {
    width: 100%;
    overflow-x: auto;
    padding: 0.1rem 0 0.3rem;
    scrollbar-width: thin;
  }

  .filterchip--fee {
    margin-left: 0;
  }
}

@media (min-width: 64rem) {
  .kartenbereich--auswahl {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(20rem, 0.85fr);
    gap: 0.85rem;
  }

  .kartenbereich--auswahl .ort-panel {
    position: static;
    height: min(62dvh, 36rem);
    max-height: none;
    border-radius: 1.25rem;
    box-shadow: 0 1.25rem 3rem rgb(18 61 63 / 10%);
  }
}
