/**
 * jQuery Password Validator Plugin - CSS
 * @version 1.0.0
 */

/* Wrapper */
.pv-wrapper {
    position: relative;
}

/* Toggle Button */
.pv-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    padding: 5px 8px;
    font-size: 16px;
    transition: color 0.2s ease;
    z-index: 10;
}

.pv-toggle-btn:hover {
    color: #667eea;
}

.pv-toggle-btn:focus {
    outline: none;
}

/* Rules Container */
.pv-rules {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.pv-rules.pv-focused {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pv-rules-title {
    color: #495057;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pv-rules-title i {
    color: #667eea;
}

/* Rule Item */
.pv-rule-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
    transition: all 0.3s ease;
}

.pv-rule-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.pv-rule-text {
    flex: 1;
}

/* Pending State */
.pv-rule-item.pv-pending {
    color: #6c757d;
}

.pv-rule-item.pv-pending .pv-rule-icon {
    background: #e9ecef;
    color: #adb5bd;
}

/* Valid State */
.pv-rule-item.pv-valid {
    color: #28a745;
}

.pv-rule-item.pv-valid .pv-rule-icon {
    background: #d4edda;
    color: #28a745;
}

/* Invalid State */
.pv-rule-item.pv-invalid {
    color: #dc3545;
}

.pv-rule-item.pv-invalid .pv-rule-icon {
    background: #f8d7da;
    color: #dc3545;
}

/* Strength Meter */
.pv-strength {
    margin-top: 15px;
}

.pv-strength-bar {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
}

.pv-strength-progress {
    height: 100%;
    border-radius: 4px;
    transition: all 0.4s ease;
    width: 0;
}

.pv-strength-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 13px;
}

.pv-strength-label .label-text {
    color: #6c757d;
}

.pv-strength-label .label-value {
    font-size: 12px;
    padding: 3px 10px;
}

/* Bootstrap Form Control States */
.form-control.is-valid {
    border-color: #28a745 !important;
    background-image: none;
}

.form-control.is-valid:focus {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}

.form-control.is-invalid {
    border-color: #dc3545 !important;
    background-image: none;
}

.form-control.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* Progress Bar Colors */
.pv-strength-progress.bg-danger {
    background: linear-gradient(90deg, #dc3545, #e74c5e);
}

.pv-strength-progress.bg-warning {
    background: linear-gradient(90deg, #ffc107, #ffcd39);
}

.pv-strength-progress.bg-info {
    background: linear-gradient(90deg, #17a2b8, #3ab8cc);
}

.pv-strength-progress.bg-primary {
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.pv-strength-progress.bg-success {
    background: linear-gradient(90deg, #28a745, #48c764);
}

/* Animation for rule changes */
@keyframes pvPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pv-rule-item.pv-valid .pv-rule-icon,
.pv-rule-item.pv-invalid .pv-rule-icon {
    animation: pvPulse 0.3s ease;
}

/* Responsive */
@media (max-width: 576px) {
    .pv-rules {
        padding: 15px;
    }

    .pv-rule-item {
        font-size: 12px;
    }

    .pv-rule-icon {
        width: 20px;
        height: 20px;
        font-size: 10px;
        margin-right: 10px;
    }
}

/* Bootstrap 5 Floating Labels Uyumu */
.form-floating .pv-wrapper,
.form-floating.pv-wrapper {
    position: relative;
}

.form-floating .pv-wrapper .form-control,
.form-floating.pv-wrapper .form-control {
    padding-right: 45px;
}

.form-floating .pv-toggle-btn,
.form-floating.pv-wrapper .pv-toggle-btn {
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    z-index: 5;
}

/* Form-floating içinde wrapper olmadan */
.form-floating > .pv-toggle-btn {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
}

/* Form-floating label z-index düzeltmesi */
.form-floating.pv-wrapper > label,
.form-floating .pv-wrapper + label {
    z-index: 3;
}

/* Input Group Uyumu */
.input-group .pv-wrapper {
    flex: 1;
    position: relative;
}

.input-group .pv-toggle-btn {
    right: 10px;
}

/* Form-floating içinde kurallar pozisyonu */
.form-floating + .pv-rules,
.form-floating + .pv-strength,
.pv-floating-container + .pv-rules,
.pv-floating-container + .pv-strength {
    margin-top: 15px;
}

/* Wrapper form-floating içindeyken */
.form-floating .pv-wrapper {
    width: 100%;
}

.form-floating .pv-wrapper .form-control {
    width: 100%;
    height: 100%;
}

/* Form-floating özel stil - wrapper dışına taşırma */
.pv-floating-container {
    position: relative;
}

.pv-floating-container .form-floating {
    position: relative;
}

.pv-floating-container .pv-toggle-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}