/**
 * Universal Password Strength Validation Styles
 * Works with both custom login forms and admin password reset forms
 */

/* Password Strength Meter Styles */
.csb-password-strength-meter {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--event-font-family, "DM Sans"), sans-serif;
}

.bsa-login-box .csb-password-strength-meter {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.csb-strength-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bsa-login-box .csb-strength-bar {
    background: rgba(255, 255, 255, 0.12);
}

.csb-strength-fill {
    height: 100%;
    width: 0%;
    background: #d63638;
    border-radius: 3px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.csb-strength-text {
    font-size: 12px;
    font-weight: 600;
    color: #d63638;
    margin-bottom: 8px;
    text-align: center;
}

.csb-strength-requirements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.csb-req-item {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.bsa-login-box .csb-req-item {
    color: rgba(255, 255, 255, 0.92);
}

.csb-req-item.csb-req-met {
    color: #46b450;
}

.csb-req-icon {
    display: inline-block;
    width: 12px;
    min-width: 12px;
    height: 12px;
    margin-right: 6px;
    font-size: 10px;
    text-align: center;
    line-height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #d63638;
    transition: all 0.3s ease;
}

.bsa-login-box .csb-req-icon {
    background: rgba(255, 255, 255, 0.12);
}

.csb-req-met .csb-req-icon {
    background: #46b450;
    color: white;
}

/* Error message styles */
.csb-password-error,
.bsa-password-error {
    color: #d63638 !important;
    font-size: 14px !important;
    margin: 10px 0 !important;
    padding: 10px !important;
    background: rgba(214, 54, 56, 0.1) !important;
    border-radius: 4px !important;
    border: 1px solid rgba(214, 54, 56, 0.3) !important;
    font-family: var(--event-font-family, "DM Sans"), sans-serif;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .csb-strength-requirements {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    
    .csb-req-item {
        font-size: 10px;
    }
    
    .csb-password-strength-meter {
        padding: 8px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .csb-password-strength-meter {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .csb-strength-bar {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .csb-req-item {
        color: rgba(255, 255, 255, 0.7);
    }
    
    .csb-req-icon {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .csb-password-strength-meter {
        border: 2px solid;
    }
    
    .csb-strength-bar {
        border: 1px solid;
    }
    
    .csb-req-icon {
        border: 1px solid;
    }
}

/* Animation for smooth transitions */
@keyframes strengthMeterFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.csb-password-strength-meter {
    animation: strengthMeterFadeIn 0.3s ease-out;
}

/* Focus states for accessibility */
.csb-req-item:focus-within {
    outline: 2px solid #4f94d4;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Print styles */
@media print {
    .csb-password-strength-meter {
        display: none !important;
    }
}

