/**
 * Veelearn Validation CSS
 * Styles for validation error messages
 */

.validation-error {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: errorSlideIn 0.3s ease-out;
}

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

.error-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.error-message {
    font-size: 14px;
    color: #991b1b;
    line-height: 1.4;
}

/* Input field error states */
input.error,
textarea.error,
select.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Success states */
input.success,
textarea.success,
select.success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Validation error container */
.validation-errors-container {
    margin-top: 8px;
}

/* Inline validation message */
.inline-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .validation-error {
        background: #7f1d1d;
        border-left-color: #f87171;
    }

    .error-message {
        color: #fecaca;
    }

    input.error,
    textarea.error,
    select.error {
        border-color: #f87171 !important;
        box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
    }

    input.success,
    textarea.success,
    select.success {
        border-color: #34d399 !important;
        box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
    }

    .inline-error {
        color: #f87171;
    }
}

/* Responsive design */
@media (max-width: 640px) {
    .validation-error {
        padding: 10px 12px;
        font-size: 13px;
    }

    .error-icon {
        font-size: 16px;
    }
}
