/* Comment Form Validation Styles - Preserving Original Layout */

/* Only add validation-specific styles without changing layout */

/* Validation states - minimal styling */
.comment-form input.error-field,
.comment-form textarea.error-field {
    border-color: #dc3232 !important;
    background-color: #fff8f8;
}

.comment-form input.focused,
.comment-form textarea.focused {
    border-color: #007cba !important;
}

/* Error messages - positioned below fields */
.error-message {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #dc3232;
    font-weight: 500;
    min-height: 16px;
}

.error-message.error {
    color: #dc3232;
}

.error-message.warning {
    color: #f56e28;
}

.error-message.success {
    color: #46b450;
}

/* Submit button states */
.comment-form #submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.comment-form #submit.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Character count */
.char-count {
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

.char-count.warning {
    color: #f56e28;
}

.char-count.success {
    color: #46b450;
}

/* Loading state for submit button */
.comment-form #submit:disabled {
    position: relative;
}

.comment-form #submit:disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility improvements - minimal */
.comment-form .error-field:focus {
    outline: 2px solid #dc3232;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .error-message {
        font-weight: 700;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .comment-form #submit:disabled::after {
        animation: none;
    }
}
