/**
 * Password Strength Indicator Styles
 * Visual feedback for password validation requirements
 */

.password-strength-indicator {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-family: inherit;
}

.strength-meter {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background: #dc3545;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #6c757d;
    text-align: center;
}

.requirements-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6c757d;
    transition: all 0.2s ease;
}

.requirement i {
    font-size: 12px;
    width: 14px;
    text-align: center;
    transition: all 0.2s ease;
}

.requirement.met {
    color: #28a745;
}

.requirement.met i {
    color: #28a745;
}

/* Password input field states */
input[type="password"] {
    transition: border-color 0.3s ease;
}

input[type="password"][data-valid="true"] {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

input[type="password"][data-valid="false"] {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

input[type="password"][data-valid="empty"] {
    border-color: #ffc107;
}

/* Confirm password specific styling */
.confirm-password-group {
    position: relative;
}

.password-match-indicator {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.password-match-indicator.match {
    color: #28a745;
}

.password-match-indicator.mismatch {
    color: #dc3545;
}

/* Responsive design */
@media (max-width: 768px) {
    .password-strength-indicator {
        padding: 12px;
        margin-top: 8px;
    }
    
    .requirements-list {
        gap: 6px;
    }
    
    .requirement {
        font-size: 12px;
        gap: 6px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .password-strength-indicator {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .strength-meter {
        background: #4a5568;
    }
    
    .strength-text {
        color: #a0aec0;
    }
    
    .requirement {
        color: #a0aec0;
    }
}

/* Animation for strength changes */
@keyframes strength-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.strength-bar.updated {
    animation: strength-pulse 0.3s ease;
}

/* Accessibility improvements */
.password-strength-indicator:focus-within {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.requirement:focus {
    outline: 1px dashed #007bff;
    outline-offset: 1px;
}

/* Print styles */
@media print {
    .password-strength-indicator {
        display: none;
    }
}