.pac-container { z-index: 2000 !important; }
/* Schicht-Badge in der Rides-Toolbar */

@font-face{
  font-family: "Phosphor";
  src:
    url("/public/assets/icons/phosphor/phosphor.woff2") format("woff2"),
    url("/public/assets/icons/phosphor/phosphor.woff") format("woff");
  font-weight: 100 900; /* Supports thin → bold weights, je nach Build */
  font-style: normal;
  font-display: block;
}

/* Basis-Klassen */
.ph {
  font-family: "Phosphor", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  speak: none;
  line-height: 1;
  display: inline-block;
  text-rendering: auto;
}

/* Flat Pills */
.app-nav { align-items: center; }

.nav-chip{
  --chip-bg: #f8fafc;
  --chip-fg: #000000;
  --chip-bg-active: #e0f2fe;
  --chip-fg-active: #000000;
  --chip-bg-hover: #eef2f7;

  display:inline-flex; align-items:center; gap:.25rem;
  padding:.45rem .75rem;
  border:0; border-radius:999px;
  background:var(--chip-bg); color:var(--chip-fg);
  box-shadow: 0 1px 0 rgba(222, 222, 222, 0.04);
  font-weight:600; font-size:.9rem;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.nav-chip .ph{ font-size:1.05rem; line-height:1; }

.nav-chip:hover{ background:var(--chip-bg-hover); }
.nav-chip:focus-visible{
  outline: 2px solid #000000; outline-offset: 2px;
}

.nav-chip.active,
.nav-chip[aria-current="page"]{
  background:var(--chip-bg-active);
  color:var(--chip-fg-active);
  box-shadow: inset 0 0 0 1px #bfbfbf;
}

/* ==========================================================
   🌈 Flat Active Navigation Styles (phosphor + chip look)
   ========================================================== */

.app-nav {
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.nav-chip {
  --chip-bg: #f8fafc;
  --chip-fg: #0f172a;
  --chip-bg-hover: #f1f5f9;
  --chip-bg-active: #e0f2fe;
  --chip-fg-active: #000000;
  --chip-ring-active: #dedede;

  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-fg);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s ease;
  cursor: pointer;
}

.nav-chip .ph {
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.9;
  transition: transform 0.2s ease, opacity 0.15s ease;
}

/* Hover-Effekt */
.nav-chip:hover {
  background: var(--chip-bg-hover);
  color: var(--chip-fg-active);
}

.nav-chip:hover .ph {
  transform: scale(1.05);
  opacity: 1;
}

/* Aktive Ansicht */
.nav-chip.active,
.nav-chip[aria-current="page"] {
  background: var(--chip-bg-active);
  color: var(--chip-fg-active);
  box-shadow: inset 0 0 0 1px var(--chip-ring-active),
              0 0 6px rgba(0, 0, 0, 0.25);
  /*transform: translateY(-1px);*/
}

.nav-chip.active .ph {
  color: var(--chip-fg-active);
  opacity: 1;
}

/* Fokus-Zustand (Tastatur-Navigation) */
.nav-chip:focus-visible {
  outline: 2px solid var(--chip-ring-active);
  outline-offset: 2px;
}

/* ==== PWA Install Banner ==== */
:root{
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sal: env(safe-area-inset-left, 0px);
}

.pwa-banner{
  position: fixed;
  z-index: 2147483647;
  color: #fff;
  background: #111;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  display: flex;
  gap: .75rem;
  align-items: center;
  padding: .8rem 1rem;
  opacity: 0; transform: translateY(-24px);
  pointer-events: auto;
}
.pwa-banner.show{ animation: pwaSlideDown .25s ease-out forwards; }

@keyframes pwaSlideDown{
  from{ opacity:0; transform: translateY(-24px); }
  to  { opacity:1; transform: translateY(0); }
}

/* Content */
.pwa-banner .pwa-icon{ font-size: 1.25rem; line-height: 1; }
.pwa-banner .pwa-text{ font-weight: 700; line-height: 1.35; }
.pwa-banner .pwa-actions{ margin-left: auto; display: grid; grid-auto-flow: column; gap: .5rem; }
.pwa-btn{
  border: 0; border-radius: 10px; padding: .5rem .8rem; font-weight: 800; cursor: pointer;
}
.pwa-btn.primary{ background: #16a34a; color: #fff; }
.pwa-btn.ghost{ background: rgba(255,255,255,.12); color: #fff; }

/* Mobile (90% Breite, oben zentriert, safe-area) */
@media (max-width: 640px){
  .pwa-banner{
    top: calc(8px + var(--sat));
    left: 50%;
    transform: translate(-50%, -24px);
    width: 90vw;
  }
}

/* Desktop (oben rechts, normal groß) */
@media (min-width: 641px){
  .pwa-banner{
    top: calc(16px + var(--sat));
    right: calc(16px + var(--sar));
    max-width: 420px;
  }
}

/* ===== App Navbar (Desktop) ===== */
.app-navbar {
  position: sticky; top: 0; z-index: 1000;
  background: #fff; border-bottom: 1px solid rgba(0,0,0,.08);
}
.app-navbar .container { display:flex; justify-content:space-between; align-items:center; gap:.75rem; padding:.5rem 1rem; }
.app-nav { display:flex; flex-wrap:wrap; gap:.5rem; }
.nav-chip {
  display:inline-flex; align-items:center; gap:.5rem;
  border:1px solid rgba(0,0,0,.12); border-radius:12px; padding:.45rem .7rem;
  background:#fff; font-weight:800;
}
.nav-chip[aria-current="page"],
.nav-chip.active { background:#111; color:#fff; border-color:#111; }
.app-navbar .right { display:flex; align-items:center; gap:.6rem; color:#6b7280; }

/* === Mobile FAB: flat, transparent container === */
.app-fab {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 1040;
  display: grid;
  grid-auto-flow: column;
  gap: .5rem;
  background: transparent;
  padding: 0;
}

/* Icon-only buttons */
.app-fab .fab {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;   /* default: weiß */
  color: #111;        /* Icons: schwarz */
  font-size: 20px;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s cubic-bezier(.2,.7,.2,1), background-color .2s, color .2s, border-color .2s;
  box-shadow: 0 2px 4px rgba(0,0,0,.05);
}
.app-fab .fab:active { transform: translateY(1px) scale(.98); }

/* Active: invertiert */
.app-fab .fab.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Nur Icons, evtl. vorhandenen Text ausblenden */
.app-fab .fab span { display: none; }

/* Desktop ausblenden, unten Platz schaffen */
@media (min-width: 720px){ .app-fab { display:none; } }
@media (max-width: 719px){ #appRoot { padding-bottom: 80px; } }

/* -----------------------------------
   🚘 Mittlerer FAB (Eigene Fahrten)
----------------------------------- */
.app-fab #fabDriver {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  font-size: 24px;
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s cubic-bezier(.2,.7,.2,1), background-color .2s, color .2s, border-color .2s;
}
.app-fab #fabDriver:active {
  transform: translateY(-2px) scale(.97);
}

/* Aktiver, hervorgehobener Zustand + dezentes Pulsieren */
.app-fab #fabDriver.active {
  background: #111;
  color: #fff;
  border-color: #111;
  box-shadow: 0 6px 12px rgba(0,0,0,0.18);
  animation: fabPulse 2.6s ease-in-out infinite;
}

/* Sanfte Hover-Effekte für Geräte mit Hover */
@media (hover:hover) {
  .app-fab .fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  }
  .app-fab #fabDriver:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.22);
  }
}

/* --------- Animationen --------- */
/* Dezent: ganz leichte Skalierung + Shadow „Atmen“ */
@keyframes fabPulse {
  0%   { transform: translateY(-4px) scale(1);    box-shadow: 0 6px 12px rgba(0,0,0,.18); }
  50%  { transform: translateY(-5px) scale(1.03); box-shadow: 0 8px 16px rgba(0,0,0,.22); }
  100% { transform: translateY(-4px) scale(1);    box-shadow: 0 6px 12px rgba(0,0,0,.18); }
}

/* Respektiere reduzierte Bewegungen */
@media (prefers-reduced-motion: reduce) {
  .app-fab .fab,
  .app-fab #fabDriver {
    transition: none !important;
    animation: none !important;
  }
}

/* Menü/FAB-Badge */
#navMount .fab { position: relative; } /* wichtig für absolute Badge-Position */
.menu-badge {
  position: absolute;
  right: -6px; top: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex !important; align-items: center; justify-content: center;
  border-radius: 999px;
  background: #111; color: #fff; font-size: 11px; font-weight: 800;
  border: 1px solid #fff;
  transform: scale(1);
  transition: transform .15s ease, background .2s ease, opacity .2s ease;
}
.menu-badge.pulse {
  animation: menuBadgePulse 1.4s infinite ease-in-out;
  display: inline-flex;
}
@keyframes menuBadgePulse {
  0%   { transform: scale(1);   }
  50%  { transform: scale(1.12);}
  100% { transform: scale(1);   }
}
.menu-badge.hidden { opacity: .0; pointer-events: none; }

.chip.active, .pill.chip.active {background-color:#000;color:#fff}