/* Nova site-wide shared component styles. */

.sidebar-expand-btn.nova-menu-button {
    position: fixed;
    z-index: 1400;
    display: flex !important;
    top: 7px;
    right: auto !important;
    left: 12px !important;
    width: 46px;
    height: 46px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid var(--accent-gold);
    background: var(--accent-gold);
    color: #090b0e;
    box-shadow: 0 7px 22px rgba(87, 61, 18, 0.28);
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-mono);
    transition: filter .2s ease, transform .2s ease;
}

body.dark-theme .sidebar-expand-btn.nova-menu-button {
    box-shadow: 0 7px 22px rgba(0, 0, 0, .5);
}

.sticky-header .header-left {
    padding-left: 58px;
}

.sticky-header .header-right {
    padding-right: 0;
}

.sidebar-expand-btn.nova-menu-button:hover,
.sidebar-expand-btn.nova-menu-button:focus {
    border-color: var(--accent-gold);
    background: var(--accent-gold);
    color: #090b0e;
    filter: brightness(1.06);
}

.nova-menu-button .hamburger-line {
    display: block;
    width: 19px;
    height: 2px;
    flex: 0 0 2px;
    border-radius: 2px;
    background: currentColor;
}

@media (max-width: 1100px) {
    .left-nav.nova-mobile-ready,
    .left-nav.nova-mobile-ready.collapsed {
        position: fixed !important;
        top: 60px !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 1300 !important;
        display: flex !important;
        width: min(370px, 90vw) !important;
        height: auto !important;
        padding: 18px 20px 40px !important;
        border-right: 1px solid var(--border-light) !important;
        border-bottom: 0 !important;
        background: var(--bg-sidebar) !important;
        box-shadow: 18px 0 48px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    }

    .left-nav.nova-mobile-ready.collapsed {
        opacity: 0;
        transform: translateX(-105%);
        pointer-events: none;
    }

}

@media (max-width: 768px) {
    body.nova-mobile-nav-open {
        overflow: hidden;
    }
}

@media (max-width: 430px) {
    .sticky-header #themeToggle { display: none; }
    .sticky-header .header-left { padding-left: 50px; }
    .sticky-header .header-right { padding-right: 0; }
}

/* Global shell normalization for legacy papers. These rules intentionally
   outrank page-local utility CSS so every document uses the same controls. */
html body .scroll-bottom-container {
    position: fixed !important;
    right: 16px !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    left: auto !important;
    z-index: 1450 !important;
    display: block !important;
    width: 52px !important;
    height: 52px !important;
    transform: none !important;
}

html body .scroll-bottom-container > .scroll-bottom-btn:not(#scrollActionBtn) {
    display: none !important;
}

html body .scroll-bottom-container > #scrollActionBtn {
    display: flex !important;
    width: 52px !important;
    height: 52px !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid var(--accent-gold) !important;
    border-radius: 50% !important;
    background: var(--accent-gold) !important;
    color: #090b0e !important;
    font: 700 20px/1 var(--font-mono) !important;
    box-shadow: 0 7px 22px rgba(87, 61, 18, .3) !important;
}

html body #sidebarFloatingExpandBtn {
    font-size: 0 !important;
}

html body #sidebarFloatingExpandBtn .hamburger-line {
    display: block !important;
}
