/**
 * 🛡️ ESTILOS PARA FILTRO DE PROFANIDAD
 * Estilos para advertencias y feedback visual
 */

/* Animación de deslizamiento */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Campo con error de profanidad */
input.profanity-error,
textarea.profanity-error {
    border-color: #EF4444 !important;
    background-color: #FEF2F2 !important;
    animation: shake 0.5s ease;
}

input.profanity-error:focus,
textarea.profanity-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* Mensaje de advertencia */
.profanity-warning {
    color: #DC2626;
    background: #FEE2E2;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    border: 1px solid #FCA5A5;
    animation: slideDown 0.3s ease;
    line-height: 1.5;
}

.profanity-warning i {
    color: #DC2626;
    font-size: 1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.profanity-warning span {
    flex: 1;
}

/* Toast de profanidad (si se usa sistema de toast) */
.toast-profanity {
    background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.toast-profanity i {
    font-size: 1.25rem;
}

/* Badge de advertencia en formularios */
.form-profanity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #FEE2E2;
    color: #DC2626;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #FCA5A5;
}

.form-profanity-badge i {
    font-size: 0.875rem;
}

/* Modal de advertencia de profanidad */
.profanity-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.profanity-modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profanity-modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.profanity-modal-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #DC2626;
}

.profanity-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1F2937;
}

.profanity-modal-body {
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.profanity-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.profanity-modal-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.875rem;
}

.profanity-modal-btn-primary {
    background: #DC2626;
    color: white;
}

.profanity-modal-btn-primary:hover {
    background: #B91C1C;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.profanity-modal-btn-secondary {
    background: #F3F4F6;
    color: #6B7280;
}

.profanity-modal-btn-secondary:hover {
    background: #E5E7EB;
}

/* Responsive */
@media (max-width: 768px) {
    .profanity-warning {
        font-size: 0.8125rem;
        padding: 0.625rem 0.875rem;
    }

    .profanity-modal-content {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .profanity-modal-title {
        font-size: 1.125rem;
    }

    .profanity-modal-actions {
        flex-direction: column;
    }

    .profanity-modal-btn {
        width: 100%;
    }
}

/* Tooltip de ayuda */
.profanity-tooltip {
    position: absolute;
    background: #1F2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.profanity-tooltip.show {
    opacity: 1;
}

.profanity-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1F2937;
}

/* Estado de validación limpio (opcional) */
input.profanity-clean,
textarea.profanity-clean {
    border-color: #10B981 !important;
    background-color: #F0FDF4 !important;
}

input.profanity-clean:focus,
textarea.profanity-clean:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

/* Indicador de validación en tiempo real */
.profanity-indicator {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.profanity-indicator.checking {
    color: #F59E0B;
}

.profanity-indicator.clean {
    color: #10B981;
}

.profanity-indicator.dirty {
    color: #EF4444;
}

/* Lista de palabras detectadas (debug mode) */
.profanity-debug {
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #92400E;
}

.profanity-debug-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.profanity-debug-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.profanity-debug-word {
    background: #FBBF24;
    color: #78350F;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    font-family: monospace;
}
