/* ========== BARRE DE NAVIGATION FRIENDLY SYSTEM 7 ========== */

/* 🩶 STYLE GÉNÉRAL DE LA BARRE */
.bb-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 720px;             /* même largeur que la .window */
  margin: 10px auto 14px;       /* centrée et séparée visuellement */
  background: linear-gradient(135deg, #fefefe 0%, #f5f5f5 100%);
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.15);
  padding: 8px;
  box-sizing: border-box;
}

/* 🩷 STYLE DES BOUTONS */
.bb-nav-btn {
  flex: 1;
  margin: 0 4px;
  padding: 12px 0;              /* +20% de hauteur (10px -> 12px) */
  font-family: "Chicago", "Geneva", sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff9f0 0%, #ffe9d6 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  color: #2d2d2d;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.3px;
}

/* 🪄 Effets interactifs */
.bb-nav-btn:hover {
  background: linear-gradient(135deg, #ffefd9 0%, #ffd4a3 100%);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.15);
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.3);
}

.bb-nav-btn:active {
  background: linear-gradient(135deg, #ffe5c2 0%, #ffbe7a 100%);
  transform: translateY(0) scale(0.98);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bb-nav-dropdown-wrapper {
  position: relative;
  display: inline-block;
  flex: 1;
  margin: 0 4px;
}

.bb-nav-btn--menu {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bb-dropdown[hidden] {
  display: none !important;
}

.bb-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(92vw, 280px);
  width: max-content;
  box-sizing: border-box;
  max-height: min(60vh, 320px);
  overflow: auto;
  margin-right: env(safe-area-inset-right, 0);
  margin-left: env(safe-area-inset-left, 0);
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  background: var(--window-bg, #fff);
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.bb-dropdown__item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font-family: "Chicago", "Geneva", sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  text-align: left;
  color: #2d2d2d;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff 0%, #ffefe0 100%);
  cursor: pointer;
  transition: all 0.2s ease;
}

.bb-dropdown__item:hover {
  background: linear-gradient(135deg, #ffefd9 0%, #ffd4a3 100%);
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.35);
}

.bb-dropdown__item:active {
  transform: translateY(0);
}

.bb-dropdown [role="menuitem"] {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  line-height: 1.2;
  white-space: nowrap;
}

/* 🚫 ÉVITER LES SUPERPOSITIONS */
body {
  margin-top: 0;
}

/* 🧱 RESPONSIVE – IPHONE */
@media (max-width: 640px) {
  .bb-topbar {
    max-width: 95%;
    flex-wrap: nowrap;
    padding: 6px;
  }

  .bb-nav-btn {
    font-size: 13px;
    padding: 10px 0;              /* +20% aussi sur mobile (8px -> 10px) */
    margin: 0 3px;
    border-radius: 6px;
  }

  .bb-nav-btn:hover {
    transform: translateY(-0.5px) scale(1.01);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.12);
  }

  .bb-nav-btn:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  }

  .bb-dropdown {
    right: 8px;
    left: auto;
    max-width: calc(100vw - 24px);
  }
}

/* ========== AUTRES STYLES ========== */

.leaderboard-title {
  color: inherit;
  opacity: 1;
  text-transform: none;
  letter-spacing: 0;
  text-shadow: none;
  background: none;
  display: block;
  font-size: 18px;
  font-weight: 700;
}

/* Hide window title text only on waiter home and profile pages */
.waiter-home-page .title-text,
.waiter-profile-page .title-text {
  display: none;
}
