/* ============================================================
   REPUBLIK DIABETIEN — Amtliches Erscheinungsbild
   karte.css — Bundesatlas und statische Bundeskarte (land.php)
   Herausgeber der Karte: Bundesvermessungsamt Betazell
   ============================================================ */

/* Der Atlas steht über der Landeskunde über die gesamte Inhaltsbreite. */
.bundesatlas{
  position:relative;isolation:isolate;min-width:0;margin:0 0 32px;background:#fff;
  border:1px solid var(--linie-stark);box-shadow:var(--schatten-klein);color:var(--tinte);
}
.atlas-kopf{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  padding:20px 24px;background:var(--behoerdenblau);color:#fff;
}
.atlas-kopf .eyebrow{margin:0 0 5px;color:#c3d4e2;font-size:.62rem;letter-spacing:.12em}
.atlas-kopf h2{margin:0;font-size:clamp(1.4rem,2.5vw,1.85rem);line-height:1.2;color:#fff}
.atlas-interaktion{grid-column:1/-1;margin:0;color:var(--silber);font-size:.72rem;line-height:1.5;text-align:left}
.atlas-werkzeuge,.atlas-arbeitsflaeche,.atlas-fuss{display:none}
.atlas-bereit .atlas-werkzeuge{display:grid}
.atlas-bereit .atlas-arbeitsflaeche,.atlas-bereit .atlas-fuss{display:flex}
.atlas-bereit .atlas-fallback{display:none}
.atlas-geografie{display:flex;align-items:center;gap:24px;padding:17px 20px;background:#f4f7f8;border-bottom:1px solid var(--linie)}
.atlas-geografie>div{min-width:0;flex:1}
.atlas-geografie h3{margin:0 0 5px;font-family:var(--sans);font-size:.87rem;line-height:1.35;font-weight:700}
.atlas-geografie p{max-width:95ch;margin:0;color:var(--tinte-2);font-size:.77rem;line-height:1.6}
.atlas-inselknopf{display:none;flex:0 0 auto;gap:10px;padding:9px 13px;font-size:.78rem;white-space:nowrap}
.atlas-bereit .atlas-inselknopf{display:inline-flex}
.atlas-werkzeuge{
  position:relative;z-index:4;grid-template-columns:minmax(220px,1fr) auto;gap:13px 24px;
  align-items:end;padding:16px 20px;background:#f8fafb;border-bottom:1px solid var(--linie);
}
.atlas-suche{position:relative;min-width:0;margin:0}
.atlas-suche>label,.atlas-ansicht>label,.atlas-ebenen legend{
  display:block;margin:0 0 6px;color:var(--silber);font-family:var(--sans);font-size:.75rem;
  font-weight:650;line-height:1.35;letter-spacing:0;text-transform:none;
}
.atlas-suchzeile{display:flex;gap:8px}
.atlas-suchzeile input{min-width:0;flex:1;min-height:44px;background:#fff;font-size:.88rem}
.atlas-suchzeile .knopf{flex:0 0 auto;min-height:44px;padding:9px 15px;font-size:.82rem}
.atlas-ergebnisse{
  position:absolute;z-index:30;top:100%;left:0;right:0;max-height:320px;overflow-y:auto;
  padding:5px;background:#fff;border:1px solid var(--linie-stark);box-shadow:var(--schatten);
  overscroll-behavior:contain;
}
.atlas-ergebnisse p{margin:0;padding:14px 12px;color:var(--silber);font-size:.84rem}
.atlas-ergebnisse:has(>p),.atlas-ergebnisse.atlas-keine-treffer{position:static;max-height:none;margin-top:8px;box-shadow:none}
.atlas-result{
  display:block;width:100%;min-height:52px;padding:9px 12px;border:0;border-bottom:1px solid var(--linie);
  background:#fff;color:var(--tinte);cursor:pointer;text-align:left;font:inherit;overflow-wrap:anywhere;
}
.atlas-result:last-child{border-bottom:0}
.atlas-result:hover,.atlas-result:focus-visible{background:var(--insulin-hell)}
.atlas-result:focus-visible{outline-offset:-3px}
.atlas-result strong{display:block;font-size:.87rem;font-weight:700}
.atlas-result small{display:block;margin-top:2px;font-size:.74rem;color:var(--silber)}
.atlas-kontrollen{display:flex;gap:6px;align-items:center;justify-content:flex-end}
.atlas-kontrollen button{
  display:inline-flex;min-width:44px;min-height:44px;align-items:center;justify-content:center;
  padding:7px 11px;background:#fff;border:1px solid var(--linie-stark);color:var(--tinte);
  font-family:var(--sans);font-size:1.35rem;line-height:1;cursor:pointer;
}
.atlas-kontrollen button:hover{background:var(--insulin-hell);border-color:var(--insulin)}
.atlas-kontrollen button:disabled{opacity:.4;cursor:default}
.atlas-kontrollen .atlas-knopf-text{padding:9px 15px;font-size:.8rem;font-weight:650;line-height:1.3}
.atlas-ansicht{display:flex;gap:10px;align-items:center;min-width:0}
.atlas-ansicht>label{margin:0;flex:0 0 auto}
.atlas-ansicht select{max-width:210px;min-height:44px;padding:8px 30px 8px 11px;font-size:.82rem}
.atlas-ebenen{display:flex;justify-content:flex-end;gap:8px 15px;flex-wrap:wrap;min-width:0;margin:0;padding:0;border:0}
.atlas-ebenen legend{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.atlas-ebenen label{
  display:inline-flex;min-height:44px;align-items:center;gap:6px;cursor:pointer;color:var(--tinte-2);
  font-family:var(--sans);font-size:.8rem;font-weight:500;line-height:1.4;letter-spacing:0;text-transform:none;
}
.atlas-ebenen input{flex:0 0 17px;width:17px;height:17px;margin:0;accent-color:var(--insulin)}
.atlas-arbeitsflaeche{position:relative;z-index:1;isolation:isolate;height:clamp(460px,66vh,680px);min-height:0;background:#b8d6df}
#atlas-map{position:absolute;inset:0;width:100%;height:100%;background:#b8d6df;font-family:var(--sans)}
#atlas-map:focus-visible{outline:3px solid var(--koenigsblau);outline-offset:-3px;box-shadow:none}
#atlas-map .leaflet-control-attribution{font-family:var(--sans);font-size:.64rem}
.atlas-detail{
  position:absolute;z-index:900;right:16px;top:16px;width:290px;max-width:calc(100% - 32px);
  max-height:calc(100% - 32px);overflow:auto;overscroll-behavior:contain;
  padding:21px;background:rgba(255,255,255,.98);border:1px solid var(--linie-stark);box-shadow:var(--schatten);
}
.atlas-detail .schliessen{float:right;margin:-11px -11px 8px 9px;width:44px;height:44px}
.atlas-detail h3{margin:0 0 10px;padding-top:1px;font-size:1.25rem;line-height:1.25;overflow-wrap:anywhere}
.atlas-detail p{clear:both;margin:0;color:var(--tinte-2);font-size:.85rem;line-height:1.6}
.atlas-detail a{display:inline-flex;min-height:44px;align-items:center;font-weight:650}
.atlas-fuss{
  min-height:46px;align-items:center;gap:18px;flex-wrap:wrap;padding:8px 20px;
  background:#f8fafb;border-top:1px solid var(--linie);color:var(--silber);
}
#atlas-status{flex:1;min-width:180px;margin:0;font-size:.72rem;line-height:1.45}
#atlas-scale{
  position:relative;display:block;min-width:var(--atlas-scale-width,80px);padding:0 0 7px;
  font-family:var(--mono);font-size:.69rem;line-height:1;text-align:center;color:var(--tinte);
}
#atlas-scale::after{content:"";position:absolute;left:50%;bottom:0;width:var(--atlas-scale-width,80px);height:5px;transform:translateX(-50%);border:solid currentColor;border-width:0 1px 1px}
#atlas-coordinates{min-width:160px;font-family:var(--mono);font-size:.65rem;text-align:right}
.atlas-legende{display:flex;gap:10px 22px;flex-wrap:wrap;padding:13px 20px 0;color:var(--tinte-2);font-size:.72rem;line-height:1.5}
.atlas-legende>span{display:inline-flex;align-items:center;gap:7px}
.atlas-legende i{display:inline-block;width:18px;height:10px;border:1px solid rgba(12,35,64,.25)}
.atlas-legende-wasser{background:#a8cfdf}
.atlas-legende-gebirge{background:#cfcabb}
.atlas-legende-siedlung{background:#c5b9ab}
.atlas-legende-strasse{height:5px!important;background:#f5d799;border-color:#c39b69!important}
.atlas-hinweis{margin:0;padding:10px 20px 15px;color:var(--silber);font-size:.72rem;line-height:1.55}
.atlas-fallback{padding:20px}
.atlas-fallback>p{margin-bottom:12px}
.atlas-ortstitel{margin:22px 0 12px;font-family:var(--sans);font-size:.9rem}
.atlas-orte{display:flex;gap:8px 22px;flex-wrap:wrap;list-style:none;margin:0;padding:0;font-size:.85rem;color:var(--tinte-2)}
.land-details .sektortafel:first-child{margin-top:0!important}
.land-details #regionLegende a{min-width:0;flex-wrap:wrap}
.land-details #regionLegende a>span:last-child{overflow-wrap:anywhere}

/* Native Vollbildansicht und die Alternative für Browser ohne Fullscreen API. */
.bundesatlas:fullscreen,.bundesatlas.atlas-expanded{
  display:flex;flex-direction:column;width:100%;height:100vh;height:100dvh;margin:0;
  background:#fff;border:0;overflow:hidden;
}
.bundesatlas.atlas-expanded{position:fixed;inset:0;z-index:1000}
.bundesatlas:fullscreen .atlas-kopf,.bundesatlas.atlas-expanded .atlas-kopf{padding-top:12px;padding-bottom:12px;flex-shrink:0}
.bundesatlas:fullscreen .atlas-werkzeuge,.bundesatlas.atlas-expanded .atlas-werkzeuge{flex-shrink:0}
.bundesatlas:fullscreen .atlas-arbeitsflaeche,.bundesatlas.atlas-expanded .atlas-arbeitsflaeche{height:auto;flex:1;min-height:100px}
.bundesatlas:fullscreen .atlas-fuss,.bundesatlas.atlas-expanded .atlas-fuss{flex-shrink:0}
.bundesatlas:fullscreen .atlas-legende,.bundesatlas.atlas-expanded .atlas-legende{display:none}
.bundesatlas:fullscreen .atlas-geografie,.bundesatlas.atlas-expanded .atlas-geografie{flex-shrink:0;padding:8px 20px}
.bundesatlas:fullscreen .atlas-geografie p,.bundesatlas.atlas-expanded .atlas-geografie p{display:none}
.bundesatlas:fullscreen .atlas-geografie h3,.bundesatlas.atlas-expanded .atlas-geografie h3{margin:0}
.bundesatlas:fullscreen .atlas-hinweis,.bundesatlas.atlas-expanded .atlas-hinweis{padding-top:6px;padding-bottom:8px;font-size:.66rem}

@media(max-width:850px){
  .atlas-kopf{padding:18px 20px}
  .atlas-werkzeuge{gap:10px 14px;padding:14px}
  .atlas-ansicht{gap:8px}
  .atlas-ebenen{gap:5px 12px}
  .atlas-fuss{gap:14px;padding:8px 14px}
  #atlas-coordinates{display:none}
}
@media(max-width:600px){
  .bundesatlas{margin-left:-18px;margin-right:-18px;border-left:0;border-right:0}
  .atlas-kopf{padding:17px 18px}
  .atlas-werkzeuge{grid-template-columns:minmax(0,1fr);gap:9px;padding:13px 18px}
  .atlas-suche{grid-column:1}
  .atlas-suchzeile input{font-size:1rem}
  .atlas-suchzeile .knopf{padding:9px 12px}
  .atlas-kontrollen{grid-column:1;justify-content:flex-start}
  .atlas-kontrollen .atlas-knopf-text{flex:1}
  .atlas-ansicht{grid-column:1;justify-content:space-between}
  .atlas-ansicht select{max-width:62%;font-size:1rem}
  .atlas-ebenen{grid-column:1;justify-content:flex-start;gap:2px 16px}
  .atlas-ebenen label{font-size:.78rem}
  .atlas-ergebnisse{max-height:280px}
  .atlas-arbeitsflaeche{height:clamp(290px,85vw,420px)}
  .atlas-detail{top:auto;bottom:12px;left:12px;right:12px;width:auto;max-width:none;max-height:45%;padding:18px}
  .atlas-detail h3{font-size:1.12rem}
  .atlas-fuss{gap:9px 15px;padding:9px 18px}
  #atlas-status{flex-basis:calc(100% - 125px);min-width:140px;font-size:.68rem}
  .atlas-legende{gap:8px 17px;padding:12px 18px 0}
  .atlas-hinweis{padding:10px 18px 13px}
  .atlas-geografie{display:block;padding:15px 18px}
  .atlas-inselknopf{margin-top:10px}
  .atlas-fallback{padding:18px}
  .atlas-orte{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 16px}
  .bundesatlas:fullscreen .atlas-kopf,.bundesatlas.atlas-expanded .atlas-kopf{padding:8px 18px}
  .bundesatlas:fullscreen .atlas-kopf .eyebrow,.bundesatlas.atlas-expanded .atlas-kopf .eyebrow{display:none}
  .bundesatlas:fullscreen .atlas-kopf h2,.bundesatlas.atlas-expanded .atlas-kopf h2{font-size:1.15rem}
  .bundesatlas:fullscreen .atlas-werkzeuge,.bundesatlas.atlas-expanded .atlas-werkzeuge{padding-top:8px;padding-bottom:8px;gap:4px 12px;grid-template-columns:minmax(0,1fr) auto}
  .bundesatlas:fullscreen .atlas-suche,.bundesatlas.atlas-expanded .atlas-suche{grid-column:1/-1}
  .bundesatlas:fullscreen .atlas-suche>label,.bundesatlas.atlas-expanded .atlas-suche>label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .bundesatlas:fullscreen .atlas-kontrollen,.bundesatlas.atlas-expanded .atlas-kontrollen{grid-column:1/-1}
  .bundesatlas:fullscreen .atlas-ansicht,.bundesatlas.atlas-expanded .atlas-ansicht{grid-column:1/-1}
  .bundesatlas:fullscreen .atlas-ebenen,.bundesatlas.atlas-expanded .atlas-ebenen{grid-column:1/-1}
  .bundesatlas:fullscreen .atlas-hinweis,.bundesatlas.atlas-expanded .atlas-hinweis{display:none}
  .bundesatlas:fullscreen .atlas-geografie,.bundesatlas.atlas-expanded .atlas-geografie{display:flex;gap:10px;padding:5px 18px}
  .bundesatlas:fullscreen .atlas-inselknopf,.bundesatlas.atlas-expanded .atlas-inselknopf{margin-top:0}
}
@media(max-height:600px){
  .bundesatlas:fullscreen .atlas-interaktion,.bundesatlas.atlas-expanded .atlas-interaktion{display:none}
  .bundesatlas:fullscreen .atlas-kopf,.bundesatlas.atlas-expanded .atlas-kopf{display:none}
}
@media(max-height:550px) and (min-width:600px){
  .bundesatlas:fullscreen .atlas-kopf,.bundesatlas.atlas-expanded .atlas-kopf{display:none}
  .bundesatlas:fullscreen .atlas-werkzeuge,.bundesatlas.atlas-expanded .atlas-werkzeuge{padding:7px 14px;gap:6px 12px;grid-template-columns:minmax(180px,1fr) auto}
  .bundesatlas:fullscreen .atlas-suche,.bundesatlas.atlas-expanded .atlas-suche{grid-column:1}
  .bundesatlas:fullscreen .atlas-suche>label,.bundesatlas.atlas-expanded .atlas-suche>label{display:none}
  .bundesatlas:fullscreen .atlas-kontrollen,.bundesatlas.atlas-expanded .atlas-kontrollen{grid-column:2}
  .bundesatlas:fullscreen .atlas-ansicht,.bundesatlas.atlas-expanded .atlas-ansicht{grid-column:1}
  .bundesatlas:fullscreen .atlas-ebenen,.bundesatlas.atlas-expanded .atlas-ebenen{grid-column:2}
  .bundesatlas:fullscreen .atlas-ansicht>label,.bundesatlas.atlas-expanded .atlas-ansicht>label{display:none}
  .bundesatlas:fullscreen .atlas-hinweis,.bundesatlas.atlas-expanded .atlas-hinweis{display:none}
}
@media print{
  .atlas-werkzeuge,.atlas-arbeitsflaeche,.atlas-fuss,.atlas-interaktion{display:none!important}
  .atlas-inselknopf{display:none!important}
  .atlas-bereit .atlas-fallback{display:block}
  .bundesatlas{box-shadow:none;break-inside:avoid}
  .atlas-kopf{background:#fff;color:#000}
  .atlas-kopf h2,.atlas-kopf .eyebrow{color:#000}
}

/* Statische Ansicht derselben Atlasdaten; Sektoren sind über die Legende erreichbar. */
.atlas-statische-ansicht{margin:0}
.atlas-statische-karte{display:block;width:100%;height:auto}
.atlas-statische-ansicht figcaption{margin-top:8px}
.landkarte{background:var(--meer);border:1px solid var(--linie);padding:8px}
.landkarte svg{width:100%;height:auto;display:block}
.region-flaeche{cursor:pointer;transition:opacity .18s}
.region-flaeche:hover{opacity:.72}
.region-flaeche.aktiv{opacity:.62}
.region-link:focus{outline:none}
.region-link:focus .region-flaeche{stroke:#fff;stroke-width:6px;paint-order:stroke;filter:drop-shadow(0 0 2px var(--tinte))}
.stadtpunkt{fill:var(--tinte)}
.stadtname{font-family:var(--sans);font-size:14px;fill:var(--tinte);paint-order:stroke;stroke:#fff;stroke-width:3.6px;stroke-linejoin:round}
.hauptstadtname{font-weight:700;font-size:15.5px}
.meername{font-family:var(--serif);font-style:italic;font-size:17px;fill:var(--silber);letter-spacing:.16em}
.regionname{font-family:var(--mono);font-size:13px;font-weight:700;letter-spacing:.12em;fill:var(--tinte);text-transform:uppercase;pointer-events:none}
.flussname{font-family:var(--serif);font-style:italic;font-size:15px;fill:var(--insulin-dunkel);paint-order:stroke;stroke:#fff;stroke-width:3.4px;stroke-linejoin:round;pointer-events:none}
.gebirgsname{font-family:var(--mono);font-size:12px;font-weight:700;letter-spacing:.17em;fill:#544a37;paint-order:stroke;stroke:#f2ede0;stroke-width:3.4px;stroke-linejoin:round;pointer-events:none}
