/**
 * Password Field Requirements Styling
 * Styles for password validation requirements indicators
 */

/* Requirements List Container */
.wpuf-password-requirements {
    padding: 0;
    margin: 8px 0 0 0;
    font-size: 13px;
    line-height: 1.6;
}

/* Individual Requirement Item */
.wpuf-password-req-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    padding: 0;
    color: #666;
    transition: color 0.2s ease;
}

.wpuf-password-req-item:last-child {
    margin-bottom: 0;
}

/* Requirement Icon */
.wpuf-password-req-item .wpuf-req-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Unmet Requirement (✗) - Red/Gray */
.wpuf-password-req-item .wpuf-req-icon.wpuf-req-unmet {
    color: #d32f2f;
}

/* Met Requirement (✓) - Green */
.wpuf-password-req-item .wpuf-req-icon.wpuf-req-met {
    color: #4caf50;
}

/* Requirement Text */
.wpuf-password-req-item .wpuf-req-text {
    flex: 1;
    color: inherit;
}

/* Met Requirement - Lighter Text */
.wpuf-password-req-item .wpuf-req-icon.wpuf-req-met + .wpuf-req-text {
    color: #4caf50;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wpuf-password-requirements {
        font-size: 12px;
        margin-top: 6px;
    }

    .wpuf-password-req-item {
        margin-bottom: 3px;
    }

    .wpuf-password-req-item .wpuf-req-icon {
        width: 16px;
        height: 16px;
        margin-right: 6px;
        font-size: 12px;
    }
}

/* Accessibility - High Contrast Mode Support */
@media (prefers-contrast: high) {
    .wpuf-password-req-item .wpuf-req-icon.wpuf-req-unmet {
        color: #000;
    }

    .wpuf-password-req-item .wpuf-req-icon.wpuf-req-met {
        color: #006400;
    }
}

/* Dark Mode Support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    .wpuf-password-req-item {
        color: #ccc;
    }

    .wpuf-password-req-item .wpuf-req-icon.wpuf-req-unmet {
        color: #ff6b6b;
    }

    .wpuf-password-req-item .wpuf-req-icon.wpuf-req-met {
        color: #51cf66;
    }

    .wpuf-password-req-item .wpuf-req-icon.wpuf-req-met + .wpuf-req-text {
        color: #51cf66;
    }
}

/* Animation for Icon Change */
.wpuf-password-req-item .wpuf-req-icon {
    animation: none;
}

.wpuf-password-req-item .wpuf-req-icon.wpuf-req-met {
    animation: checkmarkPulse 0.3s ease;
}

@keyframes checkmarkPulse {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Password Field Error Styling */
.wpuf-fields input[type="password"].wpuf-error {
    border-color: #d32f2f;
    background-color: #ffeaea;
}

.wpuf-fields input[type="password"].wpuf-error:focus {
    border-color: #d32f2f;
    box-shadow: 0 0 0 1px rgba(211, 47, 47, 0.2);
}

/* Error Message Positioning */
.wpuf-fields .wpuf-password-requirements + .wpuf-error-msg,
.wpuf-fields .wpuf-password-requirements ~ .wpuf-error-msg {
    margin-top: 8px;
    display: block;
}

/* Ensure error messages appear below requirements list */
.wpuf-fields .wpuf-help.wpuf-error-msg {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 8px;
    display: block;
}

/* Password field wrapper error state */
.wpuf-fields:has(input[type="password"].wpuf-error) .wpuf-password-requirements {
    margin-bottom: 4px;
}

/* Password Match Message */
.wpuf-password-match-message {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.4;
    padding: 4px 0;
}

.wpuf-password-match-message.wpuf-password-matched {
    color: #4caf50;
}

.wpuf-password-match-message.wpuf-password-mismatch {
    color: #d32f2f;
}

/* Responsive Design for Match Message */
@media (max-width: 768px) {
    .wpuf-password-match-message {
        font-size: 11px;
        margin-top: 6px;
    }
}

