/*
 * AIM Login Page Styles
 * Created: May 2025
 * Purpose: Dedicated styling for login/authentication pages
 * Dependencies: color-variables.css (for color definitions)
 */

/* Login Layout Styles */
.login-body {
    background-color: var(--login-bg);
    color: var(--login-text);
    font-family: Roboto, sans-serif, "Century Gothic WGL";
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Login Container */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Login Card - 25% wider and responsive */
.login-card {
    background-color: var(--login-card-bg);
    border: 1px solid var(--login-border);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(30, 58, 95, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 625px; /* Increased from 500px by 25% */
    text-align: center;
}

/* Logo and Title */
.login-header {
    margin-bottom: 30px;
}

.login-logo {
    height: 80px;
    margin-bottom: 20px;
}

.login-title {
    color: var(--login-primary);
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

/* Form Styling */
.login-form-floating {
    margin-bottom: 20px; /* Increased spacing */
    text-align: left;
}

.login-form-control {
    border: 1px solid var(--login-border);
    border-radius: 4px;
    padding: 12px;
    font-size: 16px;
    width: 100%;
    min-height: 44px; /* Touch-friendly minimum height */
}

    .login-form-control:focus {
        border-color: var(--login-primary);
        box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.25);
        outline: none;
    }

.login-form-label {
    color: var(--login-text-light);
    font-weight: 500;
}

/* Primary Login Button */
.login-btn-primary {
    background-color: var(--login-primary) !important;
    border-color: var(--login-primary) !important;
    color: white !important;
    font-weight: 600;
    padding: 14px 24px; /* Increased padding for better touch target */
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.2s ease;
    width: 100%;
    margin-bottom: 8px; /* Reduced from 15px to 8px */
    min-height: 48px; /* Touch-friendly height */
    border: none;
    cursor: pointer;
}

    .login-btn-primary:hover {
        background-color: #2a4a6b !important;
        border-color: #2a4a6b !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(30, 58, 95, 0.2);
    }

    .login-btn-primary:focus {
        box-shadow: 0 0 0 0.2rem rgba(30, 58, 95, 0.5);
    }

/* Microsoft Login Button */
.login-microsoft-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    margin: 8px 0; /* Reduced from 15px to 8px */
    transition: all 0.2s ease;
    min-height: 48px; /* Touch-friendly height */
    font-size: 16px;
    cursor: pointer;
}

    .login-microsoft-btn:hover {
        background: #f8f9fa;
        border-color: #ccc;
        color: #333;
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

/* Register Button */
.login-register-btn {
    background-color: var(--login-register-bg);
    color: white;
    border: none;
    padding: 14px 24px; /* Consistent with primary button */
    font-size: 16px;
    border-radius: 4px;
    width: 100%;
    margin: 8px 0; /* Reduced from 15px to 8px */
    transition: all 0.2s ease;
    font-weight: 600;
    min-height: 48px; /* Touch-friendly height */
    cursor: pointer;
}

    .login-register-btn:hover {
        background-color: var(--login-register-hover);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 142, 112, 0.2);
    }

/* Login Links */
.login-links {
    margin-top: 20px;
}

    .login-links a {
        color: var(--login-primary);
        text-decoration: none;
        font-size: 14px;
        line-height: 1.6;
    }

        .login-links a:hover {
            color: var(--login-secondary);
            text-decoration: underline;
        }

    .login-links p {
        margin: 8px 0;
    }

/* Login Footer */
.login-footer {
    background-color: var(--login-primary);
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: auto;
    font-size: 14px;
}

    .login-footer a {
        color: var(--login-accent);
    }

        .login-footer a:hover {
            color: white;
        }

/* Checkbox styling */
.login-checkbox {
    text-align: left;
    margin: 20px 0; /* Increased spacing */
}

.login-form-check-input {
    margin-right: 8px;
}

/* Validation messages */
.login-text-danger {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

/* Responsive Design - Mobile First */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }

    .login-card {
        padding: 30px 20px;
        margin: 0;
        border-radius: 4px;
    }

    .login-title {
        font-size: 20px;
    }

    .login-logo {
        height: 60px;
    }

    .login-form-floating {
        margin-bottom: 15px;
    }

    .login-form-control {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 48px; /* Touch-friendly */
    }

    .login-btn-primary,
    .login-microsoft-btn,
    .login-register-btn {
        min-height: 50px; /* Larger touch target on mobile */
        font-size: 16px;
        margin: 6px 0; /* Even tighter spacing on mobile */
    }
}

/* Tablet Portrait */
@media (min-width: 481px) and (max-width: 768px) {
    .login-container {
        padding: 20px;
    }

    .login-card {
        padding: 40px 30px;
        max-width: 625px; /* Consistent wider width */
        min-width: 481px; /* Consistent wider width */
    }

    .login-title {
        font-size: 22px;
    }

    .login-logo {
        height: 70px;
    }
}

/* Tablet Landscape and Small Desktop */
@media (min-width: 769px) and (max-width: 1024px) {
    .login-card {
        max-width: 625px; /* Consistent wider width */
    }
}

/* Large Desktop */
@media (min-width: 1025px) {
    .login-card {
        max-width: 625px; /* Full width as requested */
        width: 425px; /* Full width as requested */
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}
