/* ============================================================================
   BAFLEH PUBLIC BRANDING B17 - 2026-09-06
   Loaded last. Public site only.
   Fixes: black navigation surfaces with white type, WhatsApp brand launcher,
   active/focus states, and residual theme conflicts from older public CSS.
   ============================================================================ */

:root {
    --b17-menu-bg: #090909;
    --b17-menu-bg-soft: #121212;
    --b17-menu-line: #292929;
    --b17-menu-text: #f7f7f5;
    --b17-menu-muted: #b9b9b4;
    --b17-menu-gold: #c8ab70;
    --b17-whatsapp: #25d366;
}

/* --------------------------------------------------------------------------
   DESKTOP DROPDOWN / MEGA MENU
   Keep the primary header itself white (Bafleh visual identity), but menus that
   open from it use a deliberate black luxury surface rather than inherited
   white theme panels.
   -------------------------------------------------------------------------- */
@media (min-width: 981px) {
    .bafleh-live-nav .new-menu-dropdown-panel {
        background: var(--b17-menu-bg) !important;
        border-color: var(--b17-menu-line) !important;
        box-shadow: 0 18px 48px rgba(0,0,0,.22) !important;
    }

    .bafleh-live-nav .new-menu-dropdown-panel a {
        color: var(--b17-menu-text) !important;
        background: transparent !important;
    }

    .bafleh-live-nav .new-menu-dropdown-panel a:hover,
    .bafleh-live-nav .new-menu-dropdown-panel a:focus-visible {
        color: #fff !important;
        background: #1b1b1b !important;
    }

    .bafleh-live-nav .new-menu-column h6 {
        color: var(--b17-menu-gold) !important;
    }
}

/* --------------------------------------------------------------------------
   MOBILE / TABLET OFF-CANVAS MENU
   Historical styles repeatedly reset this drawer to white. B17 owns every
   visible navigation surface so the open menu is consistently black/white.
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
    .bafleh-live-nav,
    .bafleh-live-nav.bafleh-nav-portaled,
    .bafleh-live-nav.is-open,
    .bafleh-live-nav.bafleh-nav-portaled.is-open {
        background: var(--b17-menu-bg) !important;
        color: var(--b17-menu-text) !important;
        border: 0 !important;
    }

    .mobile-nav-head {
        background: var(--b17-menu-bg) !important;
        color: var(--b17-menu-text) !important;
        border-bottom: 1px solid var(--b17-menu-line) !important;
    }

    .mobile-nav-head strong {
        color: #fff !important;
    }

    .mobile-nav-close {
        color: #fff !important;
        background: transparent !important;
    }

    .mobile-nav-close:hover,
    .mobile-nav-close:focus-visible {
        color: var(--b17-menu-gold) !important;
    }

    .mobile-nav-quicklinks {
        background: var(--b17-menu-bg-soft) !important;
        border-bottom-color: var(--b17-menu-line) !important;
    }

    .mobile-nav-quicklinks a {
        color: var(--b17-menu-text) !important;
        border-right-color: var(--b17-menu-line) !important;
        background: transparent !important;
    }

    .rtl-site .mobile-nav-quicklinks a {
        border-right: 0 !important;
        border-left: 1px solid var(--b17-menu-line) !important;
    }

    .mobile-nav-quicklinks a:hover,
    .mobile-nav-quicklinks a:focus-visible {
        color: #fff !important;
        background: #1a1a1a !important;
    }

    .mobile-nav-quicklinks svg {
        color: currentColor !important;
    }

    .bafleh-live-menu,
    .bafleh-live-menu.is-open {
        background: var(--b17-menu-bg) !important;
        color: var(--b17-menu-text) !important;
    }

    .bafleh-live-menu > li > a,
    .bafleh-live-menu > li > button {
        color: var(--b17-menu-text) !important;
        background: transparent !important;
        border-bottom-color: var(--b17-menu-line) !important;
    }

    .bafleh-live-menu > li > button svg {
        color: var(--b17-menu-muted) !important;
    }

    .bafleh-live-menu > li > a:hover,
    .bafleh-live-menu > li > a:focus-visible,
    .bafleh-live-menu > li > button:hover,
    .bafleh-live-menu > li > button:focus-visible,
    .bafleh-live-menu > li.is-open > button {
        color: #fff !important;
        background: #171717 !important;
    }

    .bafleh-live-menu > li.is-current > a,
    .bafleh-live-menu > li.is-current > button {
        color: var(--b17-menu-gold) !important;
    }

    .new-menu-dropdown-panel {
        background: var(--b17-menu-bg-soft) !important;
        border: 0 !important;
        border-bottom: 1px solid var(--b17-menu-line) !important;
        box-shadow: none !important;
    }

    .new-menu-column h6 {
        color: var(--b17-menu-gold) !important;
    }

    .new-menu-dropdown-panel a {
        color: #e8e8e5 !important;
        background: transparent !important;
    }

    .new-menu-dropdown-panel a:hover,
    .new-menu-dropdown-panel a:focus-visible {
        color: #fff !important;
        background: #1c1c1c !important;
    }

    .bafleh-menu-backdrop,
    .bafleh-menu-backdrop.is-open {
        background: rgba(0,0,0,.62) !important;
    }
}

/* --------------------------------------------------------------------------
   WHATSAPP FLOATING ACTION
   Replaces the old telephone text glyph with a real speech/phone mark.
   -------------------------------------------------------------------------- */
.bafleh-smart-whatsapp {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    background: var(--b17-whatsapp) !important;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.22) !important;
    text-decoration: none !important;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease !important;
}

.bafleh-smart-whatsapp:hover,
.bafleh-smart-whatsapp:focus-visible {
    background: #20bd5a !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 11px 30px rgba(0,0,0,.27) !important;
}

.bafleh-smart-whatsapp:focus-visible {
    outline: 3px solid rgba(37,211,102,.28) !important;
    outline-offset: 3px !important;
}

.bafleh-smart-whatsapp-mark {
    width: 30px !important;
    height: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

.bafleh-smart-whatsapp-mark svg {
    width: 30px !important;
    height: 30px !important;
    display: block !important;
    overflow: visible !important;
}

.bafleh-smart-whatsapp-text { display: none !important; }

@media (max-width: 980px) {
    .bafleh-smart-whatsapp {
        right: 14px !important;
        bottom: max(14px, calc(env(safe-area-inset-bottom) + 10px)) !important;
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
    }
    .rtl-site .bafleh-smart-whatsapp {
        right: auto !important;
        left: 14px !important;
    }
}

/* Visible, consistent keyboard focus on public navigation. */
.bafleh-live-header a:focus-visible,
.bafleh-live-header button:focus-visible,
.bafleh-live-nav a:focus-visible,
.bafleh-live-nav button:focus-visible {
    outline: 2px solid var(--b17-menu-gold) !important;
    outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
    .bafleh-smart-whatsapp,
    .bafleh-live-nav,
    .new-menu-dropdown-panel { transition: none !important; }
}

@media print {
    .bafleh-smart-whatsapp,
    .bafleh-live-mobile-menu,
    .bafleh-menu-backdrop { display: none !important; }
}
