/* ============================================================
   dropdown.css — dropdown panels
   ============================================================
   ONE canonical dropdown look on BOTH Bricks-generated panels:
     • header Nav Menu submenu     → <ul class="sub-menu">
     • standalone Dropdown element → <ul class="brx-dropdown-content">
   Baked onto Bricks' own classes (no per-element classes) so every
   dropdown stays identical.

   GOTCHA: clear the Nav Menu element's own "Dropdown" settings sub-panel
   (separate from its Colour/Typography) — uncleared, the submenu keeps
   Bricks' square panel + blue hover.
   Conventions: _shared/bricks-builder/css-conventions.md

   Last updated: 2026-10-12 (auto-stamped by the pre-commit hook)
   ============================================================ */

/* The floating panel — a lifted surface, like a small card. */
.nav-menu .bricks-nav-menu-wrapper .sub-menu,
.brx-dropdown-content {
    background-color: var(--surface-base);   /* token, not Bricks' #fff — so it flips in dark mode */
    border: var(--border-width-base) solid var(--border-subtle);
    border-radius: var(--radius-3);
    box-shadow: var(--elevation-dropdown);
    background-image: var(--elevation-overlay-dropdown);
    padding: var(--space-2xs);               /* inset so the rows float inside the panel */
}

/* Each item is a full-width row with its own rounded hover fill.
   width:100% + background-image:none reset the nav bar's fit-content
   width and sliding hairline-underline, which submenu links inherit. */
.nav-menu .bricks-nav-menu-wrapper .sub-menu a,
.brx-dropdown-content a {
    display: block;
    width: 100%;
    padding: var(--space-xs) var(--space-s); /* ~44px tall = comfortable touch target */
    border-radius: var(--radius-2);          /* one step tighter than the panel */
    color: var(--text-base);                 /* readable dark rows, not inline-link blue */
    background-image: none;
    text-decoration: none;
    transition: background-color var(--transition-base),
                color var(--transition-base);
}

/* Hover + keyboard focus → subtle fill, tonal to the panel's OWN
   surface (tokens.css §3) — not --surface-subtle, which is now the
   darker of the two surface roles in dark mode (row 122) and would
   darken the row on hover instead of lightening it. */
.nav-menu .bricks-nav-menu-wrapper .sub-menu a:hover,
.nav-menu .bricks-nav-menu-wrapper .sub-menu a:focus-visible,
.brx-dropdown-content a:hover,
.brx-dropdown-content a:focus-visible {
    background-color: var(--surface-base-hover);
    color: var(--text-base);
    text-decoration: none;                   /* in case Theme Styles adds a hover underline */
}

/* Current page inside the dropdown → brand colour + semibold, so it's
   marked by more than colour alone. Both panels, like every other rule
   in this file — the standalone Dropdown needs the non-colour marker
   just as much. (The nav bar's own aria-current hairline is handled in
   navigation.css; this overrides it for submenu rows.) */
.nav-menu .bricks-nav-menu-wrapper .sub-menu a[aria-current="page"],
.brx-dropdown-content a[aria-current="page"] {
    color: var(--text-link);
    font-weight: 600;
}
