/**
 * Form Validation Styles
 * Consistent styling for form validation UI
 */

/* Error Messages */
.field-error {
    color: #DC2626;
    font-size: 0.85em;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s ease;
}

.field-error:before {
    content: '⚠️';
    font-size: 1em;
}

/* Input States */
input.valid {
    border-color: #10B981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

input.invalid {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Password Strength Meter */
.password-strength-meter {
    margin-top: 12px;
    margin-bottom: 12px;
}

.password-strength-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.strength-text {
    color: #787774;
    font-weight: 500;
}

.strength-value {
    font-weight: 600;
    font-size: 0.95em;
    transition: color 0.3s ease;
}

.password-strength-bar-container {
    height: 6px;
    background: #E9E9E7;
    border-radius: 3px;
    overflow: hidden;
}

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

/* Password Requirements Checklist */
.password-requirements {
    margin-top: 12px;
    padding: 16px;
    background: #F7F6F3;
    border-radius: 8px;
    border: 1px solid #E9E9E7;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.9em;
    color: #787774;
    transition: color 0.2s ease;
}

.requirement .req-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    color: #C4C4C1;
    transition: color 0.2s ease;
}

.requirement.met {
    color: #10B981;
}

.requirement.met .req-icon {
    color: #10B981;
    font-weight: 700;
}

.requirement .req-text {
    flex: 1;
}

/* Focus States */
input:focus {
    outline: none;
}

/* Loading State for Submit Buttons */
.btn-loading {
    opacity: 0.7;
    cursor: not-allowed !important;
    pointer-events: none;
}

.btn-loading:before {
    content: '⏳ ';
}

/* Form Field Container */
.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #37352F;
    font-size: 0.95em;
}

.form-field input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E9E9E7;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-field input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Success State */
.form-success {
    padding: 16px;
    background: #ECFDF5;
    border: 2px solid #10B981;
    border-radius: 8px;
    color: #065F46;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.form-success:before {
    content: '✓';
    width: 24px;
    height: 24px;
    background: #10B981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* Error State */
.form-error {
    padding: 16px;
    background: #FEF2F2;
    border: 2px solid #EF4444;
    border-radius: 8px;
    color: #991B1B;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.form-error:before {
    content: '✕';
    width: 24px;
    height: 24px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 640px) {
    .password-requirements {
        padding: 12px;
    }

    .requirement {
        font-size: 0.85em;
    }
}
