/* 
 * AEM EDS Interview Prep
 * Responsive Styles
 */

/* Tablet Styles (768px and below) */
@media screen and (max-width: 768px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .feature-cards {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .content {
        padding: 16px;
    }
    
    .welcome-screen, .question-content {
        padding: 16px;
    }
}

/* Mobile Styles (576px and below) */
@media screen and (max-width: 576px) {
    :root {
        --header-height: 56px;
        --footer-height: 40px;
    }
    
    .main-container {
        position: relative;
    }
    
    /* Show mobile menu toggle */
    #mobile-menu-toggle {
        display: block;
    }
    
    /* Show mobile-only elements */
    .mobile-only {
        display: block;
    }
    
    /* Sidebar becomes a drawer on mobile */
    .sidebar {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        width: 100%;
        max-width: 300px;
        height: calc(100vh - var(--header-height));
        z-index: 100;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
        transition: left var(--transition-speed) ease;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .site-title {
        font-size: 1.1rem;
    }
    
    .logo {
        height: 28px;
    }
    
    .content {
        padding: 12px;
    }
    
    .welcome-screen, .question-content {
        padding: 16px;
    }
    
    .welcome-screen h2 {
        font-size: 1.5rem;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Add overlay when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

/* Small Mobile Styles (375px and below) */
@media screen and (max-width: 375px) {
    .site-title {
        font-size: 1rem;
    }
    
    .logo {
        height: 24px;
        margin-right: 8px;
    }
    
    .content {
        padding: 8px;
    }
    
    .welcome-screen, .question-content {
        padding: 12px;
    }
}

/* Handle landscape orientation on mobile */
@media screen and (max-height: 450px) and (orientation: landscape) {
    .sidebar {
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
    
    .content {
        padding-bottom: 60px; /* Add extra padding to ensure content is visible */
    }
}

/* Print Styles */
@media print {
    .app-header, .sidebar, .app-footer {
        display: none;
    }
    
    .main-container {
        display: block;
    }
    
    .content {
        padding: 0;
        overflow: visible;
    }
    
    .question-content {
        box-shadow: none;
        border: none;
        max-width: 100%;
    }
}
