/**
 * [cda_menu] (CDA_Menu): the footer menus and the mobile hamburger menu.
 *
 * Colours come from the Elementor kit's globals, with the live values as
 * fallbacks. Every link sets its own hover colour: the kit's a:hover would
 * turn it accent red. Selectors are two classes plus the element, which
 * beats the theme's ul/li margins and the kit's ".elementor-kit-25 a".
 */

.cda-menu {
    --cda-menu-text: var(--e-global-color-89b7035, #cdd2d7); /* Grey 300 */
    --cda-menu-row: var(--e-global-color-3433412, #222032); /* Grey 800 */
    --cda-menu-row-hover: var(--e-global-color-e30960e, #322f4c); /* Grey 700 */
}

.cda-menu .cda-menu__list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cda-menu .cda-menu__list li {
    margin: 0;
    padding: 0;
}

/* Footer: plain links under each column heading. */

.cda-menu.cda-menu--footer a {
    display: block;
    padding: 5px 0;
    color: var(--cda-menu-text);
    font-family: "Blackbird Narrow", arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    text-decoration: none;
    transition: color 0.15s;
}

.cda-menu.cda-menu--footer a:hover,
.cda-menu.cda-menu--footer a:focus-visible {
    color: #ffffff;
}

/* Mobile: full-width rows 2px apart, like the archive's filter rows. The
   current page is the lighter row, as on the filters. */

.cda-menu.cda-menu--mobile .cda-menu__list {
    gap: 2px;
}

.cda-menu.cda-menu--mobile a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 4px;
    background: var(--cda-menu-row);
    color: #ffffff;
    font-family: "Blackbird Narrow", arial, sans-serif;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
}

.cda-menu.cda-menu--mobile a:hover,
.cda-menu.cda-menu--mobile a:focus-visible {
    background: var(--cda-menu-row-hover);
    color: #ffffff;
}

.cda-menu.cda-menu--mobile a[aria-current="page"] {
    background: var(--cda-menu-row-hover);
}

/* The mobile menu popup (217152). Its column carries .cda-menu-panel and
   the account-button containers .cda-menu-actions: the buttons sit at the
   bottom of the panel and stay pinned there when the menu scrolls on short
   phones. Their padding and Grey 900 background are set in Elementor, which
   has no setting for either of these. */
.cda-menu-panel > .elementor-widget-wrap {
    flex-direction: column;
    flex-wrap: nowrap;
}

/* With the admin bar showing, Elementor makes popups sticky instead of
   fixed (body.admin-bar .dialog-type-lightbox), so scrolling over the menu
   scrolls the page away under it. Keep this popup fixed, below the bar, and
   take the bar off its heights, so a menu taller than the screen scrolls
   inside the panel with the buttons pinned. Visitors never get the bar. The
   panel rule needs five classes to outrank the popup's own min-height. */
body.admin-bar .elementor-popup-modal:has(.cda-menu-panel) {
    position: fixed;
    top: var(--wp-admin--admin-bar--height, 46px);
    height: calc(100% - var(--wp-admin--admin-bar--height, 46px));
}

body.admin-bar .elementor-popup-modal:has(.cda-menu-panel) .dialog-message {
    max-height: calc(100vh - var(--wp-admin--admin-bar--height, 46px));
}

body.admin-bar .elementor-location-popup .elementor-section > .elementor-container:has(> .cda-menu-panel) {
    min-height: calc(100vh - var(--wp-admin--admin-bar--height, 46px));
}

.cda-menu-panel .e-con.cda-menu-actions {
    position: sticky;
    z-index: 1;
    bottom: 0;
    margin-top: auto;
}

@media (prefers-reduced-motion: reduce) {
    .cda-menu.cda-menu--footer a {
        transition: none;
    }
}
