/**
 * AJAX Comments Styles
 * Lightweight Comment Anti-Spam Plugin
 */

/* Message Container */
.lc-comment-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    animation: lcSlideDown 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@keyframes lcSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Message Icon */
.lc-comment-message__icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* Message Text */
.lc-comment-message__text {
    flex: 1;
    margin: 0;
}

/* Success Message */
.lc-comment-message--success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

[data-theme="dark"] .lc-comment-message--success {
    background: #1e4620;
    border-color: #28a745;
    color: #7dce82;
}

/* Error Message */
.lc-comment-message--error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

[data-theme="dark"] .lc-comment-message--error {
    background: #4a1e1e;
    border-color: #dc3545;
    color: #f1959b;
}

/* Info Message */
.lc-comment-message--info {
    background: #d1ecf1;
    border: 2px solid #17a2b8;
    color: #0c5460;
}

[data-theme="dark"] .lc-comment-message--info {
    background: #1e3a3e;
    border-color: #17a2b8;
    color: #7dd3df;
}

/* Warning Message */
.lc-comment-message--warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
}

[data-theme="dark"] .lc-comment-message--warning {
    background: #3e3420;
    border-color: #ffc107;
    color: #ffd966;
}

/* Loading State for Submit Button */
.lc-submitting {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.lc-submitting::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: lcSpin 0.6s linear infinite;
}

@keyframes lcSpin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Form Field Validation Styles */
#commentform input:invalid,
#commentform textarea:invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

#commentform input:valid,
#commentform textarea:valid {
    border-color: #28a745;
}

#commentform input:focus:invalid,
#commentform textarea:focus:invalid {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

/* Disabled State */
#commentform input:disabled,
#commentform textarea:disabled,
#commentform select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
}

[data-theme="dark"] #commentform input:disabled,
[data-theme="dark"] #commentform textarea:disabled,
[data-theme="dark"] #commentform select:disabled {
    background: #2a2a2a;
}

/* Turnstile Container Enhancement */
.cf-turnstile {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .lc-comment-message {
        padding: 14px 16px;
        font-size: 14px;
        margin: 15px 0;
    }
    
    .lc-comment-message__icon {
        font-size: 18px;
    }
}

/* Smooth transitions */
#commentform * {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

/* Focus indicators for accessibility */
#commentform input:focus,
#commentform textarea:focus,
#commentform select:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .lc-comment-message {
        border-width: 3px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .lc-comment-message,
    .lc-submitting::after,
    #commentform * {
        animation: none !important;
        transition: none !important;
    }
}

/* Print styles */
@media print {
    .lc-comment-message,
    .cf-turnstile {
        display: none !important;
    }
}

