/* Media Queries for UniverseOT Wiki */

@media (max-width: 1200px) {
    :root {
        --sidebar-width: 230px;
    }
    .content-wrapper {
        padding: 2rem;
    }
}

@media (max-width: 992px) {
    #app-layout {
        flex-direction: column;
    }
    
    /* Header layout changes */
    .main-header {
        padding: 0 1.25rem;
    }
    
    .header-search {
        width: 240px;
    }
    
    /* Show mobile menu toggle button */
    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
    }
    
    /* Sidebar becomes slideout menu */
    .main-sidebar {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        bottom: 0;
        width: var(--sidebar-width);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 120;
    }
    
    .main-sidebar.mobile-open {
        left: 0;
    }
    
    /* Content wrapper takes full width */
    .main-container {
        margin-left: 0;
        width: 100%;
    }
    
    /* Overlay background when mobile menu is open */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 115;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .footer-about {
        grid-column: span 2;
    }

    .vocation-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-search {
        display: none; /* Hide standard header search, will show on page content or in menu */
    }
    
    .content-wrapper {
        padding: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .footer-about {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Make tables stack or have horizontal scrolling clearly indicated */
    .table-container::after {
        content: "← Deslize para ver mais →";
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: var(--text-muted);
        padding: 0.5rem;
        background: var(--surface-light);
        border-top: 1px solid var(--border);
    }
    
    /* Cards stack to single column */
    .card-grid {
        grid-template-columns: 1fr;
    }

    .system-page-grid {
        grid-template-columns: 1fr;
    }

    .event-countdowns {
        grid-template-columns: 1fr;
    }

    .task-tab-buttons {
        grid-template-columns: 1fr;
    }

    .system-page-title {
        font-size: 2rem;
    }

    .fishing-tables-grid {
        grid-template-columns: 1fr;
    }

    .fishing-table-column tbody {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .mining-item-grid {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .important-topics {
        --important-topics-padding: 1.25rem;
    }

    .important-topics-grid--extras,
    .important-topics-grid--classes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .main-header {
        height: 70px;
    }
    :root {
        --header-height: 70px;
    }
    
    .header-socials {
        gap: 0.35rem;
    }

    .header-social-link {
        width: 2rem;
        height: 2rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .vocation-stats {
        grid-template-columns: 1fr;
    }

    .important-topics-grid--extras,
    .important-topics-grid--classes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .important-topic-link {
        min-height: 92px;
    }

    .important-topic-link img {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }
}
