/*
 * TRUSKEYS — BURGER MENU
 * Enfold Child Theme / css/05-burger-menu.css
 *
 * Scope:
 * - Mobile menu Quote CTA
 * - Burger visibility on desktop/tablet
 * - Mobile hamburger positioning and sizing
 * - 767px–768px fractional-width navigation correction
 *
 * Migration notes:
 * - The mobile Quote CTA rules were moved from the old Header Quote CTA block.
 * - Desktop Header Quote CTA rules remain in the Header module.
 * - The tablet rule that hides the desktop Header Quote CTA remains in the Header module.
 */

/* =========================================================
   01. MOBILE MENU — QUOTE CTA
   The CTA is rendered inside Enfold's burger menu list.
   ========================================================= */

@media only screen and (max-width: 989px) {

    #top #header #av-burger-menu-ul > li.menu-mobile-quote {
        display: block !important;
        width: 100% !important;
        margin: 22px 0 30px !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        text-align: center !important;
    }

    #top #header #av-burger-menu-ul > li.menu-mobile-quote > a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: min(310px, calc(100% - 40px)) !important;
        min-width: 0 !important;
        max-width: 310px !important;
        height: 52px !important;
        min-height: 52px !important;
        margin: 0 auto !important;
        padding: 0 24px !important;
        box-sizing: border-box !important;
        background: #0786df !important;
        border: 1.5px solid #0786df !important;
        border-radius: 14px !important;
        color: #ffffff !important;
        font-size: 15px !important;
        line-height: 1 !important;
        font-weight: 600 !important;
        text-align: center !important;
        text-indent: 0 !important;
        text-decoration: none !important;
        box-shadow: 0 5px 14px rgba(0,126,220,0.16) !important;
        transition:
            background-color 0.20s ease,
            border-color 0.20s ease,
            transform 0.20s ease,
            box-shadow 0.20s ease !important;
    }

    #top #header #av-burger-menu-ul > li.menu-mobile-quote > a .avia-menu-text {
        display: inline !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #ffffff !important;
        font-size: 15px !important;
        line-height: 1 !important;
        font-weight: 600 !important;
        text-align: center !important;
    }

    #top #header #av-burger-menu-ul > li.menu-mobile-quote > a::after {
        content: "→" !important;
        display: inline-block !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        margin-left: 10px !important;
        padding: 0 !important;
        border: none !important;
        color: #ffffff !important;
        font-size: 18px !important;
        line-height: 1 !important;
        transition: transform 0.20s ease !important;
    }

    #top #header #av-burger-menu-ul > li.menu-mobile-quote .av-submenu-indicator,
    #top #header #av-burger-menu-ul > li.menu-mobile-quote .avia-bullet,
    #top #header #av-burger-menu-ul > li.menu-mobile-quote .bullet {
        display: none !important;
    }

    #top #header #av-burger-menu-ul > li.menu-mobile-quote > a:hover {
        background: #006fbe !important;
        border-color: #006fbe !important;
        color: #ffffff !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 7px 17px rgba(0,105,190,0.23) !important;
    }

    #top #header #av-burger-menu-ul > li.menu-mobile-quote > a:hover::after {
        transform: translateX(3px) !important;
    }
}


/* =========================================================
   02. DESKTOP / TABLET — HIDE BURGER
   PC navigation remains active from 768px upward.
   ========================================================= */

@media only screen and (min-width: 768px) {

    #top #header .av-burger-menu-main {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }
}


/* =========================================================
   03. MOBILE — BURGER BUTTON BASE
   Applies continuously below 768px, including fractional widths
   between 767px and 768px.
   ========================================================= */

@media screen and (width < 768px) {

    #top #header .av-burger-menu-main {
        position: relative !important;
        height: 72px !important;
        line-height: 72px !important;
        z-index: 220 !important;
    }

    #top #header .av-hamburger {
        position: relative !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
    }
}


/* =========================================================
   04. SMALL PHONES — <= 600px
   Preserve the existing compact-header icon adjustment.
   ========================================================= */

@media only screen and (max-width: 600px) {

    #top #header .av-burger-menu-main {
        height: 64px !important;
        line-height: 64px !important;
    }

    #top #header .av-hamburger {
        top: 50% !important;
        transform: translateY(calc(-50% - 12px)) !important;
    }
}


/* =========================================================
   05. FRACTIONAL BREAKPOINT — 767px < width < 768px
   Switch from desktop navigation to the burger menu.
   The burger sizing itself is handled by Section 03 above.
   ========================================================= */

@media screen and (767px < width < 768px) {

    html.responsive #top #wrap_all #header .av-main-nav > li:not(.av-burger-menu-main) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    html.responsive #top #wrap_all #header .main_menu,
    html.responsive #top #wrap_all #header .av-main-nav-wrap {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    html.responsive #top #wrap_all #header .av-main-nav > li.av-burger-menu-main {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        pointer-events: auto !important;
        height: 72px !important;
        line-height: 72px !important;
    }
}

/* ================= END BURGER MENU CSS ================= */
