/* Password Strength Meter Styles */

.password-strength-container {
    margin-top: 8px;
    transition: all 0.3s ease;
}

/* Strength Bar Styles */
.password-strength-bar-container {
    margin-bottom: 8px;
}

.password-strength-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.password-strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 4px;
}

/* Strength Level Colors */
.strength-very-weak {
    background-color: #dc3545; /* danger */
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.3);
}

.strength-weak {
    background-color: #fd7e14; /* warning-orange */
    box-shadow: 0 0 8px rgba(253, 126, 20, 0.3);
}

.strength-medium {
    background-color: #ffc107; /* warning */
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.3);
}

.strength-strong {
    background-color: #0d6efd; /* primary */
    box-shadow: 0 0 8px rgba(13, 110, 253, 0.3);
}

.strength-very-strong {
    background-color: #198754; /* success */
    box-shadow: 0 0 8px rgba(25, 135, 84, 0.3);
}

/* Strength Label */
.password-strength-label {
    font-size: 0.875rem;
    font-weight: 500;
    display: block;
}

/* Feedback Area */
.password-feedback {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.password-feedback:empty {
    display: none;
}

/* Issue and Suggestion Lists */
.password-issue-list,
.password-suggestion-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.password-issue-list li,
.password-suggestion-list li {
    padding: 2px 0;
    padding-left: 16px;
    position: relative;
}

.password-issue-list li::before {
    content: "×";
    position: absolute;
    left: 0;
    top: 2px;
    color: #dc3545;
    font-weight: bold;
}

.password-suggestion-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 2px;
    color: #198754;
    font-weight: bold;
}

/* Dark Theme Support */
[data-bs-theme="dark"] .password-feedback {
    background-color: #212529;
    border-color: #495057;
    color: #dee2e6;
}

[data-bs-theme="dark"] .password-strength-bar {
    background-color: #495057;
}

/* Input States */
.form-control:focus + .password-strength-container {
    opacity: 1;
}

/* Animation for feedback appearance */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password-feedback {
    animation: slideDown 0.2s ease-out;
}

/* Responsive Design */
@media (max-width: 576px) {
    .password-feedback {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
    
    .password-strength-bar {
        height: 6px;
    }
    
    .password-strength-label {
        font-size: 0.75rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .password-strength-bar {
        border: 1px solid #000;
    }
    
    .password-feedback {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .password-strength-fill,
    .password-strength-container,
    .password-feedback {
        transition: none;
    }
    
    .password-feedback {
        animation: none;
    }
}

/* Focus indicators for accessibility */
.password-strength-container:focus-within .password-strength-bar {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Custom tooltip styles for additional context */
.password-strength-tooltip {
    position: relative;
    cursor: help;
}

.password-strength-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
}

.password-strength-tooltip:hover::after {
    opacity: 1;
}