/**
 * Password validation styles
 * Styles for password strength validation and error display
 */

/* Error input styling */
.bp-form-error-input {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
    padding-right: 2.5rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23dc3545' viewBox='0 0 16 16'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath d='M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 1rem !important;
    /*transition: all 0.3s ease;*/
}

.bp-form-error-input:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Error message styling */
.bp-form-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.bp-form-error.hidden {
    display: none;
}

/* Password requirements hint */
.bp-password-requirements {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-left: 3px solid #6c757d;
    border-radius: 0.25rem;
}

.bp-password-requirements small {
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.5;
    display: block;
}

.bp-text-muted {
    color: #6c757d !important;
}

/* Success state for password requirements */
.bp-password-requirements.bp-requirements-valid {
    background-color: #d4edda;
    border-left-color: #28a745;
    transition: all 0.3s ease;
}

.bp-password-requirements.bp-requirements-valid .bp-requirements-text {
    color: #155724;
}

.bp-requirements-success {
    color: #155724;
    font-weight: 600;
}

.bp-requirements-success.hidden {
    display: none;
}

.bp-text-success {
    color: #28a745 !important;
}

/* Success state for valid inputs */
.bp-form-valid-input {
    border-color: #28a745 !important;
    background-color: #f0fff4 !important;
    padding-right: 2.5rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2328a745' viewBox='0 0 16 16'%3E%3Cpath d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 1rem !important;
    /*transition: all 0.3s ease;*/
}

.bp-form-valid-input:focus {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Success message */
.bp-form-success {
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.bp-form-success.hidden {
    display: none;
}

/* Password strength indicator */
.bp-password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.bp-password-strength-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.bp-password-strength-weak {
    background-color: #dc3545;
    width: 25%;
}

.bp-password-strength-medium {
    background-color: #ffc107;
    width: 50%;
}

.bp-password-strength-good {
    background-color: #17a2b8;
    width: 75%;
}

.bp-password-strength-strong {
    background-color: #28a745;
    width: 100%;
}

/* Adjustments for fields with eye icon */
.bp-form-group_svg .bp-form-valid-input,
.bp-form-group_svg .bp-form-error-input {
    padding-right: 3.5rem !important;
}

.bp-form-group_svg .bp-form-valid-input {
    background-position: right 3rem center !important;
}

.bp-form-group_svg .bp-form-error-input {
    background-position: right 3rem center !important;
}

/* Animation for validation state changes */
@keyframes validationSuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.bp-form-valid-input {
    /*animation: validationSuccess 0.3s ease;*/
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .bp-password-requirements small {
        font-size: 0.8rem;
    }
    
    .bp-password-requirements {
        padding: 0.5rem;
    }
}
