/* ============================================================================
   mv-drill.css — Abt.com-style hamburger DRILL-DOWN menu.
   The panel is built entirely client-side by mv-drill.js from the category tree
   already in the DOM inside .mv-megamenu (no backend / SQL / AJAX).

   ADDITIVE & REVERSIBLE:
   - Keeps the desktop .mv-megamenu horizontal bar exactly as-is.
   - Shows ONE hamburger at every breakpoint that opens a separate off-canvas
     drill panel (.mv-drill).
   - Reversibly neutralises the legacy "#header-menu becomes the drawer" behaviour
     below 1200px so the new panel is the only drawer (bar stays hidden there, as
     before — the bar still shows >=1200).
   Remove this file + js/mv-drill.js + the two <sys:*> includes to fully revert.
   ============================================================================ */

/* Hamburger visible at ALL widths (override the theme default display:none and the
   <=1200 full-width drawer-header styling). Compact button, sits left of the bar. */
#mv-menu-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    width: auto !important;
    background: var(--site-button-bg, #2c3e50);
    color: #fff;
    border: 0;
    border-radius: 0;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    padding: 4px 9px;
    border-right: 1px solid rgba(255,255,255,.22);
    /* margin: 4px 8px; */
    cursor: pointer;
    box-sizing: border-box;
}
#mv-menu-toggle svg { stroke: currentColor; }
/* Match the mega-menu bar items (.mv-mm-top): same font family / size / weight. */
#mv-menu-toggle span {
    font-family: var(--site-menu-font, Arial, Helvetica, sans-serif) !important;
    font-size: var(--site-menu-size, 14px) !important;
    font-weight: bold !important;
    line-height: 1.2;
}

/* ---- Off-canvas drill panel (left), at all widths ---- */
.mv-drill {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 88%;
    max-width: 360px;
    background: #fff;
    z-index: 100001;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 2px 0 16px rgba(0, 0, 0, .4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}
body.mv-menu-open .mv-drill { transform: translateX(0); }
.mv-drill[hidden] { display: none; }

/* Backdrop at all widths (the theme only shows #mv-menu-backdrop <=1200) */
body.mv-menu-open #mv-menu-backdrop {
    display: block !important;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, .3);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 100000;
}

/* Panel chrome */
.mv-drill__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--site-header-end, #396b9e);
    color: #fff;
    flex: 0 0 auto;
}
.mv-drill__back {
    display: none;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    background: none;
    border: 0;
    color: inherit;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-family: inherit;
}
.mv-drill__back:hover, .mv-drill__back:focus { background: rgba(255, 255, 255, .18); outline: none; }
.mv-drill.is-deep .mv-drill__back { display: inline-flex; }
.mv-drill__title {
    flex: 1 1 auto;
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    color: #fff;   /* head bg is the dark brand colour; force white (was inheriting #444) */
}
.mv-drill__close {
    flex: 0 0 auto;
    background: none;
    border: 0;
    color: inherit;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.mv-drill__close:hover, .mv-drill__close:focus { opacity: .8; outline: none; }

.mv-drill__viewall {
    display: none;
    padding: 11px 16px;
    background: var(--site-surface, #f3f6fa);
    color: var(--site-link-hover, #2c5aa0) !important;
    font-weight: bold;
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px solid #e8e8e8;
    flex: 0 0 auto;
}
.mv-drill.has-viewall .mv-drill__viewall { display: block; }
.mv-drill__viewall:hover, .mv-drill__viewall:focus { background: #e9eef5; outline: none; }

.mv-drill__list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1 1 auto;
}
.mv-drill__list li { margin: 0; }
.mv-drill__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 13px 16px;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    color: #222 !important;
    /* Mega-menu font family, bigger for the flyout; NOT bold (per user). */
    font-family: var(--site-menu-font, Arial, Helvetica, sans-serif) !important;
    font-size: 16px !important;
    font-weight: normal !important;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.mv-drill__label { font-size: 16px !important; font-weight: normal !important; }
.mv-drill__item:hover, .mv-drill__item:focus { background: #f3f6fa; outline: none; }
.mv-drill__label { flex: 1 1 auto; min-width: 0; }
.mv-drill__chev { flex: 0 0 auto; color: #9aa0a6; font-size: 18px; line-height: 1; }

/* Slide transitions: left when drilling deeper, right when going back. */
.mv-drill__list.is-deeper { animation: mvDrillInL .2s ease; }
.mv-drill__list.is-back { animation: mvDrillInR .2s ease; }
@keyframes mvDrillInL { from { transform: translateX(34px); opacity: .25; } to { transform: translateX(0); opacity: 1; } }
@keyframes mvDrillInR { from { transform: translateX(-34px); opacity: .25; } to { transform: translateX(0); opacity: 1; } }

/* ---- Keep the inline hamburger visible when the bar collapses below 1200 ----
   The hamburger now lives INSIDE the horizontal bar
   (#header-menu > ul.mv-megamenu > li.mv-mm-toggle > #mv-menu-toggle). The theme's legacy
   responsive rule turns #header-menu into an off-canvas drawer (position:fixed; transform:
   translateX(-100%)), which drags the inline hamburger off-screen together with the hidden bar.
   The real drawer is now .mv-drill, so KEEP #header-menu in normal flow and collapse it to show
   ONLY the hamburger toggle — every other bar item is hidden at this width. */
@media (max-width: 1200px) {
    #header-menu {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        z-index: auto !important;
        box-shadow: none !important;
        background: linear-gradient(var(--site-header-start, #497bae), var(--site-header-end, #396b9e)) !important;
    }
    body.mv-menu-open #header-menu { transform: none !important; }
    #header-menu .mv-megamenu {
        display: flex !important;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        background: none !important;
        box-shadow: none !important;
        border: 0 !important;
    }
    /* hide every bar item except the hamburger toggle */
    #header-menu .mv-megamenu > .mv-mm-item:not(.mv-mm-toggle) { display: none !important; }
    #header-menu .mv-mm-toggle {
        display: inline-flex !important;
        width: auto !important;
        max-width: none !important;
        float: none !important;
        border: 0 !important;
    }
    #header-menu #mv-menu-close { display: none !important; }
}

/* ---- abt-style: bigger fonts + generous line spacing + category icons (all levels) ---- */
/* Drill items use the SAME font size as the mega-menu bar (the admin Menu-font-size setting,
   var(--site-menu-size)); falls back to 16px when no theme value is present. */
.mv-drill__item { font-size: var(--site-menu-size, 16px); padding: 16px 16px; }
.mv-drill__title { font-size: 21px; }
.mv-drill__viewall { font-size: 16px; padding: 14px 16px; }
.mv-drill__icon {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    margin-right: 12px;
    color: inherit; /* match the item's text colour */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mv-drill__icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.7; }
/* Admin-assigned per-category SVG (bvc_Category.MenuSvgIcon): these are FILL-based, not stroke
   outlines, so override fill:none and paint them in the site header colour. */
.mv-drill__icon--custom svg { fill: var(--site-header-end, #396b9e) !important; stroke: none !important; }
.mv-drill__icon--custom svg * { fill: var(--site-header-end, #396b9e) !important; stroke: none !important; }
