/**
 * BuddyBoss Mobile Menu CSS - Hub Child Theme
 * El panel móvil nativo (.bb-mobile-panel-wrapper) es manejado por theme.min.js.
 * Hamburguer: .bb-left-panel-mobile (clase nativa de BuddyBoss)
 */

/* ==================================================
   LOGO: visible solo en mobile (desktop lo muestra el BuddyPanel)
   ================================================== */
@media (min-width: 800px) {
    .bb-header-bar-logo {
        display: none !important;
    }
}

@media (max-width: 799px) {
    .bb-header-bar-logo {
        display: flex !important;
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 10 !important;
    }

    .bb-header-bar-logo img.bb-logo {
        max-height: 40px !important;
    }
}

/* ==================================================
   HAMBURGER .bb-left-panel-mobile
   Oculto en desktop, visible en mobile
   ================================================== */

@media (min-width: 800px) {
    .bb-left-panel-mobile.push-left {
        display: none !important;
    }
}

@media (max-width: 799px) {
    .bb-left-panel-mobile.push-left {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        cursor: pointer;
        font-size: 22px;
        color: var(--bb-header-links, #5E646D);
        text-decoration: none;
        z-index: 20;
    }
}

/* ==================================================
   MOBILE PANEL NATIVO (.bb-mobile-panel-wrapper)
   theme.min.js agrega clase 'open' cuando se abre
   Estilos base por si el CSS del tema no los carga (shortcode context)
   ================================================== */
.bb-mobile-panel-wrapper {
    position: fixed !important;
    top: 0;
    left: -100%;
    width: 100% !important;
    /* override buddyboss-header-bar.css */
    height: 100vh;
    z-index: 99999;
    overflow-y: auto;
    transition: left 0.3s ease;
    background: var(--bb-sidenav-background, #fff);
}

.bb-mobile-panel-wrapper.open {
    left: 0 !important;
}

/* Cuando el panel está open, forzar visibilidad de todos sus hijos
   (BuddyBoss aplica opacity:0 en .closed que puede sobrevivir al toggle) */
.bb-mobile-panel-wrapper.open .bb-mobile-panel-inner,
.bb-mobile-panel-wrapper.open .bb-mobile-panel-header,
.bb-mobile-panel-wrapper.open .bb-close-panel,
.bb-mobile-panel-wrapper.open .user-wrap,
.bb-mobile-panel-wrapper.open .main-navigation,
.bb-mobile-panel-wrapper.open nav {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
}

/* Sin overlay — el panel ya es full width */

/* ==================================================
   MOBILE PANEL HEADER: user-wrap, avatar, close button
   ================================================== */
.bb-mobile-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--bb-sidenav-background, #fff);
}

.bb-mobile-panel-header .user-wrap {
    display: flex !important;
    /* override .user-wrap { display:none } de buddyboss-styles mobile */
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
}

.bb-mobile-panel-header .user-wrap img,
.bb-mobile-panel-header .user-wrap .avatar {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    object-fit: cover;
    flex-shrink: 0;
}

.bb-mobile-panel-header .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--bb-body-text, #1C1C1C);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.bb-mobile-panel-header .my-account-link {
    font-size: 12px;
    color: var(--bb-body-text-subdued, #7a8896);
    margin-top: 2px;
}

.bb-mobile-panel-header .my-account-link a {
    color: inherit;
    text-decoration: none;
}

.bb-mobile-panel-header .bb-close-panel {
    display: flex !important;
    /* forzar visible, puede ser override por otras reglas */
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--bb-body-text, #1C1C1C);
    padding: 8px;
    flex-shrink: 0;
    line-height: 1;
    text-decoration: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
}


/* ==================================================
   MOBILE PANEL NAV: iconos + texto en los menu items
   ================================================== */
.bb-mobile-panel-wrapper .main-navigation {
    padding: 8px 0;
}

.bb-mobile-panel-wrapper .main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bb-mobile-panel-wrapper .main-navigation ul li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    /*font-size: 14px;*/
    color: var(--bb-body-text, #1C1C1C);
    text-decoration: none;
    transition: background 0.15s ease;
}

.bb-mobile-panel-wrapper .main-navigation ul li a i,
.bb-mobile-panel-wrapper .main-navigation ul li a img.menu-item-icon {
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    color: var(--bb-body-text-subdued, #5E646D);
}

.bb-mobile-panel-wrapper .main-navigation ul li a .menu-item-text {
    flex: 1;
}

/* Sección separadora: estilo de label uppercase */
.bb-mobile-panel-wrapper .main-navigation ul li.bb-menu-section>a {
    padding: 16px 20px 6px;
    pointer-events: none;
    cursor: default;
    background: transparent !important;
}

.bb-mobile-panel-wrapper .main-navigation ul li.bb-menu-section>a .link-text {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bb-body-text-subdued, #9A9FAA);
}

.mobile-menu .menu-item-10542,
.mobile-menu .menu-item-10577 {
    display: none;
}