/* HotelOS-Shell – framework-frei. Namespace: hos-. Von jeder App via <link> geladen.
   Desktop: linke Icon-Rail. Mobil (≤768px): runder FAB unten rechts → Bottom-Sheet
   (die Rail würde sonst mit dem App-eigenen Hamburger oben links kollidieren). */
:root {
  --hos-bronze: #a08856;
  --hos-bronze-dark: #7a6740;
  --hos-bronze-light: #c4ad7a;
  --hos-bronze-50: #f7f2e6;
  --hos-ink: #1a1a1a;
  --hos-ink-mute: #6b6b6b;
  --hos-creme: #faf8f3;
  --hos-creme-dark: #efeadd;
  --hos-rail-w: 56px;
}

/* Platz für die Rail reservieren – sofort (vor JS), gegen FOUC. */
body {
  padding-left: var(--hos-rail-w);
}

#hos-rail {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--hos-rail-w);
  height: 100vh;
  height: 100dvh;
  z-index: 2147483000; /* über App-Headern, unter nichts Wichtigem */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  background: var(--hos-ink);
  border-right: 1px solid rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  box-shadow: 1px 0 4px rgba(26, 26, 26, 0.18);
  font-family: 'Inter', system-ui, sans-serif;
}

.hos-logo {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  border-radius: 6px;
  object-fit: contain;
}

.hos-item {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--hos-creme);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.hos-item svg { width: 22px; height: 22px; }
.hos-item:hover { background: rgba(196, 173, 122, 0.18); color: #fff; }
.hos-item--active {
  background: var(--hos-bronze);
  color: #fff;
}
.hos-item--active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--hos-bronze-light);
}

/* Badge-Punkt mit Zahl (Rail) */
.hos-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: #8b2c2c;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

/* Tooltip rechts neben dem Item (Rail, Desktop) */
.hos-tip {
  position: absolute;
  left: 50px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: var(--hos-ink);
  color: var(--hos-creme);
  border: 1px solid var(--hos-bronze-dark);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
}
.hos-item:hover .hos-tip { opacity: 1; }

/* ── Mobiler App-Switcher: FAB + Bottom-Sheet + Backdrop ──
   Auf Desktop komplett ausgeblendet (display:none); nur in der Media-Query
   unten aktiviert. Statisches Aussehen hier, Sichtbarkeit/Animation dort. */
#hos-fab {
  display: none;
  position: fixed;
  left: calc(16px + env(safe-area-inset-left, 0px));
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--hos-bronze);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 26, 26, 0.28);
  cursor: pointer;
  z-index: 2147483000;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, sans-serif;
}
#hos-fab svg { width: 24px; height: 24px; }
#hos-fab:active { background: var(--hos-bronze-dark); }

#hos-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.45);
  z-index: 2147483001;
}

#hos-sheet {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483002;
  background: var(--hos-creme);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -4px 24px rgba(26, 26, 26, 0.25);
  padding: 8px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: 80vh;
  overflow-y: auto;
  font-family: 'Inter', system-ui, sans-serif;
}
.hos-sheet-grip {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: var(--hos-creme-dark);
  margin: 6px auto 6px;
}
.hos-sheet-title {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hos-ink-mute);
  margin-bottom: 8px;
}
.hos-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 12px;
  border-radius: 10px;
  color: var(--hos-ink);
  text-decoration: none;
}
.hos-row + .hos-row { margin-top: 2px; }
.hos-row:active,
.hos-row--active { background: var(--hos-bronze-50); }
.hos-row-ic {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hos-bronze-50);
  color: var(--hos-bronze-dark);
}
.hos-row--active .hos-row-ic { background: var(--hos-bronze); color: #fff; }
.hos-row-ic svg { width: 22px; height: 22px; }
.hos-row-name { flex: 1; font-size: 16px; font-weight: 500; }
.hos-row-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #8b2c2c;
  color: #fff;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
}

/* Mobil/schmal (≤768px): Rail aus, FAB+Sheet an. So gibt es keinen zweiten
   Hamburger oben links, der den App-eigenen ☰ überlagert. */
@media (max-width: 768px) {
  body { padding-left: 0; }
  #hos-rail { display: none; }

  #hos-fab { display: flex; }

  #hos-backdrop {
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  #hos-sheet {
    display: block;
    transform: translateY(110%);
    transition: transform 0.22s ease;
  }
  body.hos-sheet-open #hos-backdrop { opacity: 1; pointer-events: auto; }
  body.hos-sheet-open #hos-sheet { transform: translateY(0); }
}
