/* ==========================================================================
   Primary nav dropdowns (site-wide).
   - Panels anchor flush below the nav, single column, no overlap.
   - Clean text rows with a precise hover; the Light Bee 2 promo row is the
     one row that carries an image.
   - Shop: centred mega-panel grid, always on screen.
   ========================================================================== */

@media (min-width: 768px) {

  #page .menu-item-has-children { position: relative; }

  /* ---- base panel ---- */
  #page .menu-item-has-children ul.sub-menu {
    column-count: auto;
    columns: unset;
    top: 100%;
    left: 0;
    margin: 0 0 0 -1em;
    width: 21rem;
    background: #0c0c0d;
    border: 1px solid #232326;
    border-top: 2px solid #32cd32;
    padding: 0.35rem 0;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  }

  #page .menu-item-has-children ul.sub-menu li {
    border-bottom: 1px solid #17171a;
    padding: 0;
    margin: 0;
    font-size: 1.1rem;
    break-inside: avoid;
  }
  #page .menu-item-has-children ul.sub-menu li:last-of-type { border-bottom: 0; }

  /* rows keep their hairline even when hovered or current
     (the theme's global red hover border stays on the top-level nav only) */
  #page .menu-item-has-children ul.sub-menu li:hover,
  #page .menu-item-has-children ul.sub-menu li.current-menu-item,
  #page .menu-item-has-children ul.sub-menu li.current_page_item {
    border-bottom: 1px solid #17171a;
  }
  #page .menu-item-has-children ul.sub-menu li:last-of-type:hover { border-bottom: 0; }

  #page .menu-item-has-children ul.sub-menu li a,
  #page .menu-item-has-children ul.sub-menu li a:hover {
    border-bottom: 0;                /* kill the theme's red underline inside panels */
  }

  #page .menu-item-has-children ul.sub-menu li a {
    display: block;
    padding: 0.72em 1.3em 0.6em;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border-left: 2px solid transparent;
    transition: color 0.16s ease, border-color 0.16s ease,
                background-color 0.16s ease, padding-left 0.16s ease;
  }

  #page .menu-item-has-children ul.sub-menu li a:hover {
    color: #32cd32;
    border-left-color: #32cd32;
    background-color: #131315;       /* longhand: never resets image/repeat */
    padding-left: 1.55em;
  }

  /* ---- Light Bee 2 promo row (menu item 14631) ---- */
  #page li.menu-item-174 ul.sub-menu li.menu-lb2-promo {
    background: #101112;
    border-bottom: 1px solid #232326;
  }
  #page li.menu-item-174 ul.sub-menu li.menu-lb2-promo a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 5rem;
    padding-right: 9rem;
    background-image: url('../../assets/img/nav/nav-lb2.png');
    background-repeat: no-repeat;
    background-position: right 0.85em center;
    background-size: auto 3.4rem;
  }
  #page li.menu-item-174 ul.sub-menu li.menu-lb2-promo a:hover {
    background-color: #16171a;
    padding-left: 1.55em;
  }
  #page li.menu-item-174 ul.sub-menu li.menu-lb2-promo a::after {
    content: "New \00b7  \00a3 50 deposits open";
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #32cd32;
    white-space: nowrap;
    margin-top: 0.3em;
  }

  /* ---- Shop: centred mega-panel ---- */
  #page li.menu-item-175 { position: static; }

  #page li.menu-item-175 ul.sub-menu {
    width: min(64rem, calc(100vw - 2rem));
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
    padding: 0.75rem 1rem;
  }

  #page li.menu-item-175:hover ul.sub-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
    column-gap: 1.25rem;
  }

  #page li.menu-item-175 ul.sub-menu li { font-size: 1rem; }
  #page li.menu-item-175 ul.sub-menu li:last-of-type { border-bottom: 1px solid #17171a; }

  #page li.menu-item-175 ul.sub-menu li a {
    white-space: normal;
    padding: 0.6em 0.9em 0.5em;
  }
  #page li.menu-item-175 ul.sub-menu li a:hover { padding-left: 1.15em; }
}

/* ==========================================================================
   Top announcement bar — single line with rotating notes on mobile
   ========================================================================== */
@media (max-width: 47.99em) {
  #header-bar { padding-block: 0.3rem; overflow: hidden; }
  #header-bar p { white-space: nowrap; }
  .topbar-notes {
    position: relative;
    display: block;
    width: 100%;
    height: 1.5rem;
    overflow: hidden;
  }
  .topbar-note {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    animation: topbarNote 8s infinite;
  }
  .topbar-note:nth-child(3) { animation-delay: 4s; }
  @keyframes topbarNote {
    0%, 45%  { opacity: 1; }
    50%, 95% { opacity: 0; }
    100%     { opacity: 1; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .topbar-note { animation: none !important; }
  .topbar-notes .topbar-note:first-child { opacity: 1; }
}

/* ==========================================================================
   Coming-soon state for the Light Bee 2 menu entry (used on live pre-launch)
   ========================================================================== */
@media (min-width: 768px) {
  #page ul.sub-menu li.menu-coming-soon a { pointer-events: none; cursor: default; }
  #page li.menu-item-174 ul.sub-menu li.menu-lb2-promo.menu-coming-soon a::after { content: "Coming soon"; }
}
li.menu-coming-soon > a { pointer-events: none; cursor: default; }
