/*
 * App-Styles (plain CSS, ersetzt Tailwind). Dark-Theme auf Slate-Basis wie in der
 * React-Version. Farbpalette als Custom Properties, damit Komponenten konsistent
 * bleiben.
 */
:root {
  --bg: #0f172a; /* slate-900 */
  --bg-elev: #1e293b; /* slate-800 */
  --bg-elev-2: #334155; /* slate-700 */
  --border: #1e293b; /* slate-800 */
  --text: #f1f5f9; /* slate-100 */
  --text-dim: #94a3b8; /* slate-400 */
  --text-dimmer: #64748b; /* slate-500 */
  --accent: #0ea5e9; /* sky-500 */
  --accent-soft: rgba(14, 165, 233, 0.2);
  --accent-text: #7dd3fc; /* sky-300 */
  --danger: #e11d48; /* rose-600 */
  --ok: #16a34a; /* green-600 */
  --warn: #d97706; /* amber-600 */

  /* Safe-Area-Insets als Variablen, mit 0-Fallback. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 4rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app-root {
  min-height: 100vh;
  min-height: 100dvh;
}

/*
 * iOS zoomt hinein, wenn ein fokussiertes Eingabefeld < 16px hat und bleibt im
 * Standalone-PWA oft kleben. Auf Touch-Geräten Formularfelder auf 16px zwingen.
 */
@media (hover: none) and (pointer: coarse) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* ── App-Shell ──────────────────────────────────────────────────────────── */
.shell {
  display: flex;
  flex-direction: column;
  /* Definierte Höhe (nicht nur min-height), damit height:100% in Kind-Flex-Items
     auflöst — sonst kollabiert z. B. der Karten-Container auf 0. */
  height: 100vh;
  height: 100dvh;
}

.shell__body {
  flex: 1;
  min-height: 0; /* erlaubt dem Flex-Kind zu schrumpfen/zu füllen */
  overflow-y: auto;
  /* Platz für die fixe Nav + Home-Indicator. */
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
}

/* ── Bottom-Nav ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  padding-bottom: var(--safe-bottom);
}

.nav__item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 0.5rem 0;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}

.nav__item:hover {
  color: var(--text);
}

.nav__item.is-active {
  color: var(--accent-text);
}

.nav__glyph {
  display: grid;
  place-items: center;
  height: 1.75rem;
  width: 3rem;
  border-radius: 9999px;
  font-size: 1rem;
  transition: background 0.15s;
}

.nav__item.is-active .nav__glyph {
  background: var(--accent-soft);
}

.nav__badge[hidden] {
  /* explizites display schlägt sonst das UA-[hidden]{display:none}. */
  display: none;
}

.nav__badge {
  position: absolute;
  right: 22%;
  top: 0.125rem;
  display: grid;
  place-items: center;
  height: 1rem;
  min-width: 1rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
}

/* ── Sync-Statuszeile ───────────────────────────────────────────────────── */
.syncbar {
  padding: calc(var(--safe-top) + 0.25rem) 0.75rem 0.25rem;
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-dim);
  background: var(--bg-elev);
}

.syncbar--offline {
  color: #fbbf24;
}

/* ── Generische Bausteine ───────────────────────────────────────────────── */
main {
  padding: 1rem;
}

.screen-title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.muted {
  color: var(--text-dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--bg-elev-2);
  color: var(--text);
  transition:
    background 0.15s,
    opacity 0.15s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--danger {
  background: var(--danger);
  color: #fff;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.field label {
  font-size: 0.875rem;
  color: var(--text-dim);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

/* ── Login ──────────────────────────────────────────────────────────────── */
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login__card {
  width: 100%;
  max-width: 22rem;
  display: flex;
  flex-direction: column;
}

.login__card .btn {
  margin-top: 0.5rem;
}

.login__error {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(225, 29, 72, 0.18);
  color: #fda4af;
  font-size: 0.875rem;
}

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
}

.badge--ok {
  background: rgba(22, 163, 74, 0.2);
  color: #86efac;
}

.badge--warn {
  background: rgba(217, 119, 6, 0.2);
  color: #fcd34d;
}

/* ── Splash ─────────────────────────────────────────────────────────────── */
.splash {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  color: var(--text-dim);
}

/* ── Sync-Statuszeile (reaktiv) ─────────────────────────────────────────── */
.syncbar {
  text-align: left;
}
.syncbar__line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.syncbar__dot {
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 9999px;
}
.syncbar__dot.is-online {
  background: #34d399;
}
.syncbar__dot.is-offline {
  background: #fb7185;
}
.syncbar__time {
  margin-left: auto;
}
.syncbar__warn {
  margin: 0.375rem 0 0;
  border-radius: 0.375rem;
  background: rgba(217, 119, 6, 0.15);
  color: #fcd34d;
  padding: 0.25rem 0.5rem;
}

/* ── Buttons (Ergänzungen) ──────────────────────────────────────────────── */
.btn--small {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 0.375rem;
}

/* ── Scan-Hub ───────────────────────────────────────────────────────────── */
.scan {
  max-width: 42rem;
  margin: 0 auto;
}
.scan__tiles {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}
.scan__tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  border: none;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  text-align: left;
  color: #fff;
  cursor: pointer;
}
.scan__tile-title {
  font-size: 1.125rem;
  font-weight: 600;
}
.scan__tile-sub {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
}
.scan__pending {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dimmer);
}

/* ── Scan-Formular ──────────────────────────────────────────────────────── */
.scan__form-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}
.scan__back {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.875rem;
  cursor: pointer;
}
.scan__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1rem;
}
.scan__label {
  font-size: 0.875rem;
  color: var(--text);
}
.scan__label .req {
  color: #fb7185;
}
.scan__photo {
  aspect-ratio: 4 / 3;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px dashed var(--bg-elev-2);
  border-radius: 1rem;
  background: var(--bg-elev);
  cursor: pointer;
}
.scan__photo--set {
  border-color: rgba(16, 185, 129, 0.6);
}
.scan__photo img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.scan__photo-hint {
  color: var(--text-dim);
  font-size: 0.875rem;
}
.scan__photo-ok {
  font-size: 0.75rem;
  color: #6ee7b7;
}
.scan__cta {
  width: 100%;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem;
  font-size: 1rem;
}
.scan__cta:disabled {
  opacity: 0.4;
}
textarea {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  font-family: inherit;
}

/* Material-Auswahl */
.scan__material-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.scan__material {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 0.75rem;
  padding: 0.75rem 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}
.scan__material.is-active {
  border-color: #2dd4bf;
  background: rgba(20, 184, 166, 0.2);
  color: #99f6e4;
}
.scan__material-custom {
  margin-top: 0.5rem;
  width: 100%;
  border: 1px dashed var(--bg-elev-2);
  background: none;
  color: var(--text-dim);
  border-radius: 0.75rem;
  padding: 0.5rem;
  cursor: pointer;
}
.scan__material-custom.is-active {
  border-color: #2dd4bf;
  color: #99f6e4;
}
.scan__materials input {
  margin-top: 0.5rem;
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  padding: 0.5rem 0.75rem;
}

/* GPS-Warten */
.scan__gps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid rgba(14, 165, 233, 0.4);
  background: rgba(14, 165, 233, 0.1);
  border-radius: 1rem;
  padding: 1rem;
}
.scan__gps-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #bae6fd;
  font-weight: 500;
}
.scan__gps-dot {
  height: 0.625rem;
  width: 0.625rem;
  border-radius: 9999px;
  background: #38bdf8;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}
.scan__gps-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}
.scan__gps-row .ok {
  color: #6ee7b7;
  font-family: ui-monospace, monospace;
}
.scan__gps-row .warn {
  color: #fcd34d;
  font-family: ui-monospace, monospace;
}

/* Erfolg */
.scan__success {
  max-width: 42rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  padding-top: 2rem;
}
.scan__success-badge {
  display: grid;
  place-items: center;
  height: 5rem;
  width: 5rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 2.5rem;
}
.scan__success .btn {
  width: 100%;
  max-width: 22rem;
}

/* ── Warteschlange ──────────────────────────────────────────────────────── */
.queue {
  max-width: 42rem;
  margin: 0 auto;
}
.queue__alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(225, 29, 72, 0.4);
  background: rgba(225, 29, 72, 0.15);
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
}
.queue__alert p {
  flex: 1;
  margin: 0;
  font-size: 0.875rem;
  color: #fecdd3;
}
.queue__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.queue__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--bg-elev);
}
.queue__item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.625rem 0.75rem;
  border-top: 1px solid var(--border);
}
.queue__item:first-child {
  border-top: none;
}
.queue__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.queue__thumb {
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0.375rem;
  background: var(--bg-elev-2);
}
.queue__thumb img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.queue__badge {
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
}
.queue__badge--queued {
  background: rgba(100, 116, 139, 0.3);
  color: #cbd5e1;
}
.queue__badge--processing {
  background: rgba(2, 132, 199, 0.3);
  color: #7dd3fc;
}
.queue__badge--done {
  background: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}
.queue__badge--rejected {
  background: rgba(217, 119, 6, 0.3);
  color: #fcd34d;
}
.queue__badge--failed {
  background: rgba(225, 29, 72, 0.3);
  color: #fda4af;
}
.queue__uuid {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.queue__retry {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
}
.queue__error {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.75rem;
  color: #fda4af;
}
.queue__retryhint {
  margin: 0;
  font-size: 0.75rem;
  color: #fcd34d;
}

/* ── Install-Banner ─────────────────────────────────────────────────────── */
.install-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(14, 165, 233, 0.2);
  background: rgba(14, 165, 233, 0.1);
  padding: 0.625rem 1rem;
}
.install-banner p {
  flex: 1;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.3;
}
.install-banner__x {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

/* ── Install-Anleitung (Konto) ──────────────────────────────────────────── */
.guide {
  border-radius: 0.75rem;
  background: var(--bg-elev);
  padding: 1rem;
}
.guide--ok {
  background: rgba(16, 185, 129, 0.15);
  color: #a7f3d0;
}
.guide__ok-title {
  margin: 0 0 0.25rem;
  font-weight: 500;
}
.guide__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}
.guide__benefits {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.guide__benefit {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.guide__check {
  color: var(--accent-text);
}
.guide__how {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: var(--text-dim);
}
.guide__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.guide__step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.guide__num {
  flex: none;
  display: grid;
  place-items: center;
  height: 1.75rem;
  width: 1.75rem;
  border-radius: 9999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.875rem;
  font-weight: 600;
}
.guide__term {
  border-radius: 0.25rem;
  background: var(--bg-elev-2);
  padding: 0.1rem 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ── Karte ──────────────────────────────────────────────────────────────── */
.map {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.map__toolbar {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(var(--bg) 60%, transparent);
}
.map__search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.92);
  color: var(--text);
}
.map__chips {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.map__chips::-webkit-scrollbar {
  display: none;
}
.map__chip {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.92);
  color: var(--text-dim);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  cursor: pointer;
  white-space: nowrap;
}
.map__chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}
.map__host {
  flex: 1;
  min-height: 320px;
  background: var(--bg-elev);
}
.map__fallback {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
}
.map__fabs {
  position: absolute;
  right: 0.75rem;
  bottom: 1rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.map__fab {
  position: relative;
  display: grid;
  place-items: center;
  height: 2.75rem;
  width: 2.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.map__fab-icon {
  height: 1.25rem;
  width: 1.25rem;
}
.map__fab-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  display: grid;
  place-items: center;
  height: 1.25rem;
  min-width: 1.25rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
}
.map__fab-badge[hidden] {
  display: none;
}
.is-spinning {
  display: inline-block;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.map__search-wrap {
  position: absolute;
  inset-inline: 0.75rem;
  top: 0.75rem;
  z-index: 7;
}
.map__search-wrap[hidden] {
  display: none;
}
.map__search-form {
  display: flex;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.92);
  padding: 0.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.map__search-form .map__search {
  flex: 1;
}

/* ── Bottom-Sheet (Filter/Info/Picker) ──────────────────────────────────── */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 85dvh;
  background: var(--bg);
  color: var(--text);
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
}
.sheet__handle-wrap {
  display: flex;
  justify-content: center;
  padding-top: 0.625rem;
}
.sheet__handle {
  height: 0.375rem;
  width: 2.5rem;
  border-radius: 9999px;
  background: var(--bg-elev-2);
}
.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem 0.5rem;
}
.sheet__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}
.sheet__head-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.sheet__close {
  display: grid;
  place-items: center;
  height: 2rem;
  width: 2rem;
  border: none;
  background: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 9999px;
  cursor: pointer;
}
.sheet__body {
  overflow-y: auto;
  padding: 0 1rem calc(1.5rem + var(--safe-bottom));
}

/* Detail-Body */
.detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
}
.detail__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.detail__val {
  text-align: right;
  font-weight: 500;
}
.detail__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.detail__dot {
  height: 0.625rem;
  width: 0.625rem;
  border-radius: 9999px;
}
.detail__nav {
  margin-top: 0.25rem;
  width: 100%;
}

/* Picker */
.picker__search-wrap {
  padding-bottom: 0.5rem;
}
.picker__search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
}
.picker__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.picker__item {
  border-top: 1px solid var(--border);
}
.picker__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.picker__glyph {
  display: grid;
  place-items: center;
  height: 1.75rem;
  width: 1.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  flex: none;
}
.picker__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.picker__num {
  font-weight: 500;
}
.picker__type {
  margin-left: auto;
  text-align: right;
  font-size: 0.75rem;
}
.picker__chev {
  flex: none;
  color: var(--text-dimmer);
  transition: transform 0.15s;
}
.picker__chev.is-open {
  transform: rotate(180deg);
}
.picker__detail {
  padding: 0 0 1rem 2.5rem;
}
.picker__empty {
  padding: 1.5rem;
  text-align: center;
}

/* Filter-Sheet */
.filter__legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1rem;
  margin: 0 0 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: var(--bg-elev);
  font-size: 0.75rem;
  color: var(--text-dim);
}
.filter__legend li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.filter__legend-dot {
  height: 0.625rem;
  width: 0.625rem;
  border-radius: 9999px;
}
.filter__section {
  margin-bottom: 1rem;
}
.filter__section-title {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
}
.filter__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter__sizes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.filter__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
}
.filter__chip.is-block {
  width: 100%;
  justify-content: center;
}
.filter__chip.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.filter__count {
  color: var(--text-dimmer);
}
.filter__chip.is-selected .filter__count {
  color: rgba(255, 255, 255, 0.8);
}
.filter__check {
  font-weight: 700;
}
.filter__reset {
  background: none;
  border: none;
  color: var(--accent-text);
  font-size: 0.875rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  cursor: pointer;
}
.filter__reset:disabled {
  color: var(--text-dimmer);
}
.map__flash {
  position: absolute;
  left: 50%;
  bottom: 5rem;
  transform: translateX(-50%);
  z-index: 6;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}
.map__sheet {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 6;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-radius: 1rem 1rem 0 0;
  padding: 1rem 1rem calc(1rem + var(--safe-bottom));
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
}
.map__sheet-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.map__sheet-num {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}
.map__sheet-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.9375rem;
}

/* Marker-Elemente (Kinder der maplibre-Marker) */
.map-marker {
  height: 0.875rem;
  width: 0.875rem;
  border-radius: 9999px;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.map-cluster {
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.85);
  color: #fff;
  font-weight: 600;
  font-size: 0.8125rem;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.map-user {
  height: 1rem;
  width: 1rem;
  border-radius: 9999px;
  background: #38bdf8;
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.35);
}
