/* Enhanced Responsive Design for Login/Register Pages */
/* Supports Mobile, Full HD (1920x1080), and 2K (2560x1440) monitors */

/* Base styles for login illustration */
.login-illustration-container {
    display: none !important;
}

.login-illustration {
    display: none !important;
}

/* Ensure consistent button sizing on mobile */
.login-btn,
.social-btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure social login container has consistent width */
.social-login-buttons {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.social-login-buttons .social-btn {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* Register page body */
.register-page-body {
    background: var(--background-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2vh 2vw;
    font-family: var(--font-family);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Register container */
.register-container {
    background: var(--card-background);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(20px);
    padding: 3vh 2vw;
    animation: slideDown 0.6s ease-out;
    overflow: visible;
}

/* Register form container - full width for single column */
.register-form-container {
    flex: 1;
    max-width: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    height: auto;
    margin: 0 auto;
    overflow-y: auto;
    max-height: 80vh;
}

.register-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    max-width: 100%;
}

.register-illustration-container {
    display: none !important;
}

.register-illustration {
    display: none !important;
}

/* Register form compact styling */
.register-form-container .form-group {
    margin-bottom: 8px;
    width: 100%;
}

.register-form-container .form-group:last-child {
    margin-bottom: 8px;
}

.register-form-container .form-help {
    font-size: 0.75em;
    margin-top: 2px;
    margin-bottom: 0;
}

.register-form-container .registration-info {
    width: 100%;
    max-width: 100%;
    margin: 12px auto 0;
    text-align: left;
    padding: 0px;
    display: flex;
    justify-content: center;
}

.register-form-container .info-text {
    font-size: 0.8em;
    line-height: 1.3;
}

/* Register form header */
.register-form-container .login-header {
    text-align: center;
    margin-bottom: 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.register-form-container .auth-form {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.register-form-container .form-group {
    text-align: left;
    margin-bottom: 0px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.register-form-container .form-control {
    padding: 8px 16px;
    font-size: 16px;
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--card-background);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.register-form-container .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.register-form-container .login-btn {
    width: 100%;
    max-width: 100%;
    margin-top: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(90deg, #8A2BE2 0%, #4B0082 100%);
    color: white;
}

/* Shared container styles */
.login-container,
.register-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4vw;
    max-width: 90vw;
    width: 100%;
    height: auto;
    padding: 3vh 2vw;
}

/* Form containers */
.login-form-container,
.register-form-container {
    flex: 1;
    max-width: 400px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto;
    padding: 24px;
    margin: 0 auto;
}

/* Login form container specific width */
.login-form-container {
    max-width: 40vw;
}

/* Register form container specific width - full width for single column */
.register-form-container {
    max-width: 100%;
}

/* Illustration containers */
.login-illustration-container {
    display: none !important;
}

.register-illustration-container {
    display: none !important;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* 2K Monitors (2560x1440 and above) */
@media (min-width: 2560px) {
    .login-container,
    .register-container {
        height: 800px;
        max-width: 500px;
        padding: 2vh 2vw;
        gap: 4vw;
    }
    
    .login-form-container {
        padding: 32px;
        max-width: 35vw;
    }
    
    .register-form-container {
        padding: 32px;
        max-width: 100%;
    }
    
    .login-header h2,
    .register-header h2 {
        font-size: 32px;
    }
    
    .auth-icon {
        width: 80px;
        height: 80px;
    }
    
    .form-control {
        padding: 10px 20px;
        font-size: 18px;
    }
    
    .login-btn {
        padding: 16px 32px;
        font-size: 18px;
    }
    
    .social-btn {
        padding: 16px 32px;
        font-size: 18px;
    }
    
    .login-illustration {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

/* Full HD Monitors (1920x1080) */
@media (min-width: 1920px) and (max-width: 2559px) {
    .login-container,
    .register-container {
        height: 700px;
        max-width: 400px;
        padding: 1vh 1vw;
        gap: 2vw;
        overflow: visible;
    }
    
    .login-form-container,
    .register-form-container {
        padding: 16px;
        max-width: 400px;
        max-height: 650px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 12px;
        align-items: center;
    }
    
    .login-form-container .auth-form {
        width: 100%;
        max-width: 380px;
        margin-bottom: 12px;
        gap: 12px;
    }
    
    .login-form-container .social-login-divider {
        margin: 16px 0 12px 0;
    }
    
    .login-form-container .social-login-buttons {
        margin-bottom: 16px;
    }
    
    .login-header h2,
    .register-header h2 {
        font-size: 24px;
        margin-bottom: 6px;
    }
    
    .auth-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
    }
    
    .form-control {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .login-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .social-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .login-illustration {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

/* Desktop (1366x768 and above) */
@media (min-width: 1366px) and (max-width: 1919px) {
    .login-container,
    .register-container {
        height: 700px;
        max-width: 400px;
        padding: 2vh 2vw;
        gap: 3vw;
    }
    
    .login-form-container,
    .register-form-container {
        padding: 24px;
        max-width: 42vw;
    }
    
    .login-header h2,
    .register-header h2 {
        font-size: 26px;
    }
    
    .auth-icon {
        width: 60px;
        height: 60px;
    }
    
    .form-control {
        padding: 8px 16px;
        font-size: 15px;
    }
    
    .login-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .social-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Desktop (1024px and above) */
@media (min-width: 1024px) and (max-width: 1365px) {
    .login-container,
    .register-container {
        height: 650px;
        max-width: 500px;
        padding: 2vh 2vw;
        gap: 3vw;
    }
    
    .login-form-container,
    .register-form-container {
        padding: 20px;
        max-width: 45vw;
    }
    
    .login-header h2,
    .register-header h2 {
        font-size: 24px;
    }
    
    .auth-icon {
        width: 56px;
        height: 56px;
    }
    
    .form-control {
        padding: 6px 14px;
        font-size: 14px;
    }
    
    .login-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .social-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .login-container,
    .register-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        max-width: 100vw;
        padding: 3vh 3vw;
        gap: 3vh;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }
    
    .login-form-container,
    .register-form-container {
        padding: 24px;
        max-width: 80vw;
        order: 1;
        max-height: none;
        overflow: visible;
    }
    
    .login-illustration-container,
    .register-illustration-container {
        max-width: 60vw;
        order: 2;
    }
    
    .login-header h2,
    .register-header h2 {
        font-size: 24px;
    }
    
    .auth-icon {
        width: 52px;
        height: 52px;
    }
    
    .form-control {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    /* Ensure consistent button sizing */
    .login-btn,
    .social-btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 14px 20px !important;
        font-size: 15px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
}

/* Medium Mobile (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .login-container,
    .register-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        max-width: 100vw;
        padding: 2vh 2vw;
        gap: 2vh;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }
    
    .login-form-container,
    .register-form-container {
        padding: 20px;
        max-width: 90vw;
        order: 1;
        max-height: none;
        overflow: visible;
    }
    
    .login-illustration-container,
    .register-illustration-container {
        max-width: 70vw;
        order: 2;
    }
    
    .login-header h2,
    .register-header h2 {
        font-size: 22px;
    }
    
    .auth-icon {
        width: 48px;
        height: 48px;
    }
    
    .form-control {
        padding: 9px 13px;
        font-size: 15px;
    }
    
    /* Ensure consistent button sizing */
    .login-btn,
    .social-btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 18px !important;
        font-size: 15px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
}

/* Mobile Large (375px - 480px) */
@media (min-width: 375px) and (max-width: 480px) {
    .login-container,
    .register-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        max-width: 100vw;
        padding: 2vh 2vw;
        gap: 2vh;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }
    
    .login-form-container,
    .register-form-container {
        padding: 16px;
        max-width: 95vw;
        order: 1;
        max-height: none;
        overflow: visible;
    }
    
    .login-illustration-container,
    .register-illustration-container {
        max-width: 80vw;
        order: 2;
    }
    
    .login-header h2,
    .register-header h2 {
        font-size: 20px;
    }
    
    .auth-icon {
        width: 44px;
        height: 44px;
    }
    
    .form-control {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* Ensure consistent button sizing */
    .login-btn,
    .social-btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .message-container {
        max-width: 90vw;
        width: 90vw;
    }
}

/* Mobile Small (320px - 374px) */
@media (min-width: 320px) and (max-width: 374px) {
    .login-container,
    .register-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        max-width: 100vw;
        padding: 1vh 1vw;
        gap: 1vh;
        border-radius: 0;
        box-shadow: none;
    }
    
    .login-form-container,
    .register-form-container {
        padding: 12px;
        max-width: 98vw;
        order: 1;
    }
    
    .login-illustration-container,
    .register-illustration-container {
        max-width: 85vw;
        order: 2;
    }
    
    .login-header h2,
    .register-header h2 {
        font-size: 18px;
    }
    
    .auth-icon {
        width: 40px;
        height: 40px;
    }
    
    .form-control {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    /* Ensure consistent button sizing */
    .login-btn,
    .social-btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 14px !important;
        font-size: 13px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .message-container {
        max-width: 95vw;
        width: 95vw;
    }
}

/* Extra Small Mobile (below 320px) */
@media (max-width: 319px) {
    .login-container,
    .register-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        max-width: 100vw;
        padding: 0.5vh 0.5vw;
        gap: 0.5vh;
        border-radius: 0;
        box-shadow: none;
    }
    
    .login-form-container,
    .register-form-container {
        padding: 8px;
        max-width: 100vw;
        order: 1;
    }
    
    .login-illustration-container,
    .register-illustration-container {
        display: none;
    }
    
    .login-header h2,
    .register-header h2 {
        font-size: 16px;
    }
    
    .auth-icon {
        width: 36px;
        height: 36px;
    }
    
    .form-control {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    /* Ensure consistent button sizing */
    .login-btn,
    .social-btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .message-container {
        max-width: 100vw;
        width: 100vw;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .login-container,
    .register-container {
        min-height: 100vh;
        padding: 1vh 2vw;
        gap: 2vh;
    }
    
    .login-form-container,
    .register-form-container {
        padding: 12px;
        max-width: 50vw;
    }
    
    .login-illustration-container,
    .register-illustration-container {
        max-width: 40vw;
    }
    
    .login-header h2,
    .register-header h2 {
        font-size: 18px;
    }
    
    .auth-icon {
        width: 36px;
        height: 36px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-container,
    .register-container {
        box-shadow: var(--shadow-medium), 0 0 0 1px rgba(0, 0, 0, 0.02);
    }
    
    .form-control {
        border-width: 0.5px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .login-container,
    .register-container,
    .login-card,
    .register-card,
    .form-control,
    .login-btn,
    .social-btn {
        transition: none;
    }
    
    @keyframes slideDown {
        from {
            opacity: 1;
            transform: none;
        }
        to {
            opacity: 1;
            transform: none;
        }
    }
}

/* Microsoft login button hover */
#microsoftLoginBtn:hover, #microsoftLoginBtn:focus {
    background-color: #0078D4;
    color: #fff;
    border-color: #0078D4;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

/* Message container responsive width */
.message-container {
    max-width: 50%;
    width: 50%;
}

@media (max-width: 767px) {
    .message-container {
        max-width: 90%;
        width: 90%;
    }
}

@media (max-width: 480px) {
    .message-container {
        max-width: 95%;
        width: 95%;
    }
}

/* Register form specific optimizations */
.register-form-container {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.register-form-container::-webkit-scrollbar {
    width: 6px;
}

.register-form-container::-webkit-scrollbar-track {
    background: transparent;
}

.register-form-container::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.register-form-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-secondary);
}

/* Ensure register form fits properly on all screen sizes */
@media (min-width: 1024px) {
    .register-form-container {
        justify-content: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .register-form-container .auth-form {
        width: 100%;
        max-width: 380px;
    }
} 