/* Responsive.css - Mobile First & Accessibility Fixes */

/* Hamburger Button hide on Desktop */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main, #fff);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    body.dashboard-layout {
        flex-direction: column;
    }

    /* Reveal mobile structural elements */
    .mobile-dashboard-topbar {
        display: flex;
    }

    /* Off-Canvas Sidebar Architecture */
    .sidebar {
        width: 80%;
        max-width: 320px;
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        z-index: 1001; /* Strictly above overlay */
        background: rgba(15, 17, 26, 0.98);
        border-right: 1px solid var(--glass-border);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 1.5rem;
    }

    .sidebar.sidebar-open {
        left: 0;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.7);
    }

    .sidebar-nav {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .sidebar-nav .sidebar-link {
        flex: none;
        justify-content: flex-start;
        text-align: left;
    }

    .sidebar-brand h2 {
        display: none; /* Hide brand text on sidebar since it's on topbar */
    }

    /* Main Content Adjustments */
    .dashboard-main,
    .main-content {
        margin-left: 0 !important;
        width: 100%;
        max-width: 100vw;
        padding: 1rem;
        padding-top: calc(70px + 2rem); /* Account for mobile topbar */
    }
    
    .epic-header {
        padding: 2rem 1rem;
        margin-top: -1rem; /* bring it closer */
    }

    /* Universal Responsive Grids Drop to 1 Column */
    .dashboard-grid, .detail-grid, .modules-grid, .shop-grid, .world-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    /* Inline grid overrides (for Admin Hero stats and general purpose pulse cards) */
    div[style*="display: grid;"] {
        grid-template-columns: 1fr !important;
    }

    .pulse-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .product-card {
        padding: 1.5rem;
    }
    
    .shop-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
