
/* New Inline Mobile Toggles - Reinstated per User Request */
.mobile-header-btn-inline { display: none; }

/* HARD REMOVE ROCKET FROM DESKTOP (User Request: "Remove it, don't just hide it") */
/* We use display:none to remove it from the visual tree on desktop */
#headerRocketRow2_Secure, #appLauncherBtn {
    display: none !important;
}

/* Sidebar Search & Widget Integration (Declutter Point 4 & 6) */
@media (min-width: 981px) {
    /* SEARCH BAR RESTORED PER USER REQUEST */
    #headerMiddlePanel .hamburger-search-wrapper {
        display: flex !important;
    }
    /* Logo should still align properly without the search row space */
    #headerMiddlePanel .header-row1 {
        min-height: 48px !important;
        justify-content: center !important;
    }
}

@media (max-width: 980px) {
    .mobile-header-btn-inline { display: flex !important; background:transparent; border:none; padding:8px; font-size:24px; color:#333; cursor:pointer; min-width:40px; justify-content:center; align-items:center; z-index: 10005; }
    .header-row1 { justify-content: space-between !important; gap: 4px !important; padding: 0 8px !important; }
    
    /* Move Rocket Button to Bottom Right Corner AND FORCE VISIBLE ON MOBILE */
    #headerRocketRow2_Secure {
        /* DISABLED: User reported this is "out in the content area". We use #mobileToolsBtn in the flex container instead. */
        display: none !important; 
        position: absolute !important;
        bottom: 0 !important;
        right: 8px !important;
        top: auto !important;
        z-index: 10006 !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* HARD HIDE: Crypto-Lock the panel on mobile so it cannot flash or double-open */
    /* User Request: "delete the right Gtrado Panel and panel cover" on mobile */
    #ufoControlPanel:not(.mobile-summoned),
    .ufo-right-control-panel:not(.mobile-summoned),
    #ufoControlPanel:not(.mobile-summoned) .ufo-cover-screen,
    .ufo-right-control-panel:not(.mobile-summoned) .ufo-cover-screen,
    /* ADDED: Explicitly hide the right cover elements */
    #ufoRightCover,
    .ufo-right-cover,
    .ufo-panel-cover-right,
    .right-panel-cover {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Ensure the new mobile rocket button is visible */
    #mobileToolsBtn, #mobileToolsBtnContainer {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* DESKTOP SAFETY: Hide mobile-only buttons by default on DESKTOP ONLY */
@media (min-width: 981px) {
    #headerHamburgerRow2, 
    #mobileToolsBtnContainer,
    #mobileToolsBtn {
        display: none !important;
    }
    /* Desktop: icon before label, evenly spaced navigator */
    #headerSecondRow #navigator-container,
    #navigator-container {
        width: 100% !important;
        justify-content: space-evenly !important;
        align-items: center !important;
        gap: 0 !important;
    }
    #headerSecondRow #navigator-container > .nav-item:has(.nav-btn),
    #navigator-container > .nav-item:has(.nav-btn) {
        flex: 1 1 0 !important;
        justify-content: center !important;
        margin: 0 !important;
    }
    #headerSecondRow #navigator-container .nav-btn,
    #navigator-container .nav-btn {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        letter-spacing: 0.02em !important;
        color: #1e293b !important;
        padding: 0 4px !important;
        line-height: 1 !important;
        transition: color 0.2s ease !important;
    }
    #headerSecondRow #navigator-container .nav-btn > i:not(.fa-caret-down),
    #navigator-container .nav-btn > i:not(.fa-caret-down) {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        font-size: 13px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }
    #headerSecondRow #navigator-container .nav-btn > i.fa-caret-down,
    #navigator-container .nav-btn > i.fa-caret-down {
        display: inline-flex !important;
        font-size: 9px !important;
        margin-left: 2px !important;
        opacity: 0.7 !important;
    }
    #headerSecondRow #navigator-container .nav-btn .nav-text,
    #navigator-container .nav-btn .nav-text {
        display: inline !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        letter-spacing: 0.02em !important;
    }
    #headerSecondRow #navigator-container .at-nav-community-hub .nav-text,
    #navigator-container .at-nav-community-hub .nav-text {
        font-size: 12px !important;
    }
    #headerSecondRow #navigator-container .nav-btn:hover,
    #navigator-container .nav-btn:hover {
        color: #2563eb !important;
    }
}
