/* Time2lounge als App: gilt nur, wenn die Seite vom Startbildschirm gestartet wurde
   (html.t2l-app, gesetzt von app.js). Im normalen Browser ändert diese Datei nichts.
   Keine Signalfarbe: die bleibt den Hauptknöpfen der Seite vorbehalten. */

.t2l-tabbar,
.t2l-offline { display: none; }

/* Einzige Regel, die auch im normalen Browser gilt: Für den Abstand der Leiste zum unteren
   Rand am iPhone steht im Seitenkopf viewport-fit=cover. Damit reicht die Seite im Querformat
   bis unter die Kamera-Aussparung — diese drei Zeilen halten Inhalt, Kopfzeile und Menü
   dort wieder frei, so wie es ohne die Angabe von selbst wäre. Im Hochformat sind die Werte 0. */
body {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.topbar,
.mobile-menu {
  left: env(safe-area-inset-left, 0px);
  right: env(safe-area-inset-right, 0px);
}

@media (max-width: 1080px) {
  /* Die Leiste unten ersetzt das Aufklappmenü — gleicher Breakpoint wie .menu-toggle in styles.css */
  html.t2l-app .menu-toggle,
  html.t2l-app .mobile-menu { display: none !important; }

  html.t2l-app body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }

  html.t2l-app .t2l-tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    background: #1d160f;
    border-top: 1px solid rgba(255, 255, 255, .12);
  }

  .t2l-tabbar__link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 60px;
    padding: 6px 2px;
    color: rgba(255, 255, 255, .74);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.1;
    letter-spacing: 0;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }
  @media (max-width: 350px) {
    .t2l-tabbar__link { font-size: 10.5px; }
  }

  .t2l-tabbar__link svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* Aktive Seite: heller, fetter und mit Strich oben — nie Farbe allein */
  .t2l-tabbar__link[aria-current="page"] {
    color: #ffffff;
    font-weight: 700;
  }
  .t2l-tabbar__link[aria-current="page"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22%;
    right: 22%;
    height: 3px;
    background: #ffffff;
  }

  .t2l-tabbar__link:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -4px;
  }
}

/* Hinweis ohne Internet — sitzt über der Leiste, verschiebt nichts */
html.t2l-app.t2l-ist-offline .t2l-offline {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 101;
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  background: #1d160f;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}
@media (min-width: 1081px) {
  html.t2l-app.t2l-ist-offline .t2l-offline { bottom: 16px; left: auto; max-width: 420px; }
}
