/**
 * Modern Login Form Styles
 * 
 * This CSS file provides styles for the modernized login form
 * and is designed to be fully independent of the theme's CSS.
 */

/* ========================================
   Modern Login Container
======================================== */

.modern-login-container {
    min-height: 50vh;
    background: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.modern-login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 2.5rem;
    width: 100%;
    max-width: 450px;
    position: relative;
}

/* ========================================
   Login Title
======================================== */

.modern-login-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem 0;
    letter-spacing: -0.5px;
}

/* ========================================
   Form Groups
======================================== */

.modern-form-group {
    margin-bottom: 1rem;
}

.modern-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   Input Fields
======================================== */

.modern-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1rem;
    color: #333;
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modern-input:focus {
    outline: none;
    border-color: #21738c;
    box-shadow: 0 0 0 3px rgba(33, 115, 140, 0.1);
}

.modern-input::placeholder {
    color: #999;
    font-size: 0.9rem;
}

/* ========================================
   Checkbox Styling
======================================== */

.modern-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.modern-checkbox {
    margin: 0 8px 0 0;
    width: 16px;
    height: 16px;
    accent-color: #21738c;
}

.modern-checkbox-text {
    font-size: 0.9rem;
    color: #666;
}

/* ========================================
   Sign In Button
======================================== */

.modern-signin-btn {
    width: 100%;
    padding: 10px 16px;
    background: #21738c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.modern-signin-btn:hover {
    background: #1a5f7a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 115, 140, 0.3);
}

.modern-signin-btn:active {
    transform: translateY(0);
}

/* ========================================
   Form Links
======================================== */

.modern-form-links {
    margin-top: 1rem;
    text-align: center;
}

.modern-lost-password {
    margin: 0 0 0.5rem 0;
}

.modern-lost-password a {
    color: #21738c;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.modern-lost-password a:hover {
    color: #1a5f7a;
    text-decoration: underline;
}

.modern-signup-link {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.modern-signup-link a {
    color: #21738c;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.modern-signup-link a:hover {
    color: #1a5f7a;
    text-decoration: underline;
}

/* ========================================
   Register Section
======================================== */

.modern-register-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e1e5e9;
    display: none; /* Hidden by default */
}

.modern-login-form {
    display: block; /* Ensure login form is visible by default */
}

.back-to-login {
    text-align: left;
    margin-bottom: 1.5rem;
}

.back-link {
    color: #21738c;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #1a5a6b;
    text-decoration: underline;
}

/* ========================================
   Password Reset Form Styles
======================================== */

.modern-reset-form {
    /* Inherits all styles from modern-login-form */
}

.modern-reset-message {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.modern-back-to-login {
    text-align: center;
    margin: 0;
}

.modern-back-to-login a {
    color: #21738c;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.modern-back-to-login a:hover {
    color: #1a5a6b;
    text-decoration: underline;
}

.modern-register-section h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1.5rem 0;
}

.modern-register-form {
    margin-top: 1rem;
}

/* ========================================
   Responsive Design
======================================== */

@media (max-width: 768px) {
    .modern-login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .modern-login-title {
        font-size: 1.75rem;
    }
    
    .modern-input {
        padding: 10px 14px;
    }
    
    .modern-signin-btn {
        padding: 12px 18px;
    }
}

@media (max-width: 480px) {
    .modern-login-container {
        padding: 1rem 0.5rem;
    }
    
    .modern-login-card {
        padding: 1.5rem 1rem;
    }
    
    .modern-login-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   Accessibility
======================================== */

.modern-input:focus-visible {
    outline: 2px solid #21738c;
    outline-offset: 2px;
}

.modern-signin-btn:focus-visible {
    outline: 2px solid #21738c;
    outline-offset: 2px;
}

/* ========================================
   Animation for card entrance
======================================== */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modern-login-card {
    animation: slideInUp 0.6s ease-out;
}

/* ========================================
   Password visibility toggle functionality
======================================== */

.modern-input[type="password"].show-password {
    -webkit-text-security: none;
}

/* ========================================
   Error states
======================================== */

.modern-input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.modern-input.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* ========================================
   Loading state for button
======================================== */

.modern-signin-btn.loading {
    background: #6c757d;
    cursor: not-allowed;
    pointer-events: none;
}

.modern-signin-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 