/* Mobile Optimizations for Settings, Contact, Login and Signup Pages */

/* Apply these optimizations for smaller screens */
@media screen and (max-width: 768px) {
    /* ===== COMMON STYLES FOR ALL FORM PAGES ===== */
    
    /* Container adjustments */
    body.settings-page .settings-container,
    body.contact-page .contact-container,
    body.login-page .login-container,
    body.signup-page .signup-container {
        max-width: 100%;
        margin: 60px 15px 20px;
        border-radius: 12px;
    }
    
    /* Section styling */
    .settings-section, 
    .contact-section, 
    .contact-info-section,
    .faq-section,
    .login-form-container,
    .signup-form-container {
        margin: 15px;
        padding: 15px;
    }
    
    /* Headings */
    body.settings-page h1,
    body.contact-page h1,
    body.login-page h1,
    body.signup-page h1 {
        font-size: 24px;
        padding: 15px 0;
    }
    
    body.settings-page h2,
    body.contact-page h2,
    body.login-page h2,
    body.signup-page h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    /* Form inputs */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    select,
    textarea {
        padding: 10px;
        font-size: 14px;
        border-radius: 6px;
    }
    
    /* Form buttons */
    button[type="submit"],
    .form-button {
        padding: 10px 15px;
        font-size: 14px;
        border-radius: 6px;
    }
    
    /* ===== SETTINGS PAGE SPECIFIC ===== */
    
    /* Profile section */
    .profile-preview {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-info {
        text-align: center;
        width: 100%;
    }
    
    .profile-picture-display {
        margin-bottom: 15px;
    }
    
    /* Settings sections */
    .settings-item.row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .settings-item label {
        margin-bottom: 5px;
    }
    
    /* Time settings */
    .time-settings {
        flex-direction: column;
        gap: 10px;
    }
    
    /* ===== CONTACT PAGE SPECIFIC ===== */
    
    /* Contact form */
    .contact-form {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    /* Contact methods grid */
    .contact-methods {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* FAQ items */
    .faq-item {
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
    
    /* ===== LOGIN/SIGNUP PAGE SPECIFIC ===== */
    
    /* Auth forms */
    .login-form,
    .signup-form {
        max-width: 100%;
        padding: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    /* Remember me row */
    .remember-me-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Alternative login methods */
    .alt-login-methods {
        flex-direction: column;
        gap: 10px;
    }
    
    .alt-login-btn {
        width: 100%;
    }
}

/* Smaller phone screens */
@media screen and (max-width: 480px) {
    /* ===== EVEN SMALLER SCREEN ADJUSTMENTS ===== */
    
    /* Further reduce padding and margins */
    body.settings-page .settings-container,
    body.contact-page .contact-container,
    body.login-page .login-container,
    body.signup-page .signup-container {
        margin: 55px 10px 15px;
        border-radius: 8px;
    }
    
    .settings-section, 
    .contact-section, 
    .contact-info-section,
    .faq-section,
    .login-form-container,
    .signup-form-container {
        margin: 10px;
        padding: 12px;
    }
    
    /* Reduce font sizes further */
    body.settings-page h1,
    body.contact-page h1,
    body.login-page h1,
    body.signup-page h1 {
        font-size: 20px;
    }
    
    body.settings-page h2,
    body.contact-page h2,
    body.login-page h2,
    body.signup-page h2 {
        font-size: 16px;
    }
    
    /* Make inputs easier to tap */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    select,
    textarea,
    button[type="submit"],
    .form-button {
        min-height: 42px; /* Better touch target */
    }
}

/* Fix for dark mode in mobile */
@media screen and (max-width: 768px) {
    /* Dark mode adjustments */
    body.dark.settings-page .settings-container,
    body.dark.contact-page .contact-container,
    body.dark.login-page .login-container,
    body.dark.signup-page .signup-container {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    
    body.dark .settings-section,
    body.dark .contact-section,
    body.dark .contact-info-section,
    body.dark .faq-section,
    body.dark .login-form-container,
    body.dark .signup-form-container {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
}
