/* VenueOS — Bottom Navigation Bar (MD3, mobile only) */

/* ── Bar ─────────────────────────────────────────────────── */
.bottom-nav {
  display: flex;
  align-items: stretch;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + env(safe-area-inset-bottom));
  background: var(--header-bg);
  border-top: 1px solid rgba(255,255,255,.1);
  z-index: 1100;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ── Tab button ──────────────────────────────────────────── */
.bn-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55); /* explicit: always readable on dark nav bg regardless of theme */
  padding: 8px 4px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width: 0;
  transition: color 0.2s ease;
}

.bn-tab:active { opacity: 0.7; }

/* MD3 active indicator pill */
.bn-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 32px;
}

.bn-pill {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: transparent;
  transition: background 0.2s ease;
}

.bn-tab.active .bn-pill {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.bn-tab.active {
  color: var(--accent);
}

/* Lunch & dinner: bar is always dark — --accent is often too dark on black (e.g. green). Use peach/salmon + pill like dinner. */
.bottom-nav .bn-tab {
  color: rgba(255, 255, 255, 0.58);
}
.bottom-nav .bn-tab.active {
  color: #f0b8a8;
}
.bottom-nav .bn-tab.active .bn-pill {
  background: rgba(240, 184, 168, 0.22);
}
.bottom-nav .bn-tab .bn-icon,
.bottom-nav .bn-tab .bn-label {
  color: inherit;
}
body.dinner-mode .bottom-nav .bn-tab.active {
  color: #f0b8a8;
}
body.dinner-mode .bottom-nav .bn-tab.active .bn-pill {
  background: rgba(240, 184, 168, 0.22);
}

.bn-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.bn-icon--emoji {
  font-size: 1.15rem;
  line-height: 1;
  justify-content: center;
}

.bn-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

/* ── Notification badge ──────────────────────────────────── */
.bn-badge {
  display: none;
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  width: 8px;
  height: 8px;
  background: #e53935;
  border-radius: 50%;
  border: 1.5px solid var(--header-bg, #1a1a2e);
  z-index: 2;
}
.bn-badge.visible {
  display: block;
}

/* ── Hide mobile header controls replaced by bottom nav ──── */
@media (max-width: 768px) {
  .settings-btn { display: none !important; }
  .events-header-btn { display: none !important; }
  .daily-tasks-header-btn { display: none !important; }
}

@media (max-width: 768px) {
  main {
    padding-bottom: calc(64px + env(safe-area-inset-bottom) + 16px) !important;
  }
}

/* ── Desktop: hide everything ────────────────────────────── */
@media (min-width: 769px) {
  .bottom-nav {
    display: none !important;
  }
  /* Mobile-only sheets; daily tasks sheet can open from header on desktop */
  .bn-86-sheet,
  #bn-86-overlay {
    display: none !important;
  }
}

/* ── Shared bottom sheet styles ──────────────────────────── */
.bn-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.bn-sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.bn-86-sheet,
.bn-daily-tasks-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(255,255,255,.12);
  z-index: 1200;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(.32,.72,0,1);
  max-height: 70vh;
  overflow-y: auto;
}
.bn-daily-tasks-sheet {
  max-height: min(88vh, 900px);
}
.bn-86-sheet.open,
.bn-daily-tasks-sheet.open {
  transform: translateY(0);
}

.bn-sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,.2);
  border-radius: 2px;
  margin: 0 auto 16px;
  flex-shrink: 0;
}

.bn-sheet-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

/* ── 86 sheet content ────────────────────────────────────── */
.bn-86-empty {
  text-align: center;
  padding: 20px 0 8px;
  color: var(--ink-soft);
  font-size: 14px;
}

.bn-86-section {
  margin-bottom: 12px;
}

.bn-86-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.bn-86-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bn-86-chip {
  background: rgba(220,60,60,.15);
  border: 1px solid rgba(220,60,60,.3);
  color: var(--ink);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}
