/* Sidebar-only scrollbar hiding: keep scrolling enabled, hide all scrollbar chrome. */

.mn-desktop-sidebar-nav {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-right: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

.mn-desktop-sidebar-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.mn-desktop-sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.mn-desktop-sidebar-nav::-webkit-scrollbar-thumb {
  background: transparent;
}

/* Safety guard if scrolling is delegated to the outer sidebar wrapper. */
.mn-desktop-sidebar {
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-sizing: border-box;
}

.mn-desktop-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.mn-desktop-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.mn-desktop-sidebar::-webkit-scrollbar-thumb {
  background: transparent;
}


/* ════════════════════════════════════════════════════════════════════
   VALORY  ·  Accent glow (Phase 2)
   Applied to specific surfaces only. Overuse kills the effect.
   ════════════════════════════════════════════════════════════════════ */

/* 1. Primary CTAs on hover. */
.mn-btn-primary,
.start-btn,
.action-btn,
.hero-cta,
.btn-grad {
  transition: box-shadow var(--duration-base) var(--ease-out),
              transform   var(--duration-fast) var(--ease-out);
}
.mn-btn-primary:hover,
.start-btn:hover,
.action-btn:hover,
.hero-cta:hover,
.btn-grad:hover {
  box-shadow: var(--glow-accent);
}

/* 2. Active sidebar item. */
.mn-desktop-link.is-active,
.mn-desktop-link[aria-current="page"] {
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  /* Half-intensity glow so it sits in the sidebar without competing
     with primary CTAs. */
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.10);
}

/* 3. Live status indicators. */
@keyframes valory-pulse {
  0%, 100% {
    opacity: 0.65;
    box-shadow: 0 0 0 0 var(--accent-glow);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 0 8px rgba(251, 191, 36, 0);
  }
}
.live-indicator,
.studying-now-dot,
.live-dot,
.is-live-dot {
  background: var(--accent);
  animation: valory-pulse 2.4s var(--ease-out) infinite;
}

/* 4. Stat numbers (streak / study-time / level / XP).
   The color IS the emphasis. No backgrounds, no borders. */
.streak-num,
.streak-value,
.study-time-value,
.study-today-value,
.level-number,
.xp-value {
  color: var(--accent);
}

/* 5. Gold and diamond tier badges only. Bronze and silver stay
   amber-toned via existing styles but receive no glow. */
.vhero__tier-badge.vhero__tier--gold,
.vhero__tier-badge.vhero__tier--diamond,
.tier-badge.tier-gold,
.tier-badge.tier-diamond {
  box-shadow: var(--glow-accent);
}


/* ════════════════════════════════════════════════════════════════════
   VALORY  ·  Page-enter motion (Phase 2)
   Felt, not seen. 8px translate, 320ms, 60ms stagger. Do not retune.
   Reduced motion handled centrally in tokens.css (duration vars → 0).
   ════════════════════════════════════════════════════════════════════ */

@keyframes valory-enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* fill-mode is `backwards`, NOT `both`: `both` leaves the to-frame's
   transform computed forever, which makes every direct child of <main> a
   containing block for its position:fixed descendants — modals then size to
   the wrapper instead of the viewport and render clipped. `backwards` still
   holds the from-frame through animation-delay, and the to-frame is the
   element's natural state anyway, so nothing changes visually. */
main > *,
.mn-main > * {
  animation: valory-enter var(--duration-slow) var(--ease-out) backwards;
}

main > *:nth-child(1), .mn-main > *:nth-child(1) { animation-delay: 0ms; }
main > *:nth-child(2), .mn-main > *:nth-child(2) { animation-delay: 60ms; }
main > *:nth-child(3), .mn-main > *:nth-child(3) { animation-delay: 120ms; }
main > *:nth-child(4), .mn-main > *:nth-child(4) { animation-delay: 180ms; }
main > *:nth-child(n+5), .mn-main > *:nth-child(n+5) { animation-delay: 240ms; }

/* ── Mentor phone tabs (partials/mobile_app_shell.html) ─────────────────────
   Below 769px only; above it the rail is the menu. Under Bootstrap's modals
   (1050+) and the drawer's scrim (1500), over the page. */
.app-tabbar { display: none; }
@media (max-width: 768px) {
  .app-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 28px -22px rgba(0, 0, 0, .45);
  }
  .app-tab {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 50px; border-radius: 12px;
    color: var(--text-muted) !important; text-decoration: none !important;
    font-size: 11.5px; line-height: 1.1; font-weight: 650;
  }
  .app-tab svg { width: 22px; height: 22px; }
  .app-tab.is-active { color: var(--primary) !important; font-weight: 750; }
  .app-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
  .app-tab-badge {
    position: absolute; top: 2px; left: calc(50% + 7px);
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: var(--primary); color: var(--primary-text);
    font-size: 10.5px; line-height: 18px; font-weight: 800; text-align: center;
    font-variant-numeric: tabular-nums;
  }
}

/* ── Mentors (body.mn-mentor) ────────────────────────────────────────────────
   Their open rail carries search, notifications and Help, so the floating top bar
   and the floating help button step aside. Closed, the top bar comes back without
   the old "My Classes" pill. Theme is in Settings only (owner 2026-10-29). */
@media (min-width: 769px) {
  body.mn-mentor.mn-sidebar-expanded .mn-header { display: none; }
  /* Its old height without the pill: the chats' Back pill is placed on the line of this bar's
     buttons (half of a 58.5px island, lobby_chat.html / social/chat.html). */
  body.mn-mentor .mn-top-island { width: auto; min-width: 0; min-height: 58.5px; }
  /* The bar's buttons sit in the top-right corner (owner 2026-10-29), not centred. */
  body.mn-mentor .mn-header .container-xl { max-width: none; }
  body.mn-mentor .mn-center { left: auto; right: 0; transform: none; }
  /* The search box spans the island, which is two buttons wide here: give it room, opening leftwards. */
  body.mn-mentor .mn-top-island .mn-search-panel { left: auto; width: min(360px, calc(100vw - 48px)); }

  /* The open rail's search and bell sit on the logo row, just left of the collapse button, and look
     like it (coffee_creme_chrome.css section 3). Out of flow, so the closed 64px row keeps its shape;
     they appear once the rail has finished opening, so they are never drawn past its edge mid-slide.
     All three are 34px with 7px gaps: at 38px the search button touched the wordmark. right: the
     toggle slot's 64px, less the 15px beside a 34px toggle, plus the 7px gap. */
  .mn-rail-actions {
    position: absolute; top: 50%; right: calc(var(--mn-sidebar-collapsed) - 8px); z-index: 2;
    transform: translateY(-50%);
    display: flex; align-items: center; gap: 7px;
    visibility: hidden; opacity: 0;
  }
  body.mn-sidebar-expanded .mn-rail-actions {
    visibility: visible; opacity: 1;
    transition: opacity .15s ease var(--mn-sidebar-dur), visibility 0s linear var(--mn-sidebar-dur);
  }
  html .mn-rail-actions .mn-icon-btn {
    width: 34px !important; height: 34px !important; border-radius: 10px; padding: 0;
    background: var(--cc-chrome-bg) !important;
    border: 1px solid var(--cc-chrome-border) !important;
    color: var(--cc-chrome-icon) !important;
    box-shadow: none !important;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
  }
  html .mn-rail-actions .mn-icon-btn:hover,
  html .mn-rail-actions .mn-icon-btn:focus-visible,
  html .mn-rail-actions .mn-icon-btn.active {
    background: color-mix(in srgb, var(--cc-amber) 16%, transparent) !important;
    border-color: color-mix(in srgb, var(--cc-amber) 45%, transparent) !important;
    color: var(--cc-amber) !important;
  }
  .mn-rail-actions .mn-sidebar-icon { width: 18px; height: 18px; color: inherit; }
  body.mn-mentor.mn-sidebar-expanded .mn-desktop-sidebar-edge-toggle {
    width: 34px !important; height: 34px !important; flex-basis: 34px !important; border-radius: 10px !important;
  }
  body.mn-mentor.mn-sidebar-expanded .mn-desktop-sidebar-toggle-icon { width: 18px; height: 18px; }
  .mn-rail-actions .mn-search-panel { left: 0; right: auto; top: 46px; width: min(340px, 78vw); }
}
@media (max-width: 768px) {
  .mn-rail-actions { display: none; }
}
body.mn-mentor:has(#mnDesktopLeftRail) .vsupport-fab { display: none; }
body.mn-mentor .mn-desktop-help-btn { width: 100%; border: 0; background: transparent; text-align: left; }
body.mn-mentor .mn-desktop-link .mn-nav-badge,
body.mn-mentor .mn-desktop-link .mn-nav-badge.mn-nav-badge--social {
  background: var(--primary);
  color: var(--primary-text);
  box-shadow: none;
  font-variant-numeric: tabular-nums;
}
/* Sign out stays red, at a red that reads on the rail (it was 3.9:1 in light). */
html body.mn-mentor .mn-desktop-signout-btn,
html body.mn-mentor .mn-desktop-signout-btn .mn-sidebar-icon { color: var(--danger) !important; }
/* The badge's look lives in base.html's desktop block only, so in the phone menu it
   was a bare number; with the colour above it became a box. Give it its shape there. */
@media (max-width: 768px) {
  body.mn-mentor .mn-desktop-link .mn-nav-badge {
    margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; line-height: 1; font-weight: 800;
  }
}
/* The chats' Back pill sits in the top bar's row, which a mentor's open rail hides; the
   rail's own Classes / Messages link is the way back there. */
@media (min-width: 769px) {
  body.mn-mentor.mn-sidebar-expanded .chat-back-pill { display: none !important; }
}
/* base.html paints EVERY <h2> as gradient text whose first stop is 22% alpha, so a mentor's
   section headings faded out on the left (launch audit P1-13). On mentor pages they read as
   solid ink; the student pages keep the base rule until their own design pass. */
body.mn-mentor h2 { background: none; -webkit-text-fill-color: currentColor; }
