/**
 * HVAC Community Login Styles
 * Base styles for the community login form
 * 
 * @package HVAC_Community_Events
 * @version 1.0.0
 */

/* ===== LOGIN WRAPPER ===== */
.hvac-community-login-wrapper {
    background-color: #f9fafb;
    min-height: 60vh;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== LOGIN FORM CARD ===== */
.hvac-login-form-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    width: 100%;
    padding: 2.5rem;
    margin: 0 auto;
}

/* ===== LOGIN FORM HEADER ===== */
.hvac-login-form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.hvac-login-form-header h2 {
    color: #0274be;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.hvac-login-form-header p {
    color: #757575;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

/* ===== LOGIN FORM ===== */
.hvac-login-form {
    width: 100%;
}

.hvac-login-form-group {
    margin-bottom: 1.5rem;
}

.hvac-login-form-label {
    display: block;
    color: #333;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ===== INPUT GROUPS ===== */
.hvac-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.hvac-login-form-input {
    width: 100%;
    padding: 0.85rem 3rem 0.85rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9fafb;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.hvac-login-form-input:focus {
    outline: none;
    border-color: #0274be;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(2, 116, 190, 0.1);
}

.hvac-input-icon {
    position: absolute;
    right: 1rem;
    font-size: 1.1rem;
    color: #757575;
    pointer-events: none;
}

/* ===== PASSWORD TOGGLE ===== */
.hvac-password-group {
    position: relative;
}

.hvac-password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #757575;
    font-size: 1.1rem;
    transition: color 0.2s;
    z-index: 2;
}

.hvac-password-toggle:hover {
    color: #0274be;
}

.hvac-password-toggle:focus {
    outline: 2px solid #0274be;
    outline-offset: 2px;
    border-radius: 2px;
}

.hvac-password-input {
    padding-right: 3.5rem;
}

/* ===== REMEMBER ME ===== */
.hvac-remember-group {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
}

.hvac-remember-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
}

.hvac-remember-label {
    color: #333;
    font-size: 0.95rem;
    margin: 0;
    cursor: pointer;
}

/* ===== SUBMIT BUTTON ===== */
.hvac-login-submit {
    width: 100%;
    background-color: #0274be;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.9rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hvac-login-submit:hover {
    background-color: #005fa3;
    transform: translateY(-1px);
}

.hvac-login-submit:active {
    transform: translateY(0);
}

.hvac-login-submit:focus {
    outline: 2px solid #0274be;
    outline-offset: 2px;
}

/* ===== LOADING STATE ===== */
.hvac-login-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: hvac-spin 1s linear infinite;
}

@keyframes hvac-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== LINKS SECTION ===== */
.hvac-login-links {
    text-align: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

.hvac-register-link,
.hvac-lostpassword-link {
    color: #0274be;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.hvac-register-link:hover,
.hvac-lostpassword-link:hover {
    text-decoration: underline;
}

.hvac-register-link:focus,
.hvac-lostpassword-link:focus {
    outline: 2px solid #0274be;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ===== ERROR MESSAGES ===== */
.hvac-login-error,
.login-error {
    background-color: #ffebe9;
    border: 1px solid #d63638;
    border-radius: 4px;
    color: #d63638;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.hvac-login-success,
.login-success {
    background-color: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 4px;
    color: #2e7d32;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hvac-community-login-wrapper {
        padding: 1rem;
        min-height: auto;
    }
    
    .hvac-login-form-card {
        padding: 2rem 1.5rem;
        margin: 1rem auto;
    }
    
    .hvac-login-form-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hvac-login-form-card {
        padding: 1.5rem 1rem;
        margin: 0.5rem auto;
    }
    
    .hvac-login-form-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .hvac-login-form-header h2 {
        font-size: 1.3rem;
    }
    
    .hvac-login-form-input {
        padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    }
    
    .hvac-login-submit {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    .hvac-login-form-input,
    .hvac-login-submit,
    .hvac-password-toggle {
        transition: none;
    }
    
    .hvac-login-spinner {
        animation: none;
        border: 2px solid rgba(255, 255, 255, 0.5);
        border-top-color: #fff;
    }
    
    .hvac-login-submit:hover {
        transform: none;
    }
}

@media (prefers-contrast: high) {
    .hvac-login-form-input {
        border-width: 2px;
    }
    
    .hvac-login-form-input:focus {
        box-shadow: 0 0 0 3px #000;
        border-color: #000;
    }
    
    .hvac-login-submit {
        border: 2px solid transparent;
    }
    
    .hvac-login-submit:focus {
        border-color: #fff;
        outline-color: #000;
    }
}