/**
 * Mobile Optimization Styles for Quiz Engine
 * 
 * Centralized stylesheet for all responsive overrides.
 * Breakpoint: 768px (Standard Tablet/Mobile boundary)
 */

:root {
    --mqa-mobile-spacing: 20px;
    --mqa-safe-area-inset-bottom: env(safe-area-inset-bottom, 20px);
}

@media (max-width: 768px) {

    /* =========================================
       GLOBAL UTILITIES
       ========================================= */
    .container, 
    .site-content,
    .entry-content {
        padding-left: var(--mqa-mobile-spacing) !important;
        padding-right: var(--mqa-mobile-spacing) !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Prevent horizontal overflow */
    body, html {
        overflow-x: hidden;
    }

    /* =========================================
       AUTHENTICATION PAGES (Login, Register)
       ========================================= */
    body.login-page, 
    body.register-page {
        padding: 10px !important;
        background-size: 10px 10px !important; /* Smaller grid pattern */
    }

    /* Sketch Cards */
    .mqa-sketch-card {
        padding: 25px 20px !important;
        border-radius: 20px !important; /* Symplify complex borders on mobile */
        border-width: 2px !important;
        box-shadow: 5px 5px 0px rgba(0,0,0,0.1) !important;
    }

    /* Stabilo Titles */
    h1.highlight-stabilo {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
        padding: 0 5px !important;
    }

    /* Form Inputs */
    .mqa-sketch-card input[type="text"],
    .mqa-sketch-card input[type="email"],
    .mqa-sketch-card input[type="password"] {
        font-size: 16px !important; /* Prevent iOS zoom */
        padding: 12px !important;
    }

    /* Buttons */
    .mqa-sketch-card input[type="submit"],
    .mqa-sketch-card button {
        padding: 15px !important;
        font-size: 1rem !important;
    }

    /* =========================================
       DASHBOARD (Mon Compte)
       ========================================= */
    .mqa-dashboard-container {
        padding: 15px;
    }

    .mqa-dashboard-card {
        margin-bottom: 15px;
    }

    .mqa-dashboard-stats {
        flex-direction: column;
        gap: 10px;
    }

    /* =========================================
       QUIZ INTERFACE
       ========================================= */
    .mqa-quiz-question {
        padding: 15px;
        font-size: 1rem;
    }

    .mqa-quiz-answers {
        gap: 10px;
    }

    .mqa-quiz-answer-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .mqa-quiz-progress {
        height: 6px;
    }

    /* =========================================
       TABLES RESPONSIVE
       ========================================= */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
