/* ===============================================================
   Bad Bets — Mobile bottom nav: 5 icon tabs, sticky, mobile only
   =============================================================== */

.bb-bottom-nav {
  display: none;  /* hidden by default; shown on mobile */
}

@media (max-width: 800px) {
  .bb-bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    /* Solid background + an extra spacer below (negative-margin trick) so
       when iOS Safari resizes the viewport during scroll (URL bar show/hide)
       no gap appears between the nav and the screen bottom. */
    background: #0b0e14;
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    margin-bottom: -100px;
    padding-bottom: calc(106px + env(safe-area-inset-bottom));
    justify-content: space-around;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.3);
  }

  .bb-bnav-item {
    flex: 1 1 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--muted);
    transition: all .15s;
    min-width: 0;
  }
  .bb-bnav-item:active { transform: scale(0.96); background: rgba(255,255,255,0.04); }
  .bb-bnav-item.active {
    color: var(--text);
  }
  .bb-bnav-item.active .bb-bnav-icon {
    transform: scale(1.1);
    text-shadow: 0 0 12px rgba(255,170,0,0.5);
  }

  .bb-bnav-icon {
    font-size: 20px;
    line-height: 1;
    transition: transform .2s;
  }
  .bb-bnav-label {
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
  }

  /* Push content above the bottom nav so it doesn't get hidden */
  body.has-bottom-nav {
    padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
  }
  body.has-bottom-nav main { padding-bottom: 20px; }

  /* "More" button — styled identically to other items but as a <button> */
  .bb-bnav-more {
    background: transparent;
    border: 0;
    font-family: inherit;
    cursor: pointer;
  }
}

/* ===== More sheet — slide-up overlay listing every page ===== */
.bb-more-sheet {
  position: fixed; inset: 0;
  z-index: 1200;
  display: none;
  pointer-events: none;
}
.bb-more-sheet.open {
  display: block;
  pointer-events: auto;
}
.bb-more-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .18s ease;
}
.bb-more-sheet.open .bb-more-overlay { opacity: 1; }

.bb-more-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--surface-2, #131720);
  border-top: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  max-height: 82vh;
  overflow-y: auto;
  padding: 0 14px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform .25s cubic-bezier(0.34, 1.2, 0.64, 1);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
}
.bb-more-sheet.open .bb-more-panel { transform: translateY(0); }

.bb-more-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 6px;
}
.bb-more-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.bb-more-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
}
.bb-more-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
  padding: 0;
  width: 32px; height: 32px;
  cursor: pointer;
}
.bb-more-close:hover { color: var(--text); }

.bb-more-section {
  margin-bottom: 18px;
}
.bb-more-section-label {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted);
  margin: 0 4px 8px;
}
.bb-more-section[data-accent="amber"] .bb-more-section-label { color: var(--amber); }
.bb-more-section[data-accent="green"] .bb-more-section-label { color: var(--green); }
.bb-more-section[data-accent="red"]   .bb-more-section-label { color: #ff8080; }

.bb-more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.bb-more-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-2);
  transition: all .15s;
  min-height: 76px;
  justify-content: center;
}
.bb-more-item:active { transform: scale(0.97); }
.bb-more-item.active {
  background: rgba(255,170,0,0.10);
  border-color: rgba(255,170,0,0.4);
  color: var(--amber);
}
.bb-more-item-icon {
  font-size: 22px;
  line-height: 1;
}
.bb-more-item-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.8px;
  text-align: center;
  text-transform: uppercase;
}
