/* ---------------------------------------------------------------------------
 * AAT Sanitätsfachhandel-Suche
 * Farben und Schrift sind aus dem YOOtheme-Template von aat-online.de
 * übernommen, damit sich die eingebettete Suche nicht fremd anfühlt.
 * ------------------------------------------------------------------------- */

@font-face {
  font-family: 'Roboto AAT';
  src: url('fonts/roboto-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --blau:        #19365d;
  --blau-hell:   #607cb3;
  --blau-tief:   #0f265c;
  --text:        #313e4f;
  --text-leise:  #4c505a;
  --rand:        #d6d6d6;
  --flaeche:     #f4f6fb;
  --weiss:       #ffffff;
  --rot:         #de3e3e;

  --radius:      4px;
  --schrift:     'Roboto AAT', Roboto, 'Work Sans', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--schrift);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.hs { max-width: 1200px; margin: 0 auto; padding: 4px 0 8px; }

a { color: var(--blau); }
a:hover { color: var(--blau-hell); }

/* ------------------------------------------------------------------ Suche - */

.hs-suche {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.hs-suche__feld { flex: 1 1 260px; min-width: 0; }
.hs-suche__feld--schmal { flex: 0 0 150px; }
.hs-suche__feld--knopf { flex: 0 0 auto; }

.hs-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-leise);
  margin-bottom: 5px;
}

.hs-input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--weiss);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;   /* < 16px löst auf iOS ungewolltes Zoomen aus */
}
.hs-input:focus {
  outline: none;
  border-color: var(--blau-hell);
  box-shadow: 0 0 0 3px rgba(96, 124, 179, .25);
}

.hs-select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%234c505a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px 18px;
  cursor: pointer;
}

.hs-btn {
  height: 46px;
  margin-top: 23px;          /* auf Höhe der Eingabefelder, unter dem Label */
  padding: 0 26px;
  border: 0;
  border-radius: var(--radius);
  background: var(--blau);
  color: var(--weiss);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .15s;
}
.hs-btn:hover { background: var(--blau-tief); }
.hs-btn:focus-visible { outline: 3px solid var(--blau-hell); outline-offset: 2px; }

.hs-hilfe {
  margin: 5px 0 0;
  font-size: 12.5px;
  color: var(--text-leise);
}

.hs-standort { margin: 10px 0 0; }

.hs-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blau);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hs-link:hover { color: var(--blau-hell); }
.hs-link[disabled] { color: var(--text-leise); cursor: default; text-decoration: none; }

/* ------------------------------------------------------------- Vorschläge - */

.hs-combo { position: relative; }

.hs-vorschlaege {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
  background: var(--weiss);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(25, 54, 93, .16);
}

.hs-vorschlag {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 15px;
}
.hs-vorschlag[aria-selected="true"],
.hs-vorschlag:hover { background: var(--flaeche); }
.hs-vorschlag__plz {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  color: var(--text-leise);
  font-size: 14px;
}
.hs-vorschlag__ort { font-weight: 500; }

/* ---------------------------------------------------------------- Meldung - */

.hs-meldung {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--text-leise);
}
.hs-meldung:empty { display: none; }
.hs-meldung--fehler { color: var(--rot); font-weight: 500; }

/* --------------------------------------------------------------- Ergebnis - */

.hs-ergebnis { margin-top: 16px; }

.hs-tabs {
  display: none;                /* nur auf schmalen Viewports sichtbar */
  gap: 4px;
  margin-bottom: 12px;
  background: var(--flaeche);
  border-radius: var(--radius);
  padding: 4px;
}
.hs-tab {
  flex: 1 1 0;
  padding: 9px 12px;
  border: 0;
  border-radius: calc(var(--radius) - 1px);
  background: none;
  color: var(--text-leise);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.hs-tab.is-aktiv { background: var(--weiss); color: var(--blau); box-shadow: 0 1px 3px rgba(25,54,93,.14); }

.hs-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }

.hs-spalte--liste { min-width: 0; }
.hs-spalte--karte { min-width: 0; }

.hs-karte {
  position: sticky;
  top: 12px;
  height: 620px;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--flaeche);
}

/* ----------------------------------------------------------------- Liste - */

.hs-treffer {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 620px;
  overflow-y: auto;
  /* Platz für den Fokusring der Karten, damit er nicht abgeschnitten wird */
  padding-right: 4px;
}

.hs-karte-eintrag {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  margin-bottom: 8px;
  border: 1px solid var(--rand);
  border-left: 3px solid var(--rand);
  border-radius: var(--radius);
  background: var(--weiss);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.hs-karte-eintrag:hover { border-color: var(--blau-hell); border-left-color: var(--blau-hell); }
.hs-karte-eintrag:focus-visible { outline: 3px solid var(--blau-hell); outline-offset: 2px; }
.hs-karte-eintrag.is-aktiv {
  border-color: var(--blau);
  border-left-color: var(--blau);
  box-shadow: 0 2px 10px rgba(25, 54, 93, .14);
}

.hs-kopf { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; }

.hs-name {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--blau);
  line-height: 1.3;
}

.hs-entfernung {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--weiss);
  background: var(--blau-hell);
  border-radius: 999px;
  padding: 2px 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hs-adresse {
  margin: 6px 0 0;
  font-size: 14.5px;
  color: var(--text-leise);
  font-style: normal;
}

.hs-kontakt {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 9px;
  font-size: 14px;
}
.hs-kontakt a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.hs-kontakt a:hover { text-decoration: underline; }
.hs-kontakt svg { flex: 0 0 auto; opacity: .75; }

.hs-nr {
  display: inline-block;
  min-width: 1.6em;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-leise);
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------- Karten-Popup - */

.leaflet-popup-content-wrapper { border-radius: var(--radius); }
.leaflet-popup-content { margin: 12px 14px; font-family: var(--schrift); font-size: 14px; line-height: 1.45; }
.leaflet-container { font-family: var(--schrift); border-radius: var(--radius); }

.hs-popup__name { display: block; font-weight: 700; color: var(--blau); margin-bottom: 3px; }
.hs-popup__zeile { display: block; color: var(--text-leise); }
.hs-popup__link { display: inline-block; margin-top: 6px; }

/* Der ausgewählte Marker gehört über die anderen */
.hs-pin--aktiv { z-index: 1000 !important; }

/* Marker für den Suchmittelpunkt */
.hs-mitte {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--rot);
  border: 3px solid var(--weiss);
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
}

/* ------------------------------------------------------------------ Fuß  - */

.hs-fuss {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--text-leise);
  line-height: 1.6;
}
.hs-fuss a { color: var(--text-leise); }

/* --------------------------------------------------------------- Schmal  - */

@media (max-width: 860px) {
  .hs-tabs { display: flex; }
  .hs-split { grid-template-columns: minmax(0, 1fr); }
  .hs-spalte { display: none; }
  .hs-spalte.is-sichtbar { display: block; }
  .hs-karte { position: static; height: 460px; }
  .hs-treffer { max-height: none; overflow: visible; }
  .hs-suche__feld--schmal { flex: 1 1 140px; }
  .hs-suche__feld--knopf { flex: 1 1 100%; }
  .hs-btn { width: 100%; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
