/* ===== CHAT WIDGET - FARMAENLACE ===== */

/* Variables de colores basadas en el diseño */
#fec-chat-wrapper {
    --primary-color: #ef4444;
    --primary-hover: #dc2626;
    --secondary-color: #f87171;
    --background-light: #f9f7ff;
    --background-white: #ffffff;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --user-bubble: #ef4444;
    --bot-bubble: #f3f4f6;
    --success-color: #10b981;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Reset y estilos base */
#fec-chat-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Botón flotante del chat */
#fec-chat-wrapper .chat-float-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 9998;
    animation: pulse 2s infinite;
}

#fec-chat-wrapper .chat-float-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
}

#fec-chat-wrapper .chat-float-button.active {
    background: white;
}

#fec-chat-wrapper .chat-float-icon {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
    }
}

/* Contador de mensajes no leídos */
#fec-chat-wrapper .chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

/* Contenedor principal del chat */
#fec-chat-wrapper .chat-widget-container {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 400px;
    max-width: calc(100vw - 48px);
    height: 600px;
    max-height: calc(100vh - 150px);
    background: var(--background-white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    overflow: hidden;
}

#fec-chat-wrapper .chat-widget-container.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header del chat */
#fec-chat-wrapper .chat-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#fec-chat-wrapper .chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

#fec-chat-wrapper .chat-bot-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

#fec-chat-wrapper .header-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

#fec-chat-wrapper .chat-header-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.2;
}

#fec-chat-wrapper .chat-status {
    font-size: 11px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1.2;
}

#fec-chat-wrapper .status-indicator {
    width: 6px;
    height: 6px;
    background-color: var(--success-color);
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

#fec-chat-wrapper .chat-header-actions {
    display: flex;
    gap: 6px;
}

#fec-chat-wrapper .chat-header-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#fec-chat-wrapper .chat-header-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

#fec-chat-wrapper .chat-header-btn svg {
    width: 14px;
    height: 14px;
    fill: white;
}

/* Fecha separadora */
#fec-chat-wrapper .chat-date-divider {
    text-align: center;
    padding: 16px 0;
    color: var(--text-light);
    font-size: 12px;
}

/* Área de mensajes */
#fec-chat-wrapper .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--background-light);
    scroll-behavior: smooth;
}

#fec-chat-wrapper .chat-messages::-webkit-scrollbar {
    width: 6px;
}

#fec-chat-wrapper .chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#fec-chat-wrapper .chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

#fec-chat-wrapper .chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Mensaje individual */
#fec-chat-wrapper .chat-message {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#fec-chat-wrapper .chat-message.user {
    align-items: flex-end;
}

#fec-chat-wrapper .chat-message.bot {
    align-items: flex-start;
}

#fec-chat-wrapper .message-bubble {
    max-width: 90%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
}

#fec-chat-wrapper .message-bubble.user {
    background: var(--user-bubble);
    color: white;
    border-bottom-right-radius: 4px;
}

#fec-chat-wrapper .message-bubble.bot {
    background: var(--bot-bubble);
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
}

/* Timestamp del último mensaje */
#fec-chat-wrapper .message-timestamp {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
    margin-left: 0;
    font-weight: 400;
    text-align: left;
}

/* Formato de texto dentro de los mensajes (Markdown) */
#fec-chat-wrapper .message-bubble strong {
    font-weight: 700;
    color: inherit;
}

#fec-chat-wrapper .message-bubble em {
    font-style: italic;
    color: inherit;
}

#fec-chat-wrapper .message-bubble br {
    display: block;
    content: "";
    margin: 4px 0;
}

/* Párrafos */
#fec-chat-wrapper .message-bubble p {
    margin: 0 0 8px 0;
}

#fec-chat-wrapper .message-bubble p:last-child {
    margin-bottom: 0;
}

/* Listas con viñetas (ul) */
#fec-chat-wrapper .message-bubble ul {
    margin: 8px 0;
    padding-left: 20px;
    list-style-type: disc;
}

#fec-chat-wrapper .message-bubble ul li {
    margin: 4px 0;
    line-height: 1.5;
}

/* Listas numeradas (ol) */
#fec-chat-wrapper .message-bubble ol {
    margin: 8px 0;
    padding-left: 20px;
    list-style-type: decimal;
}

#fec-chat-wrapper .message-bubble ol li {
    margin: 4px 0;
    line-height: 1.5;
}

/* Encabezados */
.message-bubble h1,
.message-bubble h2,
.message-bubble h3,
#fec-chat-wrapper .message-bubble h4 {
    margin: 8px 0 4px 0;
    font-weight: 700;
}

#fec-chat-wrapper .message-bubble h1 { font-size: 1.3em; }
#fec-chat-wrapper .message-bubble h2 { font-size: 1.2em; }
#fec-chat-wrapper .message-bubble h3 { font-size: 1.1em; }
#fec-chat-wrapper .message-bubble h4 { font-size: 1em; }

/* Bloques de código */
#fec-chat-wrapper .message-bubble code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

#fec-chat-wrapper .message-bubble pre {
    background: rgba(0, 0, 0, 0.1);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
}

#fec-chat-wrapper .message-bubble pre code {
    background: transparent;
    padding: 0;
}

/* Enlaces */
#fec-chat-wrapper .message-bubble a {
    color: #8b5cf6;
    text-decoration: underline;
}

#fec-chat-wrapper .message-bubble a:hover {
    color: #7c3aed;
}

/* Citas */
#fec-chat-wrapper .message-bubble blockquote {
    border-left: 3px solid #8b5cf6;
    padding-left: 12px;
    margin: 8px 0;
    color: inherit;
    opacity: 0.9;
}

/* Líneas horizontales */
#fec-chat-wrapper .message-bubble hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 12px 0;
}

/* Espaciado entre párrafos/líneas */
#fec-chat-wrapper .message-bubble > *:not(:last-child) {
    margin-bottom: 8px;
}

#fec-chat-wrapper .message-image {
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
}

#fec-chat-wrapper .message-image img {
    max-width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s;
}

#fec-chat-wrapper .message-image img:hover {
    opacity: 0.9;
}

/* Lightbox para imágenes */
#fec-chat-wrapper .image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease-in-out;
}

#fec-chat-wrapper .image-lightbox.active {
    display: flex;
}

#fec-chat-wrapper .image-lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    animation: zoomIn 0.3s ease-in-out;
    overflow: auto;
}

#fec-chat-wrapper .image-lightbox-content img {
    min-width: 500px;
    max-width: none;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

#fec-chat-wrapper .image-lightbox-content img.zoomed {
    cursor: zoom-out;
}

#fec-chat-wrapper .image-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 10001;
}

#fec-chat-wrapper .image-lightbox-close:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

/* Scrollbar para contenedor de imagen con zoom */
#fec-chat-wrapper .image-lightbox-content::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#fec-chat-wrapper .image-lightbox-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

#fec-chat-wrapper .image-lightbox-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

#fec-chat-wrapper .image-lightbox-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Botones de respuesta rápida */
#fec-chat-wrapper .quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 0 20px;
}

#fec-chat-wrapper .quick-reply-btn {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

#fec-chat-wrapper .quick-reply-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Sugerencias de respuesta */
#fec-chat-wrapper .suggested-replies {
    padding: 12px 20px;
    background: var(--background-white);
    border-top: 1px solid var(--border-color);
}

#fec-chat-wrapper .suggested-reply {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 8px;
}

#fec-chat-wrapper .suggested-reply:last-child {
    margin-bottom: 0;
}

#fec-chat-wrapper .suggested-reply:hover {
    background: var(--background-light);
    border-color: var(--primary-color);
}

/* Indicador de escritura */
#fec-chat-wrapper .typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--bot-bubble);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

#fec-chat-wrapper .typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-light);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

#fec-chat-wrapper .typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

#fec-chat-wrapper .typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Input de mensajes - Estilo similar a la imagen */
#fec-chat-wrapper .chat-input-container {
    padding: 10px 12px 6px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#fec-chat-wrapper .chat-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Contador de caracteres */
#fec-chat-wrapper .char-counter {
    font-size: 10px;
    color: #9ca3af;
    text-align: right;
    padding: 0 4px 2px;
    transition: color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
}

#fec-chat-wrapper .chat-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f9fafb;
    border-radius: 22px;
    padding: 0 6px 0 14px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    min-height: 44px;
}

#fec-chat-wrapper .chat-input-wrapper:focus-within {
    border-color: #d1d5db;
    background: white;
}

#fec-chat-wrapper .chat-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 11px 8px;
    font-size: 14px;
    color: #374151;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#fec-chat-wrapper .chat-input-wrapper input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

#fec-chat-wrapper .emoji-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    opacity: 0.5;
    transition: all 0.2s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#fec-chat-wrapper .emoji-btn:hover {
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.04);
}

#fec-chat-wrapper .emoji-btn svg {
    width: 22px;
    height: 22px;
    fill: #6b7280;
}

/* Botón de voz */
#fec-chat-wrapper .voice-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    opacity: 0.5;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: none; /* Oculto por defecto, se muestra si el navegador soporta */
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 4px;
}

#fec-chat-wrapper .voice-btn:hover {
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.04);
}

#fec-chat-wrapper .voice-btn svg {
    width: 20px;
    height: 20px;
    fill: #6b7280;
    transition: fill 0.3s ease;
}

/* Estado grabando */
#fec-chat-wrapper .voice-btn.recording {
    opacity: 1;
    background: #ef4444;
    animation: pulse-recording 1.5s ease-in-out infinite;
}

#fec-chat-wrapper .voice-btn.recording svg {
    fill: #ffffff;
}

@keyframes pulse-recording {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

#fec-chat-wrapper .send-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.5;
}

#fec-chat-wrapper .send-btn:hover:not(:disabled) {
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.04);
}

#fec-chat-wrapper .send-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: transparent;
}

#fec-chat-wrapper .send-btn svg {
    width: 22px;
    height: 22px;
    fill: #6b7280;
}

/* Responsive */
@media (max-width: 480px) {
    .chat-widget-container {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    #fec-chat-wrapper .chat-float-button {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
    }

    #fec-chat-wrapper .chat-float-icon {
        width: 56px;
        height: 56px;
    }
    
    #fec-chat-wrapper .chat-header {
        border-radius: 0;
    }
}

/* Estados de error */
#fec-chat-wrapper .error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin: 8px 20px;
    border-left: 3px solid #ef4444;
}

/* Mensaje de bienvenida */
#fec-chat-wrapper .welcome-message {
    padding: 30px 24px;
    color: var(--text-light);
}

#fec-chat-wrapper .welcome-message h4 {
    color: var(--text-dark);
    margin-bottom: 12px;
    font-size: 18px;
    text-align: center;
}

#fec-chat-wrapper .welcome-message p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
    color: var(--text-dark);
    text-align: center;
}

#fec-chat-wrapper .welcome-message .help-text {
    background: #f9fafb;
    padding: 16px;
    border-radius: 12px;
    border-left: 3px solid var(--primary-color);
    font-size: 13px;
    line-height: 1.7;
    color: #4b5563;
    text-align: left;
}

#fec-chat-wrapper .welcome-message .help-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Emoji Picker */
#fec-chat-wrapper .emoji-picker {
    position: absolute;
    bottom: 70px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: block;
}

#fec-chat-wrapper .emoji-picker-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
    background: var(--background-light);
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

#fec-chat-wrapper .emoji-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    padding: 12px;
}

#fec-chat-wrapper .emoji-item {
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    text-align: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
}

#fec-chat-wrapper .emoji-item:hover {
    background: var(--background-light);
    transform: scale(1.2);
}

#fec-chat-wrapper .emoji-item:active {
    transform: scale(1.1);
}

/* Responsive emoji picker */
@media (max-width: 768px) {
    .emoji-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    
    #fec-chat-wrapper .emoji-item {
        font-size: 20px;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .emoji-picker {
        bottom: 60px;
        left: 10px;
        right: 10px;
        max-height: 250px;
    }
    
    #fec-chat-wrapper .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 2px;
        padding: 8px;
    }
    
    #fec-chat-wrapper .emoji-item {
        font-size: 18px;
        padding: 4px;
    }
}

/* ========================================
   NUEVAS FUNCIONALIDADES UX
   ======================================== */

/* Estados del indicador de conexión */
#fec-chat-wrapper .status-indicator {
    transition: background-color 0.3s ease;
}

#fec-chat-wrapper .status-indicator.status-connected {
    background: #10b981; /* Verde - Conectado */
}

#fec-chat-wrapper .status-indicator.status-connecting {
    background: #f59e0b; /* Ámbar - Conectando */
    animation: pulse-connecting 2s ease-in-out infinite;
}

#fec-chat-wrapper .status-indicator.status-error {
    background: #ef4444; /* Rojo - Error */
    animation: pulse-error 1s ease-in-out 2;
}

@keyframes pulse-connecting {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.9);
    }
}

@keyframes pulse-error {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Ajustes al badge para mejor visibilidad */
#fec-chat-wrapper .chat-badge {
    animation: badge-pop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badge-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* ========================================
   MODO OSCURO - DESACTIVADO PARA MANTENER COLORES FIJOS
   ========================================

#fec-chat-wrapper .dark-mode {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --background: #1f2937;
    --background-light: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #4b5563;
    --user-message-bg: #10b981;
    --user-message-text: #ffffff;
    --bot-message-bg: #374151;
    --bot-message-text: #f9fafb;
    --input-bg: #374151;
    --input-border: #4b5563;
    --shadow: rgba(0, 0, 0, 0.5);
}

#fec-chat-wrapper .dark-mode .chat-widget-container {
    background: var(--background);
    box-shadow: 0 8px 32px var(--shadow);
}

#fec-chat-wrapper .dark-mode .chat-header {
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
}

#fec-chat-wrapper .dark-mode .chat-header-title {
    color: var(--text-primary);
}

#fec-chat-wrapper .dark-mode .chat-header-subtitle {
    color: var(--text-secondary);
}

#fec-chat-wrapper .dark-mode .chat-close-btn {
    color: var(--text-secondary);
}

#fec-chat-wrapper .dark-mode .chat-close-btn:hover {
    color: var(--text-primary);
    background: var(--background-light);
}

#fec-chat-wrapper .dark-mode .chat-messages {
    background: var(--background);
}

#fec-chat-wrapper .dark-mode .message.bot .message-content {
    background: var(--bot-message-bg);
    color: var(--bot-message-text);
}

#fec-chat-wrapper .dark-mode .message.user .message-content {
    background: var(--user-message-bg);
    color: var(--user-message-text);
}

#fec-chat-wrapper .dark-mode .message-timestamp {
    color: var(--text-secondary);
}

#fec-chat-wrapper .dark-mode .chat-date-divider {
    color: var(--text-secondary);
}

.dark-mode .chat-date-divider::before,
#fec-chat-wrapper .dark-mode .chat-date-divider::after {
    background: var(--border-color);
}

#fec-chat-wrapper .dark-mode .welcome-message {
    background: var(--background-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

#fec-chat-wrapper .dark-mode .chat-input-area {
    background: var(--background);
    border-top: 1px solid var(--border-color);
}

#fec-chat-wrapper .dark-mode .chat-input {
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--input-border);
}

#fec-chat-wrapper .dark-mode .chat-input:focus {
    border-color: var(--primary-color);
    background: var(--background-light);
}

#fec-chat-wrapper .dark-mode .chat-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

#fec-chat-wrapper .dark-mode .char-counter {
    color: var(--text-secondary);
}

#fec-chat-wrapper .dark-mode .char-counter.warning {
    color: #f59e0b;
}

#fec-chat-wrapper .dark-mode .char-counter.error {
    color: #ef4444;
}

#fec-chat-wrapper .dark-mode .chat-emoji-btn {
    color: var(--text-secondary);
}

#fec-chat-wrapper .dark-mode .chat-emoji-btn:hover {
    color: var(--text-primary);
    background: var(--background-light);
}

#fec-chat-wrapper .dark-mode .voice-btn:hover {
    background: var(--background-light);
}

#fec-chat-wrapper .dark-mode .voice-btn svg {
    fill: var(--text-secondary);
}

#fec-chat-wrapper .dark-mode .voice-btn.recording {
    background: #ef4444;
}

#fec-chat-wrapper .dark-mode .voice-btn.recording svg {
    fill: #ffffff;
}

#fec-chat-wrapper .dark-mode .chat-send-btn:disabled {
    background: var(--background-light);
    opacity: 0.5;
}

#fec-chat-wrapper .dark-mode .emoji-picker {
    background: var(--background-light);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px var(--shadow);
}

#fec-chat-wrapper .dark-mode .emoji-item:hover {
    background: var(--background);
}

#fec-chat-wrapper .dark-mode .loading-dots span {
    background: var(--text-secondary);
}

#fec-chat-wrapper .dark-mode .message-image {
    border: 1px solid var(--border-color);
}

#fec-chat-wrapper .dark-mode .message-content a {
    color: #60a5fa;
}

#fec-chat-wrapper .dark-mode .message-content a:hover {
    color: #93c5fd;
}

FIN MODO OSCURO DESACTIVADO */


