/* Variables base para mantener coherencia cromática con el sitio */
:root {
  /* Los valores por defecto ahora los maneja theme-loader.php dinámicamente */
  /* NO usar valores hardcodeados azules aquí - se sobrescriben dinámicamente por theme-loader.php */
  --accent-rgb: var(--primary-rgb, 44, 90, 160);
  /* Variables del tema - se sobrescriben dinámicamente por theme-loader.php */
  --theme-primary: var(--color-primary);
  --theme-primary-dark: var(--color-primary-dark);
  --theme-primary-light: var(--color-primary-light);
  --theme-surface: var(--color-surface);
  --theme-text-primary: var(--color-text-primary);
  --theme-background: var(--color-background);
}

/* Estilos mejorados para el chat del restaurante */

/* ========== SELECCIÓN DE TEXTO MODERNA - ADAPTADA AL TEMA ========== */
/* Selección global con colores del tema activo */
::selection {
  background: var(--theme-primary) !important;
  color: var(--theme-surface) !important;
  text-shadow: none !important;
}

::-moz-selection {
  background: var(--theme-primary) !important;
  color: var(--theme-surface) !important;
  text-shadow: none !important;
}

/* Selección en el área de chat - estilo premium */
.chat-window ::selection {
  background: var(--gradient-primary, linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-light) 100%)) !important;
  color: var(--theme-surface) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.chat-window ::-moz-selection {
  background: var(--theme-primary) !important;
  color: var(--theme-surface) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* Selección en mensajes del bot - contraste óptimo */
.msg.bot .bubble ::selection {
  background: var(--theme-primary) !important;
  color: var(--theme-surface) !important;
}

.msg.bot .bubble ::-moz-selection {
  background: var(--theme-primary) !important;
  color: var(--theme-surface) !important;
}

/* Selección en mensajes del usuario - coherencia visual */
/* Los colores de selección ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
.msg.user .bubble ::selection {
  /* background: var(--theme-primary-dark) !important; */
  /* color: var(--theme-surface) !important; */
}

.msg.user .bubble ::-moz-selection {
  /* background: var(--theme-primary-dark) !important; */
  /* color: var(--theme-surface) !important; */
}

/* Selección en el área de escritura - experiencia consistente */
#user-input ::selection,
textarea ::selection,
input[type="text"] ::selection {
  background: var(--theme-primary-light) !important;
  color: var(--theme-surface) !important;
}

#user-input ::-moz-selection,
textarea ::-moz-selection,
input[type="text"] ::-moz-selection {
  background: var(--theme-primary-light) !important;
  color: var(--theme-surface) !important;
}

.chat-container {
  max-width: 800px; /* Ajustado para mejor coherencia en móviles */
  margin: 0 auto;
  background: #fff;
  border-radius: 15px;
  /* Los colores del borde y sombra ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
  /* box-shadow: 0 10px 30px rgba(0,0,0,0.1); */
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}



.chat-header {
  background: var(--gradient-primary, linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-light) 100%)) !important;
  color: var(--theme-surface) !important;
  padding: 20px;
  text-align: center;
  position: relative;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.5em;
  font-weight: 600;
}

.chat-header p {
  font-size: 0.9em;
  opacity: 0.9;
  margin-top: 5px;
}

.chat-window {
  height: 75vh !important; /* Altura optimizada para mejor equilibrio */
  min-height: 500px !important; /* Altura mínima equilibrada */
  max-height: 800px !important; /* Altura máxima equilibrada */
  overflow-y: auto !important;
  padding: 18px !important; /* Padding equilibrado */
  background: #f8f9fa !important; /* Fondo claro siempre */
  background-color: #f8f9fa !important; /* Fondo claro siempre - refuerzo */
  scroll-behavior: smooth !important; /* Scroll suave */
  scrollbar-width: thin !important; /* Scrollbar fino para Firefox */
  /* Los colores del scrollbar ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
  /* scrollbar-color: var(--theme-primary) #f1f1f1 !important; */
  color: #1a1a1a !important; /* Texto oscuro siempre */
}

.chat-window::-webkit-scrollbar {
  width: 8px;
}

.chat-window::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

/* Los colores del scrollbar ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
.chat-window::-webkit-scrollbar-thumb {
  /* background: var(--theme-primary) !important; */
  border-radius: 4px;
}

/* Scrollbar thumb hover - Compatible con navegadores WebKit */
.chat-window::-webkit-scrollbar-thumb:hover {
  /* background: var(--theme-primary-dark) !important; */
}

/* Indicador visual cuando el auto-scroll está desactivado - ELIMINADO */
/* Se mantiene la funcionalidad pero sin indicador visual para mejor visualización */

/* Mensajes */
.msg {
  margin-bottom: 20px !important;
  margin-left: 2px !important;
  margin-right: 2px !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important; /* Necesario para los pseudo-elementos */
  padding-left: 2px !important;
  padding-right: 2px !important;
}

.msg.user {
  align-items: flex-end;
}

.msg.bot {
  align-items: flex-start;
}

/* ========== SEPARADORES MODERNOS Y ELEGANTES PARA CHATBOT ========== */

/* Separadores visuales entre mensajes - ESTILO MODERNO Y ELEGANTE */
.msg::before {
  content: '' !important;
  position: absolute !important;
  left: -18px !important;
  top: 20px !important;
  width: 14px !important;
  height: 14px !important;
  /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
  /* background: linear-gradient(135deg, var(--color-primary, #2c5aa0), var(--color-primary-light, #4a7bc8)) !important; */
  border-radius: 50% !important;
  /* box-shadow: 0 3px 12px rgba(var(--primary-rgb, 44, 90, 160), 0.4) !important; */
  opacity: 1 !important;
  animation: pulseElegant 2.5s infinite !important;
  z-index: 1000 !important;
  display: block !important;
  border: 2px solid #fff !important;
}

.msg::after {
  content: '' !important;
  position: absolute !important;
  left: -11px !important;
  top: 34px !important;
  width: 4px !important;
  height: calc(100% - 14px) !important;
  /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
  /* background: linear-gradient(to bottom, var(--color-primary, #2c5aa0), rgba(var(--primary-rgb, 44, 90, 160), 0.3), transparent) !important; */
  opacity: 0.8 !important;
  z-index: 999 !important;
  display: block !important;
  border-radius: 2px !important;
}

/* Separador horizontal elegante entre mensajes */
.msg + .msg::before {
  content: '' !important;
  position: absolute !important;
  left: -18px !important;
  top: -12px !important;
  width: 36px !important;
  height: 3px !important;
  /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
  /* background: linear-gradient(90deg, var(--color-primary, #2c5aa0), rgba(var(--primary-rgb, 44, 90, 160), 0.5), transparent) !important; */
  opacity: 0.7 !important;
  z-index: 1001 !important;
  display: block !important;
  border-radius: 2px !important;
}

/* Estilos específicos para mensajes de usuario (lado derecho) */
/* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
.msg.user::before {
  left: auto !important;
  right: -18px !important;
  /* background: linear-gradient(135deg, var(--color-primary, #007bff), var(--color-primary-dark, #0056b3)) !important; */
  /* box-shadow: 0 3px 12px rgba(var(--primary-rgb, 0, 123, 255), 0.4) !important; */
  animation: pulseUserElegant 2.5s infinite !important;
}

.msg.user::after {
  left: auto !important;
  right: -11px !important;
  /* background: linear-gradient(to bottom, var(--color-primary, #007bff), rgba(var(--primary-rgb, 0, 123, 255), 0.3), transparent) !important; */
}

.msg.user + .msg::before {
  left: auto !important;
  right: -18px !important;
  /* background: linear-gradient(90deg, var(--color-primary, #007bff), rgba(var(--primary-rgb, 0, 123, 255), 0.5), transparent) !important; */
}

/* Estilos específicos para mensajes del bot (lado izquierdo) */
/* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
.msg.bot::before {
  /* background: linear-gradient(135deg, #2c5aa0, #4a7bc8) !important; */
  /* box-shadow: 0 3px 12px rgba(44, 90, 160, 0.4) !important; */
  animation: pulseBotElegant 2.5s infinite !important;
}

.msg.bot::after {
  /* background: linear-gradient(to bottom, var(--color-primary, #2c5aa0), rgba(var(--primary-rgb, 44, 90, 160), 0.3), transparent) !important; */
}

.msg.bot + .msg::before {
  /* background: linear-gradient(90deg, var(--color-primary, #2c5aa0), rgba(var(--primary-rgb, 44, 90, 160), 0.5), transparent) !important; */
}

/* Indicadores específicos para mensajes de usuario */
/* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
.msg.user::before {
  /* background: #1e3d73 !important; */
  left: auto !important;
  right: -15px !important;
}

.msg.user::after {
  left: auto !important;
  right: -12px !important;
  /* background: linear-gradient(to bottom, transparent, #722f37, transparent) !important; */
}

/* Indicadores específicos para mensajes del bot */
/* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
.msg.bot::before {
  /* background: var(--restaurant-primary) !important; */
  left: -8px !important;
}

.msg.bot::after {
  left: -6px !important;
  /* background: linear-gradient(to bottom, transparent, var(--theme-primary), transparent) !important; */
}

/* Separadores horizontales entre mensajes */
/* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
.msg + .msg::before {
  content: '' !important;
  position: absolute !important;
  left: 50% !important;
  top: -15px !important;
  width: 50px !important;
  height: 3px !important;
  /* background: linear-gradient(to right, transparent, var(--theme-primary), transparent) !important; */
  transform: translateX(-50%) !important;
  opacity: 0.6 !important;
  z-index: 1001 !important;
  display: block !important;
}

/* Estilos para el primer mensaje */
.msg:first-child::before {
  display: none !important;
}

.msg:first-child::after {
  display: none !important;
}

/* Animación de pulso para los indicadores */
@keyframes pulse {
  0% {
    opacity: 0.8;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.3);
  }
  100% {
    opacity: 0.8;
    transform: translateY(-50%) scale(1);
  }
}

.bubble {
  max-width: 95%; /* Aumentado para mejor aprovechamiento del espacio */
  padding: 12px 16px;
  border-radius: 18px;
  word-wrap: break-word;
  line-height: 1.4;
  white-space: pre-line;
  position: relative;
}

.message-content {
  white-space: pre-line;
  word-wrap: break-word;
  line-height: 1.5;
}

.msg.user .bubble {
  /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
  border-bottom-right-radius: 6px;
  /* NO definir background, color, border aquí - se maneja en theme-loader.php */
}

.msg.bot .bubble {
  /* Los colores de fondo, borde y texto ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
  border-bottom-left-radius: 6px;
  max-width: 98% !important; /* Máximo ancho para ocupar casi todo el contenedor */
  width: 100% !important; /* Forzar ancho completo */
  /* NO definir background, color, border aquí - se maneja en theme-loader.php */
}

/* Los colores de texto ahora los maneja theme-loader.php dinámicamente */
/* Se han eliminado TODOS los estilos que forzaban colores hardcodeados */

.bubble.typing {
  background: #f0f0f0;
  color: #1a1a1a !important;
}

/* Estilos para el selector de idioma en la parte superior del chat */
.language-selector {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100; /* Reducido para estar por debajo del menú hamburguesa */
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e9ecef;
    backdrop-filter: blur(10px);
}

.language-selector .goog-te-gadget {
    font-family: 'Roboto', sans-serif !important;
    font-size: 12px !important;
}

.language-selector .goog-te-gadget-simple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 25px !important;
    color: white !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: 0 3px 15px rgba(0,0,0,0.15) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: block !important;
    visibility: visible !important;
    min-width: 120px !important;
    text-align: center !important;
}

.language-selector .goog-te-gadget-simple:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
}

/* Ocultar elementos del banner de Google Translate */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important;
}

/* Asegurar que el chat tenga espacio para el selector */
.chat-container {
    position: relative;
    padding-top: 10px;
}

/* Responsive para el selector de idioma */
@media (max-width: 768px) {
    .language-selector {
        margin-bottom: 10px;
        padding: 8px;
        justify-content: center;
        background: rgba(255, 255, 255, 0.98);
    }
    
    .language-selector .goog-te-gadget-simple {
        font-size: 12px !important;
        padding: 8px 16px !important;
        display: block !important;
        visibility: visible !important;
        min-width: 100px !important;
    }
}

/* ========== INTERACCIONES VISUALES DEL LLM ========== */
/* Indicadores visuales entre mensajes - FORZADOS CON !important */
.msg::before {
  content: '' !important;
  position: absolute !important;
  left: -15px !important;
  top: 50% !important;
  width: 8px !important;
  height: 8px !important;
  background: var(--restaurant-primary) !important;
  border-radius: 50% !important;
  transform: translateY(-50%) !important;
  opacity: 0.8 !important;
  animation: pulse 2s infinite !important;
  z-index: 1000 !important;
  display: block !important;
}

.msg::after {
  content: '' !important;
  position: absolute !important;
  left: -12px !important;
  top: 50% !important;
  width: 3px !important;
  height: 25px !important;
  background: linear-gradient(to bottom, transparent, #2c5aa0, transparent) !important;
  transform: translateY(-50%) !important;
  opacity: 0.5 !important;
  z-index: 999 !important;
  display: block !important;
}

/* Indicadores específicos para mensajes de usuario */
/* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
.msg.user::before {
  /* background: #1e3d73 !important; */
  left: auto !important;
  right: -15px !important;
}

.msg.user::after {
  left: auto !important;
  right: -12px !important;
  /* background: linear-gradient(to bottom, transparent, #722f37, transparent) !important; */
}

/* Indicadores específicos para mensajes del bot */
/* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
.msg.bot::before {
  /* background: var(--restaurant-primary) !important; */
  left: -8px !important; /* Reducido para no interferir con el ancho */
}

.msg.bot::after {
  left: -6px !important; /* Reducido para no interferir con el ancho */
  /* background: linear-gradient(to bottom, transparent, #2c5aa0, transparent) !important; */
}

/* Separadores horizontales elegantes entre mensajes */
.msg + .msg::before {
  content: '' !important;
  position: absolute !important;
  left: -18px !important;
  top: -12px !important;
  width: 36px !important;
  height: 3px !important;
  /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
  /* background: linear-gradient(90deg, var(--color-primary, #2c5aa0), rgba(var(--primary-rgb, 44, 90, 160), 0.5), transparent) !important; */
  opacity: 0.7 !important;
  z-index: 1001 !important;
  display: block !important;
  border-radius: 2px !important;
}

/* Estilos para el primer mensaje */
.msg:first-child::before {
  display: block !important; /* Mostrar el indicador del primer mensaje */
}

.msg:first-child::after {
  display: block !important; /* Mostrar la línea del primer mensaje */
}

/* ========== ANIMACIONES ELEGANTES PARA SEPARADORES ========== */

/* Animación de pulso elegante para mensajes del bot */
@keyframes pulseBotElegant {
  0% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 3px 12px rgba(var(--accent-rgb), 0.4);
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
    box-shadow: 0 5px 20px rgba(var(--accent-rgb), 0.6);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 3px 12px rgba(var(--accent-rgb), 0.4);
  }
}

/* Animación de pulso elegante para mensajes de usuario */
@keyframes pulseUserElegant {
  0% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 3px 12px rgba(0, 123, 255, 0.4);
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
    box-shadow: 0 5px 20px rgba(0, 123, 255, 0.6);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 3px 12px rgba(0, 123, 255, 0.4);
  }
}

/* Animación de pulso elegante general */
@keyframes pulseElegant {
  0% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 3px 12px rgba(var(--accent-rgb), 0.4);
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
    box-shadow: 0 5px 20px rgba(var(--accent-rgb), 0.6);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 3px 12px rgba(var(--accent-rgb), 0.4);
  }
}

/* Separador de tiempo elegante */
.msg .timestamp {
  font-size: 0.75em;
  color: #666;
  margin-bottom: 8px;
  text-align: center;
  position: relative;
}

.msg .timestamp::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ddd, transparent);
  z-index: -1;
}

/* Separador de sección elegante */
.msg.section-divider {
  text-align: center;
  margin: 30px 0;
  padding: 15px 0;
}

.msg.section-divider::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2c5aa0, transparent);
  z-index: 1;
}

.msg.section-divider .bubble {
  background: linear-gradient(135deg, var(--theme-background), #e9ecef);
  border: 1px solid var(--theme-primary);
  color: var(--theme-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9em;
}

/* Separador de conversación elegante */
.conversation-separator {
  position: relative;
  margin: 25px 0;
  text-align: center;
}

.conversation-separator::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 1px;
  /* Los colores ahora los maneja theme-loader.php dinámicamente */
  background: linear-gradient(90deg, transparent, var(--color-primary, #2c5aa0), transparent);
  z-index: 1;
}

.conversation-separator .separator-text {
  background: var(--color-background, #f8f9fa);
  padding: 0 15px;
  /* Los colores ahora los maneja theme-loader.php dinámicamente */
  color: var(--color-primary, #2c5aa0);
  font-size: 0.8em;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Indicadores de sección y confianza */
.section-indicator {
  font-size: 0.75em;
  color: #666;
  margin-top: 5px;
  padding: 2px 8px;
  background: #e8f4fd;
  border-radius: 12px;
  display: inline-block;
  align-self: flex-start;
}

.confidence-indicator {
  font-size: 0.75em;
  color: #28a745;
  margin-top: 5px;
  padding: 2px 8px;
  background: #d4edda;
  border-radius: 12px;
  display: inline-block;
  align-self: flex-start;
}

/* Sugerencias de búsqueda */
.suggestions-container {
  padding: 15px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.suggestion-chip {
  display: inline-block;
  background: white;
  /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
  border: 1px solid var(--color-primary, #2c5aa0);
  color: var(--color-primary-dark, #1e3d73);
  padding: 6px 12px;
  margin: 3px;
  border-radius: 20px;
  font-size: 0.85em;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
  overflow: hidden;
  /* NO definir background, color, border aquí - se maneja en theme-loader.php */
}

.suggestion-chip:hover {
  /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
  transform: translateY(-1px);
  /* NO definir background, color, box-shadow aquí - se maneja en theme-loader.php */
}

/* Formulario de entrada - Adaptado al chat-window */
.chat-form {
  padding: 20px;
  border-top: 1px solid #e9ecef;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  /* Asegurar que coincida exactamente con chat-window */
  padding-left: 10px;
  padding-right: 10px;
}

/* Contenedor de botones - siempre en línea horizontal */
.btn-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  width: 100%;
  max-width: 800px; /* Aumentado de 600px a 800px para coincidir con el nuevo ancho */
  gap: 10px;
  justify-content: center;
  margin: 0 auto;
  padding: 0;
}

/* Asegurar que cada botón ocupe su espacio proporcional */
.btn-row > * {
  flex: 1;
  min-width: 0;
  max-width: none;
  margin: 0;
}

.input-group {
  position: relative;
  margin-bottom: 15px;
  width: 100%;
  max-width: 800px; /* Aumentado de 600px a 800px para coincidir con el nuevo ancho */
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 16px;
}

.user-input {
  width: 100%;
  max-width: 100%;
  padding: 12px 16px 12px 45px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  margin: 0;
  display: block;
  text-align: left;
  /* Asegurar que no haya desbordamiento */
  overflow: hidden;
}

.user-input:focus {
  /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
  /* border-color: #2c5aa0; */
  /* box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1); */
}

/* Estilo para cuando el input no tiene focus (evita que se abra el teclado automáticamente) */
.user-input:not(:focus) {
  border-color: #e0e0e0;
  background: #fff;
}

.user-input:disabled {
  background: #f8f9fa;
  color: #6c757d;
}

/* Eliminado - duplicado conflictivo */

.btn-primary, .btn-secondary {
  padding: 12px 20px;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #2c5aa0 0%, #4a7bc8 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 90, 160, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

/* Botones específicos del chat */
.send-btn, .stop-btn, .clear-btn, .view-carta-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: auto;
  flex: 1;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.send-btn {
  background: linear-gradient(135deg, #2c5aa0 0%, #4a7bc8 100%);
  color: white;
}

.send-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 90, 160, 0.4);
}

.send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.stop-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #d6336c 100%);
  color: #ffffff;
  display: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 24px rgba(214, 51, 108, 0.25);
}

.stop-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(214, 51, 108, 0.38);
}

.clear-btn {
  background: linear-gradient(135deg, rgba(232, 239, 252, 0.92) 0%, rgba(173, 195, 245, 0.96) 100%);
  color: #1e3d73;
  border: 1px solid rgba(44, 90, 160, 0.18);
  box-shadow: 0 10px 20px rgba(44, 90, 160, 0.12);
}

.clear-btn:hover {
  background: linear-gradient(135deg, rgba(209, 226, 255, 1) 0%, rgba(140, 174, 240, 1) 100%);
  color: #122753;
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(44, 90, 160, 0.22);
}

.view-carta-btn {
  background: linear-gradient(135deg, #1e3d73 0%, #2c5aa0 55%, #6b9ae0 100%);
  color: #ffffff;
  border: 1px solid rgba(44, 90, 160, 0.35);
  box-shadow: 0 14px 34px rgba(44, 90, 160, 0.45);
  text-shadow: 0 1px 3px rgba(10, 25, 56, 0.35);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.view-carta-btn::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -20%;
  width: 60%;
  height: 220%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.45) 40%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(25deg) translateX(-140%);
  animation: cartaShine 4s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}

.view-carta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.view-carta-btn:hover {
  background: linear-gradient(135deg, #2c5aa0 0%, #6b9ae0 60%, #d4af37 100%);
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(44, 90, 160, 0.48);
}

.view-carta-btn:hover::before,
.view-carta-btn:focus-visible::before {
  opacity: 1;
}

.view-carta-btn:focus-visible {
  outline: 3px solid rgba(44, 90, 160, 0.35);
  outline-offset: 2px;
}

.view-carta-btn .icon-utensils {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: utensilSwing 2.8s ease-in-out infinite;
  position: relative;
}

.view-carta-btn .icon-utensils::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  top: -4px;
  right: -6px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  animation: sparkle 2.4s ease-in-out infinite;
}

/* Controles adicionales */
.chat-controls {
  padding: 15px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.9em;
}

/* Estados de carga */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
  /* border-top: 3px solid #2c5aa0; */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ========== BOTONES RESPONSIVOS - LÍNEA HORIZONTAL ========== */

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
  .btn-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .btn-primary, .btn-secondary {
    padding: 10px 16px;
    font-size: 13px;
    min-width: auto;
    flex: 1;
    max-width: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .btn-primary i, .btn-secondary i {
    font-size: 12px;
  }
  
  #send-btn, #stop-btn, #clear-btn, #view-carta-btn {
    padding: 10px 12px;
    font-size: 12px;
    min-width: 0;
    flex: 1;
    max-width: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  #send-btn i, #stop-btn i, #clear-btn i, #view-carta-btn i {
    font-size: 11px;
    margin-right: 2px;
  }
  
  /* Ocultar texto en botones si es necesario para móviles muy pequeños */
  #view-carta-btn span, #stop-btn span, #clear-btn span {
    display: inline;
  }
}

/* Móviles - 480px y menos - FORZAR HORIZONTAL */
@media (max-width: 480px) {
  .chat-container {
    max-width: 98%; /* Ajustar ancho en móviles */
    margin: 0.5rem auto;
  }
  
  .chat-window {
    height: 400px; /* Altura optimizada para móviles */
    padding: 8px; /* Reducido al mínimo */
    background: #f8f9fa !important;
  }
  
  .bubble {
    max-width: 98%; /* Ancho máximo para burbujas en móviles */
  }
  
  .msg.user .bubble {
    /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
    /* background: linear-gradient(135deg, var(--restaurant-primary) 0%, var(--restaurant-primary-dark) 100%) !important; */
    /* color: white !important; */
    border-bottom-right-radius: 6px !important;
  }
  
  .msg.bot .bubble {
    max-width: 99% !important; /* Casi todo el ancho */
    width: 100% !important;
    background: white !important;
    color: #1a1a1a !important;
    border: 1px solid #e0e0e0 !important;
    border-bottom-left-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  }
  
  .btn-row {
    gap: 4px !important;
    margin-top: 10px;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-content: space-between !important;
    margin: 10px auto 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  
  .btn-row > * {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  
  .btn-primary, .btn-secondary {
    padding: 6px 8px;
    font-size: 11px;
    min-width: 0;
    flex: 1;
    max-width: none;
    border-radius: 18px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .btn-primary i, .btn-secondary i {
    font-size: 10px;
  }
  
  #send-btn, #stop-btn, #clear-btn, #view-carta-btn {
    padding: 8px 6px !important;
    font-size: 11px !important;
    min-width: 0 !important;
    flex: 1 !important;
    max-width: none !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    margin: 0 !important;
  }
  
  #send-btn i, #stop-btn i, #clear-btn i, #view-carta-btn i {
    font-size: 10px !important;
    flex-shrink: 0;
  }
  
  /* Asegurar que el texto de los botones sea visible pero truncado si es necesario */
  #view-carta-btn, #stop-btn, #clear-btn {
    font-size: 10px !important;
  }
}

/* ========== ESTILOS ESPECÍFICOS PARA BOTÓN DETENER ========== */

#stop-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #d6336c 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.25s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  box-shadow: 0 10px 24px rgba(214, 51, 108, 0.25);
}

#stop-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(214, 51, 108, 0.38);
}

#stop-btn.active {
  background: linear-gradient(135deg, #ff8787 0%, #d6336c 100%);
  box-shadow: 0 18px 36px rgba(214, 51, 108, 0.4);
  animation: pulse 1.5s infinite;
}

/* ========== ESTILOS PARA BOTÓN DE TOGGLE DE AUTO-SCROLL ========== */

/* Estilos del botón auto/manual eliminados - ya no se necesita */

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(214, 51, 108, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(214, 51, 108, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(214, 51, 108, 0);
  }
}

@keyframes cartaShine {
  0%, 55% {
    transform: rotate(25deg) translateX(-140%);
  }
  75% {
    transform: rotate(25deg) translateX(160%);
  }
  100% {
    transform: rotate(25deg) translateX(160%);
  }
}

@keyframes utensilSwing {
  0%, 100% {
    transform: rotate(-4deg) scale(1);
  }
  50% {
    transform: rotate(6deg) scale(1.06);
  }
}

@keyframes sparkle {
  0%, 100% {
    transform: scale(0.3);
    opacity: 0;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
  60% {
    transform: scale(0.3);
    opacity: 0;
  }
}

/* ========== FORZAR COMPORTAMIENTO HORIZONTAL EN TODAS LAS PANTALLAS ========== */

/* Asegurar que los botones siempre estén en línea horizontal */
@media (max-width: 480px) {
  .btn-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    width: 100%;
    gap: 4px;
    justify-content: space-between;
    margin: 0;
    padding: 0;
  }
  
  .btn-row > * {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin: 0;
  }
  
  /* Forzar que los botones específicos se comporten correctamente */
  #send-btn, #stop-btn, #clear-btn, #view-carta-btn {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin: 0;
  }
}

@media (max-width: 380px) {
  .btn-row {
    gap: 2px;
  }
}

/* Smartphones pequeños - 380px y menos */
@media (max-width: 380px) {
  .btn-row {
    gap: 3px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-content: space-between !important;
    margin: 8px auto 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  
  .btn-row > * {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  
  .btn-primary, .btn-secondary {
    padding: 5px 6px;
    font-size: 10px;
    min-width: 0;
    flex: 1;
    max-width: none;
    border-radius: 16px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .btn-primary i, .btn-secondary i {
    font-size: 9px;
  }
  
  #send-btn, #stop-btn, #clear-btn, #view-carta-btn {
    padding: 6px 4px !important;
    font-size: 9px !important;
    min-width: 0 !important;
    flex: 1 !important;
    max-width: none !important;
    border-radius: 18px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    margin: 0 !important;
  }
  
  #send-btn i, #stop-btn i, #clear-btn i, #view-carta-btn i {
    font-size: 9px !important;
    flex-shrink: 0;
    margin-right: 1px;
  }
  
  /* Texto más pequeño pero visible en móviles pequeños */
  #view-carta-btn, #stop-btn, #clear-btn {
    font-size: 9px !important;
    padding: 6px 3px !important;
  }
}

/* ========== FORZAR COMPORTAMIENTO HORIZONTAL EN TODAS LAS PANTALLAS ========== */

/* Asegurar que los botones siempre estén en línea horizontal */
@media (max-width: 480px) {
  .btn-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    width: 100%;
    gap: 4px;
    justify-content: space-between;
    margin: 0;
    padding: 0;
  }
  
  .btn-row > * {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin: 0;
  }
  
  /* Forzar que los botones específicos se comporten correctamente */
  #send-btn, #stop-btn, #clear-btn, #view-carta-btn {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin: 0;
  }
}

/* Añadir estilos adicionales para móviles muy pequeños (320px y menos) */
@media (max-width: 320px) {
  .btn-row {
    gap: 2px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-content: space-between !important;
    padding: 0 !important;
    margin: 8px auto 0 !important;
  }
  
  #send-btn, #stop-btn, #clear-btn, #view-carta-btn {
    padding: 5px 2px !important;
    font-size: 8px !important;
    gap: 2px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  #send-btn i, #stop-btn i, #clear-btn i, #view-carta-btn i {
    font-size: 8px !important;
    margin-right: 1px;
    flex-shrink: 0;
  }
  
  /* Mostrar solo iconos o texto muy corto en móviles muy pequeños */
  #view-carta-btn, #stop-btn, #clear-btn {
    font-size: 8px !important;
  }
}

/* ========== FORZAR COMPORTAMIENTO HORIZONTAL EN TODAS LAS PANTALLAS ========== */

/* Estilos base para botones en línea horizontal - APLICAR EN TODAS LAS PANTALLAS */
.btn-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  gap: 10px;
  justify-content: center !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Asegurar que cada botón ocupe su espacio proporcional */
.btn-row > * {
  flex: 1;
  min-width: 0;
  max-width: none;
  margin: 0;
}

/* Botones específicos del chat - siempre en línea horizontal */
#send-btn, #stop-btn, #clear-btn, #view-carta-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1 !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* ========== ESTILOS ADICIONALES PARA GARANTIZAR COMPORTAMIENTO ========== */

/* Forzar que los botones específicos siempre se comporten correctamente */
#send-btn, #stop-btn, #clear-btn, #view-carta-btn {
  box-sizing: border-box;
  width: auto;
  height: auto;
}

/* Asegurar que los botones no tengan restricciones de tamaño */
@media (max-width: 480px) {
  #send-btn, #stop-btn, #clear-btn, #view-carta-btn {
    width: auto;
    height: auto;
    min-height: auto;
    max-height: none;
    flex: 1;
    min-width: 0;
    max-width: none;
  }
}

/* ========== FORZAR COMPORTAMIENTO HORIZONTAL EN TODAS LAS PANTALLAS ========== */

/* Asegurar que los botones siempre estén en línea horizontal */
@media (max-width: 480px) {
  .btn-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    width: 100%;
    gap: 4px;
    justify-content: space-between;
    margin: 0;
    padding: 0;
  }
  
  .btn-row > * {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin: 0;
  }
  
  /* Forzar que los botones específicos se comporten correctamente */
  #send-btn, #stop-btn, #clear-btn, #view-carta-btn {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin: 0;
  }
}

@media (max-width: 380px) {
  .btn-row {
    gap: 2px;
  }
}

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

/* Mensajes especiales */
.welcome-message {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #e8f4fd 0%, #d1ecf1 100%);
  border-radius: 10px;
  margin-bottom: 20px;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
}

.success-message {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
}

/* Pantallas medianas - ancho optimizado */
@media (min-width: 769px) and (max-width: 1199px) {
  .bubble {
    max-width: 95%; /* Ancho aumentado para mejor aprovechamiento */
  }
  
  .msg.user .bubble {
    /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
    /* background: linear-gradient(135deg, var(--restaurant-primary) 0%, var(--restaurant-primary-dark) 100%) !important; */
    /* color: white !important; */
    border-bottom-right-radius: 6px !important;
  }
  
  .msg.bot .bubble {
    max-width: 97% !important; /* Máximo ancho en pantallas medianas */
    width: 100% !important;
    background: white !important;
    color: #1a1a1a !important;
    border: 1px solid #e0e0e0 !important;
    border-bottom-left-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  }
}

/* Responsive - Consolidado y coherente */
@media (max-width: 768px) {
  .chat-container {
    margin: 10px;
    border-radius: 10px;
    max-width: 95%;
  }
  
  .chat-window {
    height: 450px; /* Altura coherente para tablets */
    padding: 10px; /* Reducido para dar más espacio */
    background: #f8f9fa !important;
  }
  
  .bubble {
    max-width: 95%; /* Ancho aumentado para mejor aprovechamiento */
    font-size: 14px;
  }
  
  .msg.user .bubble {
    /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
    /* background: linear-gradient(135deg, var(--restaurant-primary) 0%, var(--restaurant-primary-dark) 100%) !important; */
    /* color: white !important; */
    border-bottom-right-radius: 6px !important;
  }
  
  .msg.bot .bubble {
    max-width: 98% !important; /* Máximo ancho en tablets */
    width: 100% !important;
    background: white !important;
    color: #1a1a1a !important;
    border: 1px solid #e0e0e0 !important;
    border-bottom-left-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  }
  
  .chat-form {
    padding: 15px;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: 0;
    /* Coincidir con chat-window padding */
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .user-input {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px 12px 45px;
    font-size: 14px;
    margin: 0 0 10px 0;
    overflow: hidden;
  }
  
  .suggestions-container {
    padding: 10px 15px;
  }
  
  .suggestion-chip {
    font-size: 0.8em;
    padding: 5px 10px;
  }
}

/* Móviles - ajustes específicos */
@media (max-width: 480px) {
  .chat-container {
    max-width: 98%;
    margin: 0.5rem auto;
  }
  
  .chat-window {
    height: 400px; /* Altura optimizada para móviles */
    padding: 8px; /* Reducido al mínimo para móviles */
    background: #f8f9fa !important;
  }
  
  .bubble {
    max-width: 98%; /* Ancho máximo para móviles */
    font-size: 13px;
  }
  
  .msg.user .bubble {
    /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
    /* background: linear-gradient(135deg, var(--restaurant-primary) 0%, var(--restaurant-primary-dark) 100%) !important; */
    /* color: white !important; */
    border-bottom-right-radius: 6px !important;
  }
  
  .msg.bot .bubble {
    max-width: 99% !important; /* Casi todo el ancho en móviles */
    width: 100% !important;
    background: white !important;
    color: #1a1a1a !important;
    border: 1px solid #e0e0e0 !important;
    border-bottom-left-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  }
  
  .chat-form {
    padding: 10px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    /* Coincidir con chat-window padding */
    padding-left: 8px;
    padding-right: 8px;
  }
  
  .user-input {
    width: 100%;
    max-width: 100%;
    padding: 10px 14px 10px 40px;
    font-size: 13px;
    margin: 0 0 8px 0;
    overflow: hidden;
  }
}

/* Móviles pequeños */
@media (max-width: 380px) {
  .chat-window {
    height: 350px; /* Altura mínima funcional */
    padding: 6px; /* Mínimo padding para máximo espacio */
    background: #f8f9fa !important;
  }
  
  .msg.user .bubble {
    /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
    /* background: linear-gradient(135deg, var(--restaurant-primary) 0%, var(--restaurant-primary-dark) 100%) !important; */
    /* color: white !important; */
    border-bottom-right-radius: 6px !important;
  }
  
  .msg.bot .bubble {
    max-width: 99.5% !important; /* Máximo ancho posible */
    width: 100% !important;
    background: white !important;
    color: #1a1a1a !important;
    border: 1px solid #e0e0e0 !important;
    border-bottom-left-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  }
  
  .chat-form {
    padding: 8px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    /* Coincidir con chat-window padding */
    padding-left: 6px;
    padding-right: 6px;
  }
  
  .user-input {
    width: 100%;
    max-width: 100%;
    padding: 8px 12px 8px 35px;
    font-size: 12px;
    margin: 0 0 6px 0;
    overflow: hidden;
  }
}

/* Temas de colores por sección - ADAPTADOS AL TEMA SELECCIONADO */
/* Usa variaciones del color primary del tema para mantener coherencia visual */
.msg[data-section="aperitivos"] .section-indicator {
  background: rgba(var(--primary-rgb, 44, 90, 160), 0.15) !important;
  color: var(--color-primary-dark, #1e3d73) !important;
  border: 1px solid rgba(var(--primary-rgb, 44, 90, 160), 0.25) !important;
}

.msg[data-section="carnes"] .section-indicator {
  background: rgba(var(--primary-rgb, 44, 90, 160), 0.2) !important;
  color: var(--color-primary-dark, #1e3d73) !important;
  border: 1px solid rgba(var(--primary-rgb, 44, 90, 160), 0.3) !important;
}

.msg[data-section="pescados"] .section-indicator {
  background: rgba(var(--primary-light-rgb, 74, 123, 200), 0.15) !important;
  color: var(--color-primary, #2c5aa0) !important;
  border: 1px solid rgba(var(--primary-light-rgb, 74, 123, 200), 0.25) !important;
}

.msg[data-section="postres"] .section-indicator {
  background: rgba(var(--primary-rgb, 44, 90, 160), 0.1) !important;
  color: var(--color-primary-dark, #1e3d73) !important;
  border: 1px solid rgba(var(--primary-rgb, 44, 90, 160), 0.2) !important;
}

.msg[data-section="bebidas"] .section-indicator {
  background: rgba(var(--primary-light-rgb, 74, 123, 200), 0.2) !important;
  color: var(--color-primary, #2c5aa0) !important;
  border: 1px solid rgba(var(--primary-light-rgb, 74, 123, 200), 0.3) !important;
}

.msg[data-section="menu_dia"] .section-indicator {
  background: rgba(var(--primary-rgb, 44, 90, 160), 0.18) !important;
  color: var(--color-primary-dark, #1e3d73) !important;
  border: 1px solid rgba(var(--primary-rgb, 44, 90, 160), 0.28) !important;
}

/* Animaciones - ELIMINADAS PARA EVITAR CONFLICTOS CON REGLAS PRINCIPALES */

/* Animación de burbuja eliminada para evitar conflictos */

/* Mejoras de accesibilidad */
.suggestion-chip:focus {
  /* Los colores ahora los maneja theme-loader.php dinámicamente */
  outline: 2px solid var(--color-primary, #2c5aa0);
  outline-offset: 2px;
}

.user-input:focus {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
}



/* Indicadores de estado */
.status-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #28a745;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

/* Estilos adicionales para priorizar la vista del chat */
.chat-priority {
  order: -1; /* Hace que el chat aparezca primero */
}

.hero-section {
  order: 1; /* Hace que el hero aparezca después */
}

.quick-help-section {
  order: 2; /* Hace que la ayuda rápida aparezca al final */
}

/* Asegurar que el chat sea lo primero que se vea */
.main-chat-container {
  margin-bottom: 2rem;
}

/* Mejorar la visibilidad del chat en dispositivos móviles */
@media (max-width: 768px) {
  .chat-container {
    margin: 1rem 0;
    border-radius: 10px;
    max-width: 95%; /* Ajustar ancho en tablets */
  }
  
  .chat-window {
    height: 450px; /* Altura fija coherente para tablets */
    padding: 10px; /* Reducido para dar más espacio */
    background: #f8f9fa !important;
  }
  
  .msg.user .bubble {
    /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
    /* background: linear-gradient(135deg, var(--restaurant-primary) 0%, var(--restaurant-primary-dark) 100%) !important; */
    /* color: white !important; */
    border-bottom-right-radius: 6px !important;
  }
  
  .msg.bot .bubble {
    max-width: 98% !important; /* Máximo ancho en tablets */
    width: 100% !important;
    background: white !important;
    color: #1a1a1a !important;
    border: 1px solid #e0e0e0 !important;
    border-bottom-left-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  }
}

/* Asegurar que el chat tenga prioridad visual */
.chat-container {
  position: relative;
  z-index: 10;
}

/* Mejorar la transición de entrada del chat */
.chat-container {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mejorar la visibilidad del estado del chat */
.chat-window.manual-scroll::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: #ffc107;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Mejorar la visibilidad del chat en diferentes tamaños de pantalla */
@media (min-width: 1200px) {
  .chat-container {
    max-width: 1000px; /* Ajustado para mejor coherencia */
  }
  
  .chat-window {
    height: 600px; /* Altura ajustada para pantallas grandes */
    padding: 12px; /* Padding optimizado para pantallas grandes */
    background: #f8f9fa !important;
  }
  
  .msg.bot .bubble {
    max-width: 97% !important; /* Máximo ancho en pantallas grandes */
    width: 100% !important;
  }
  
  .chat-form {
    padding: 25px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    /* Coincidir con chat-window padding */
    padding-left: 12px;
    padding-right: 12px;
  }
  
  .user-input {
    width: 100%;
    max-width: 100%;
    padding: 14px 18px 14px 50px;
    font-size: 15px;
    margin: 0 0 15px 0;
    overflow: hidden;
  }
}

/* Asegurar que el chat sea prominente en el layout */
.main-chat-container {
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,249,250,0.95) 100%);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}

/* Mejorar la visibilidad del header del chat */
.chat-header {
  background: linear-gradient(135deg, #2c5aa0 0%, #4a7bc8 100%);
  color: white;
  padding: 25px 20px;
  text-align: center;
  position: relative;
  border-bottom: 3px solid #8b6914;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Mejorar la visibilidad de la ventana del chat */
.chat-window {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 2px solid #e9ecef;
  border-radius: 0 0 15px 15px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

/* Mejorar la visibilidad del formulario */
.chat-form {
  background: transparent;
  border-top: 2px solid var(--restaurant-primary);
  box-shadow: 0 -4px 15px rgba(var(--accent-rgb), 0.1);
}

/* Mejorar la visibilidad de las sugerencias */
.suggestions-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 1px solid var(--restaurant-primary);
  box-shadow: 0 -2px 10px rgba(var(--accent-rgb), 0.1);
}

/* Asegurar que el chat sea lo primero que se vea al cargar */
.chat-container {
  scroll-margin-top: 20px;
}

/* Forzar modo claro siempre - Desactivado modo oscuro automático */
@media (prefers-color-scheme: dark) {
  .chat-container {
    background: #fff !important;
    color: #1a1a1a !important;
  }
  
  .chat-window {
    background: #f8f9fa !important;
    border-color: #e9ecef !important;
  }
  
  .chat-form {
    background: transparent !important;
  }
  
  .suggestions-container {
    background: #fff !important;
  }
}

/* ========== OCULTAR ELEMENTOS MOLESTOS DE GOOGLE TRANSLATE ========== */

/* Ocultar banner superior de Google Translate */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
body > .skiptranslate {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Ocultar ventanas de valoración */
.goog-te-balloon-frame,
.goog-te-balloon-frame.skiptranslate {
    display: none !important;
    visibility: hidden !important;
}

/* Ocultar elementos de feedback */
.goog-te-ftab,
.goog-te-ftab-link,
.goog-te-ftab-link-margin {
    display: none !important;
    visibility: hidden !important;
}

/* Ocultar elementos adicionales de Google Translate */
.goog-te-gadget-icon,
.goog-te-gadget-simple .goog-te-menu-value span:first-child,
.goog-te-gadget-simple .goog-te-menu-value span:last-child {
    display: none !important;
}

/* Asegurar que el body no tenga padding superior */
body {
    top: 0 !important;
    padding-top: 0 !important;
}

/* Mantener solo el selector limpio */
.goog-te-gadget-simple {
    background: transparent !important;
    border: none !important;
    font-size: 14px !important;
}

.goog-te-gadget-simple .goog-te-menu-value {
    color: #333 !important;
    font-family: inherit !important;
}

/* Ocultar elementos de traducción automática */
.goog-te-combo {
    display: none !important;
}

/* Ocultar indicadores de traducción */
.goog-te-gadget-simple .goog-te-menu-value:before,
.goog-te-gadget-simple .goog-te-menu-value:after {
    display: none !important;
}

/* ========== FIN OCULTAR ELEMENTOS MOLESTOS ========== */

/* ========== PREVENIR DESBORDAMIENTOS HORIZONTALES ========== */

/* Asegurar que no haya desbordamiento horizontal en ningún elemento */
.chat-container,
.chat-window,
.chat-form,
.user-input,
.btn-row,
.suggestions-container {
  overflow-x: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

/* Asegurar que el body no tenga scroll horizontal */
body {
  overflow-x: hidden;
}

/* ========== FIN PREVENIR DESBORDAMIENTOS ========== */

/* ========== ASEGURAR VISIBILIDAD DEL TRADUCTOR ========== */

/* Forzar visibilidad del traductor en el chat */
.language-selector #google_translate_element {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.language-selector .goog-te-gadget {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Asegurar que el traductor esté centrado en todos los dispositivos */
@media (max-width: 480px) {
    .language-selector {
        justify-content: center !important;
        padding: 6px !important;
        background: rgba(255, 255, 255, 0.99) !important;
    }
    
    .language-selector .goog-te-gadget-simple {
        font-size: 11px !important;
        padding: 6px 12px !important;
        min-width: 90px !important;
    }
}

@media (max-width: 380px) {
    .language-selector {
        justify-content: center !important;
        padding: 5px !important;
        background: rgba(255, 255, 255, 1) !important;
    }
    
    .language-selector .goog-te-gadget-simple {
        font-size: 10px !important;
        padding: 5px 10px !important;
        min-width: 80px !important;
    }
}

@media (min-width: 1200px) {
    .language-selector {
        justify-content: center !important;
        padding: 12px !important;
        background: rgba(255, 255, 255, 0.9) !important;
    }
    
    .language-selector .goog-te-gadget-simple {
        font-size: 15px !important;
        padding: 12px 24px !important;
        min-width: 140px !important;
    }
}

/* ========== RESPONSIVE CHAT-WINDOW OPTIMIZADO ========== */

/* Móviles pequeños - Ajuste conservador */
@media (max-width: 480px) {
    .chat-window {
        height: 60vh !important; /* Altura conservadora */
        min-height: 380px !important;
        max-height: 550px !important;
        padding: 10px !important;
        background: #f8f9fa !important;
    }
}

/* Móviles medianos - Ajuste conservador */
@media (min-width: 481px) and (max-width: 768px) {
    .chat-window {
        height: 65vh !important;
        min-height: 420px !important;
        max-height: 600px !important;
        padding: 12px !important;
        background: #f8f9fa !important;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .chat-window {
        height: 75vh !important; /* Altura equilibrada para tablets */
        min-height: 500px !important; /* Altura mínima equilibrada */
        max-height: 750px !important; /* Altura máxima equilibrada */
        padding: 18px !important; /* Padding equilibrado */
        background: #f8f9fa !important;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .chat-window {
        height: 80vh !important; /* Altura equilibrada para desktop */
        min-height: 600px !important; /* Altura mínima equilibrada */
        max-height: 900px !important; /* Altura máxima equilibrada */
        padding: 20px !important; /* Padding equilibrado */
        background: #f8f9fa !important;
    }
}

/* ========== COMPATIBILIDAD NAVEGADORES MÓVILES ========== */

/* Safari iOS */
@supports (-webkit-touch-callout: none) {
    .chat-window {
        height: 70vh !important;
        min-height: 400px !important;
        max-height: 650px !important;
        background: #f8f9fa !important;
    }
}

/* Chrome Android */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .chat-window {
        height: 70vh !important;
        min-height: 400px !important;
        max-height: 650px !important;
        background: #f8f9fa !important;
    }
}

/* Firefox Mobile */
@-moz-document url-prefix() {
    .chat-window {
        height: 70vh !important;
        min-height: 400px !important;
        max-height: 650px !important;
        background: #f8f9fa !important;
    }
}

/* Edge Mobile */
@supports (-ms-ime-align: auto) {
    .chat-window {
        height: 70vh !important;
        min-height: 400px !important;
        max-height: 650px !important;
        background: #f8f9fa !important;
    }
}

/* Opera Mobile */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm) {
    .chat-window {
        height: 70vh !important;
        min-height: 400px !important;
        max-height: 650px !important;
        background: #f8f9fa !important;
    }
}

/* ========== AJUSTES MÓVILES - ORIENTACIÓN HORIZONTAL ========== */
@media (max-width: 768px) and (orientation: landscape) {
    .chat-window {
        height: 50vh !important;
        min-height: 300px !important;
        max-height: 400px !important;
        background: #f8f9fa !important;
    }
    
    /* Mejorar scroll en móviles horizontales */
    .chat-container {
        scroll-margin-top: 10px;
        scroll-behavior: smooth;
    }
    
    /* Asegurar que el chat sea visible en móviles horizontales */
    .chat-container:target {
        scroll-margin-top: 20px;
    }
}

/* ========== MEJORAS DE SCROLL PARA TODOS LOS DISPOSITIVOS ========== */

/* Asegurar scroll suave en todos los dispositivos */
.chat-container {
    scroll-margin-top: 20px;
    scroll-behavior: smooth;
}

.chat-window {
    scroll-behavior: smooth !important;
    scroll-padding-bottom: 20px;
}

/* Mejorar la visibilidad del scroll en móviles */
@media (max-width: 768px) {
    .chat-window {
        scroll-behavior: smooth !important;
        scroll-padding-bottom: 30px;
        -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    }
    
    .chat-container {
        scroll-margin-top: 15px;
    }
}

/* Mejorar la visibilidad del scroll en tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .chat-window {
        scroll-behavior: smooth !important;
        scroll-padding-bottom: 25px;
    }
    
    .chat-container {
        scroll-margin-top: 25px;
    }
}

/* Mejorar la visibilidad del scroll en desktop */
@media (min-width: 1025px) {
    .chat-window {
        scroll-behavior: smooth !important;
        scroll-padding-bottom: 20px;
    }
    
    .chat-container {
        scroll-margin-top: 30px;
    }
}

/* ========== SELECTOR DE IDIOMAS PERSONALIZADO ========== */
.language-selector {
    text-align: center !important;
    margin-bottom: 15px !important;
    padding: 10px !important;
    position: relative !important;
    z-index: 100 !important; /* Reducido para estar por debajo del menú hamburguesa */
}

#google_translate_element {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: auto !important;
    overflow: visible !important;
    position: static !important;
    z-index: 100 !important; /* Reducido para estar por debajo del menú hamburguesa */
    text-align: center !important;
}

/* Estilos para el selector personalizado */
.custom-language-selector {
    position: relative;
    display: inline-block;
    text-align: center;
    margin: 0 auto;
    z-index: 100; /* Reducido para estar por debajo del menú hamburguesa */
}

.language-main-button {
    background: var(--restaurant-primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    min-width: 140px !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}

.language-main-button:hover {
    background: #1e3d73 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

.language-flag {
    font-size: 16px;
}

.language-name {
    flex: 1;
    text-align: center;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.language-main-button:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 100; /* Reducido para estar por debajo del menú hamburguesa */
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    margin-top: 5px;
}

.language-option {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background-color: #f8f9fa;
}

.option-flag {
    font-size: 16px;
}

.option-name {
    flex: 1;
    color: #333;
    font-weight: 500;
}

.checkmark {
    color: #2c5aa0;
    font-weight: bold;
    margin-left: auto;
}

/* Responsive para móviles */
@media (max-width: 480px) {
    .language-main-button {
        min-width: 120px !important;
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
    
    .language-dropdown-menu {
        min-width: 180px;
        max-height: 250px;
    }
    
    .language-option {
        padding: 10px 12px;
        gap: 8px;
    }
}

/* Ocultar elementos de Google Translate */
.goog-te-banner-frame {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

.goog-te-balloon-frame {
    display: none !important;
    visibility: hidden !important;
}

.goog-te-ftab {
    display: none !important;
    visibility: hidden !important;
}

body {
    top: 0 !important;
    padding-top: 0 !important;
}

/* ========== FIN TRADUCTOR SIMPLE FORZADO ========== */

/* ========== HERO SECTION PARA CHAT ========== */
.chat-hero {
    background: rgb(237 242 255 / 95%) !important;
    border: 2px solid rgba(44, 90, 160, 0.32) !important;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 0 auto !important;
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 15px !important;
    box-sizing: border-box !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.chat-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(1200px 600px at 10% -20%, rgba(26, 31, 40, 0.3) 0%, transparent 60%),
        radial-gradient(1000px 500px at 110% 120%, rgba(20, 25, 34, 0.3) 0%, transparent 55%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.chat-hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--gold-primary);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.chat-hero p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.6;
    opacity: 0.9;
}


.chat-hero .ornament {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
    margin: 40px auto 0;
    border-radius: 2px;
    position: relative;
}

.chat-hero .ornament::before,
.chat-hero .ornament::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    background: var(--gold-primary);
    border-radius: 50%;
    transform: translateY(-50%);
}

.chat-hero .ornament::before {
    left: -20px;
}

.chat-hero .ornament::after {
    right: -20px;
}

/* Mismo ancho que chat-container en pantallas grandes */
@media (min-width: 1200px) {
    .hero-content {
        max-width: 1000px !important;
    }
}

/* Mismo ancho que chat-container en tablets */
@media (max-width: 768px) {
    .chat-hero {
        max-width: 95% !important;
        margin: 10px auto !important;
        border-radius: 10px !important;
        padding: 40px 15px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .hero-content {
        max-width: 100% !important;
    }
}

/* Mismo ancho que chat-container en móviles */
@media (max-width: 480px) {
    .chat-hero {
        max-width: 98% !important;
        margin: 0.5rem auto !important;
        padding: 30px 10px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .hero-content {
        max-width: 100% !important;
    }
}

/* ========== FIN HERO SECTION PARA CHAT ========== */

/* ========== ESTILOS ANTIFLOOD ========== */
.flood-warning {
  background: linear-gradient(135deg, #A8C6FF, #ee5a52) !important;
  border-left: 4px solid #ff4757 !important;
  margin: 10px 0 !important;
  animation: floodWarningPulse 0.5s ease-in-out;
}

.flood-warning .message-content {
  color: white !important;
  font-weight: 600 !important;
  text-align: center !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3) !important;
}

.flood-warning .message-content::before {
  content: "🛡️ ";
  margin-right: 8px;
}

@keyframes floodWarningPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.02);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Estilos para móviles */
@media (max-width: 768px) {
  .flood-warning {
    margin: 8px 5px !important;
  }
  
  .flood-warning .message-content {
    padding: 10px 12px !important;
    font-size: 14px !important;
  }
}
/* ========== FIN ESTILOS ANTIFLOOD ========== */

/* ========================================
   BANNER PUBLICITARIO ESTRELLA GALICIA
   Diseño minimalista y elegante
   ======================================== */
.estrella-banner-container {
    width: 100%;
    max-width: 100%;
    margin: 15px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(255, 215, 0, 0.15);
    position: relative;
    background: linear-gradient(135deg, 
        #0a0a0a 0%, 
        #1a1a1a 25%,
        var(--restaurant-primary-dark) 50%,
        #1a1a1a 75%,
        #0a0a0a 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
}

.estrella-banner-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 130px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.estrella-banner-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 
                0 0 50px rgba(255, 215, 0, 0.25);
}

.estrella-banner-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, 
        rgba(255, 215, 0, 0.05) 0%, 
        transparent 70%);
    pointer-events: none;
}

.estrella-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 700px;
    position: relative;
    z-index: 1;
}

/* Logo container con glow */
.estrella-logo-container {
    flex-shrink: 0;
    position: relative;
}

.estrella-logo-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    filter: blur(20px);
    opacity: 0.6;
    animation: logoGlowPulse 3s ease-in-out infinite;
}

@keyframes logoGlowPulse {
    0%, 100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.estrella-logo-img {
    max-width: 150px;
    height: auto;
    position: relative;
    z-index: 2;
    filter: brightness(1.3) 
            drop-shadow(0 0 15px rgba(255, 215, 0, 0.6)) 
            drop-shadow(0 4px 12px rgba(255, 255, 255, 0.3));
    transition: all 0.4s ease;
}

.estrella-banner-link:hover .estrella-logo-img {
    transform: scale(1.08);
    filter: brightness(1.4) 
            drop-shadow(0 0 25px rgba(255, 215, 0, 0.8)) 
            drop-shadow(0 6px 16px rgba(255, 255, 255, 0.5));
}

/* Mensaje con texto espectacular */
.estrella-message {
    flex-grow: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.estrella-title {
    margin: 0;
    padding: 0;
    line-height: 1.4;
    font-size: 1.15rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
}

.estrella-word {
    color: #ffffff;
    text-shadow: 
        0 0 15px rgba(255, 255, 255, 1),
        0 0 25px rgba(var(--accent-rgb), 0.8),
        0 3px 8px rgba(0, 0, 0, 0.9),
        0 0 5px rgba(255, 255, 255, 0.6);
    font-family: 'Arial Black', 'Impact', sans-serif;
    transition: all 0.3s ease;
    display: inline-block;
    filter: brightness(1.2);
}

.estrella-word.highlight {
    color: #ffd700;
    background: linear-gradient(135deg, 
        #ffed4e 0%, 
        #ffd700 25%,
        #ffed4e 50%,
        #ffd700 75%,
        #ffed4e 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: brightness(1.4)
            drop-shadow(0 0 20px rgba(255, 215, 0, 1))
            drop-shadow(0 0 35px rgba(255, 237, 78, 0.8))
            drop-shadow(0 3px 10px rgba(0, 0, 0, 0.9));
    animation: wordShine 3s linear infinite, wordGlow 2s ease-in-out infinite;
    position: relative;
}

@keyframes wordShine {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes wordGlow {
    0%, 100% {
        filter: brightness(1.4)
                drop-shadow(0 0 20px rgba(255, 215, 0, 1))
                drop-shadow(0 0 35px rgba(255, 237, 78, 0.8))
                drop-shadow(0 3px 10px rgba(0, 0, 0, 0.9));
    }
    50% {
        filter: brightness(1.6)
                drop-shadow(0 0 30px rgba(255, 215, 0, 1))
                drop-shadow(0 0 50px rgba(255, 237, 78, 1))
                drop-shadow(0 3px 12px rgba(0, 0, 0, 0.9));
    }
}

.estrella-banner-link:hover .estrella-word {
    transform: translateY(-2px);
    filter: brightness(1.3);
}

.estrella-banner-link:hover .estrella-word.highlight {
    transform: translateY(-3px) scale(1.06);
    animation-duration: 2s, 1.5s;
}

.estrella-subtitle {
    margin: 10px 0 0 0;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    font-style: italic;
    text-shadow: 
        0 0 8px rgba(255, 255, 255, 0.8),
        0 2px 6px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(var(--accent-rgb), 0.5);
    letter-spacing: 1.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    filter: brightness(1.2);
}

.estrella-icon {
    font-size: 1.15rem;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 1))
            drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
    animation: iconFloat 2.5s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-4px) scale(1.1);
    }
}

/* Efecto de brillo al pasar el mouse */
.estrella-banner-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 3;
}

.estrella-banner-link:hover::before {
    left: 100%;
}

/* Responsive para tablets */
@media (max-width: 768px) {
    .estrella-banner-container {
        margin: 12px 0;
    }
    
    .estrella-banner-link {
        height: 120px;
        padding: 15px;
    }
    
    .estrella-content {
        gap: 18px;
        flex-direction: row;
        justify-content: center;
    }
    
    .estrella-logo-img {
        max-width: 120px;
    }
    
    .estrella-message {
        text-align: center;
    }
    
    .estrella-title {
        font-size: 0.95rem;
        letter-spacing: 2px;
        gap: 5px;
        justify-content: center;
    }
    
    .estrella-subtitle {
        font-size: 0.7rem;
        letter-spacing: 0.8px;
        justify-content: center;
    }
    
    .estrella-icon {
        font-size: 0.95rem;
    }
}

/* Responsive para móviles grandes */
@media (max-width: 600px) {
    .estrella-banner-container {
        margin: 8px 0;
    }
    
    .estrella-banner-link {
        height: 85px;
        padding: 10px;
    }
    
    .estrella-content {
        flex-direction: row;
        gap: 15px;
        padding: 0 10px;
        justify-content: center;
    }
    
    .estrella-logo-img {
        max-width: 90px;
    }
    
    .estrella-message {
        text-align: center;
        width: auto;
    }
    
    .estrella-title {
        font-size: 0.75rem;
        letter-spacing: 1.2px;
        gap: 4px;
        line-height: 1.4;
        justify-content: center;
    }
    
    .estrella-subtitle {
        font-size: 0.6rem;
        letter-spacing: 0.5px;
        margin-top: 4px;
        justify-content: center;
    }
    
    .estrella-icon {
        font-size: 0.8rem;
    }
}

/* Responsive para móviles pequeños */
@media (max-width: 480px) {
    .estrella-banner-container {
        margin: 6px 0;
        border-radius: 10px;
    }
    
    .estrella-banner-link {
        height: 75px;
        padding: 8px;
    }
    
    .estrella-content {
        flex-direction: row;
        gap: 12px;
        padding: 0 8px;
        justify-content: center;
    }
    
    .estrella-logo-img {
        max-width: 75px;
    }
    
    .estrella-message {
        text-align: center;
    }
    
    .estrella-title {
        font-size: 0.68rem;
        letter-spacing: 1px;
        gap: 3px;
        line-height: 1.35;
        justify-content: center;
    }
    
    .estrella-word {
        filter: brightness(1.3);
    }
    
    .estrella-word.highlight {
        filter: brightness(1.5)
                drop-shadow(0 0 12px rgba(255, 215, 0, 1))
                drop-shadow(0 0 20px rgba(255, 237, 78, 0.8));
    }
    
    .estrella-subtitle {
        font-size: 0.55rem;
        letter-spacing: 0.4px;
        margin-top: 3px;
        justify-content: center;
    }
    
    .estrella-icon {
        font-size: 0.75rem;
    }
}

/* Responsive para móviles muy pequeños */
@media (max-width: 360px) {
    .estrella-banner-link {
        height: 70px;
        padding: 6px;
    }
    
    .estrella-content {
        gap: 10px;
        padding: 0 6px;
        justify-content: center;
    }
    
    .estrella-logo-img {
        max-width: 65px;
    }
    
    .estrella-message {
        text-align: center;
    }
    
    .estrella-title {
        font-size: 0.62rem;
        letter-spacing: 0.8px;
        gap: 2px;
        line-height: 1.3;
        justify-content: center;
    }
    
    .estrella-subtitle {
        font-size: 0.5rem;
        letter-spacing: 0.3px;
        display: none; /* Ocultar en pantallas muy pequeñas */
    }
    
    .estrella-icon {
        font-size: 0.7rem;
    }
}

/* Animación de entrada espectacular */
@keyframes bannerFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.estrella-banner-container {
    animation: bannerFadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animación del borde dorado pulsante */
@keyframes borderPulse {
    0%, 100% {
        border-color: rgba(255, 215, 0, 0.4);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 
                    0 0 40px rgba(255, 215, 0, 0.15);
    }
    50% {
        border-color: rgba(255, 215, 0, 0.6);
        box-shadow: 0 8px 35px rgba(0, 0, 0, 0.5), 
                    0 0 50px rgba(255, 215, 0, 0.25);
    }
}

.estrella-banner-container:not(:hover) {
    animation: bannerFadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1),
               borderPulse 3s ease-in-out infinite 1s;
}

/* ========================================
   FIN BANNER ESTRELLA GALICIA
   ======================================== */

/* ========================================
   MEJORAS MODERNAS CHATBOT 2025
   ======================================== */

/* 🎨 Efectos Hover Mejorados en Botones */
.chat-form button,
.btn-send,
.quick-question-btn,
button[type="submit"] {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Efecto ripple al hacer clic */
.chat-form button::after,
.btn-send::after,
.quick-question-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.chat-form button:active::after,
.btn-send:active::after,
.quick-question-btn:active::after {
  width: 300px;
  height: 300px;
}

/* Hover con elevación y brillo */
.chat-form button:hover,
.btn-send:hover,
.quick-question-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.3) !important;
  filter: brightness(1.1) !important;
}

.chat-form button:active,
.btn-send:active,
.quick-question-btn:active {
  transform: translateY(0) scale(0.98) !important;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.2) !important;
}

/* 🎯 Focus States Modernos y Accesibles */
#user-input:focus,
textarea:focus,
input[type="text"]:focus,
button:focus,
.quick-question-btn:focus {
  outline: 3px solid rgba(var(--accent-rgb), 0.4) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1) !important;
  border-color: var(--restaurant-primary) !important;
  transition: all 0.2s ease !important;
}

/* Efecto de typing en el input */
#user-input:focus {
  background: linear-gradient(to right, 
    #ffffff 0%, 
    #EEF3FF 50%, 
    #ffffff 100%);
  background-size: 200% 100%;
  animation: inputGlow 3s ease infinite;
}

@keyframes inputGlow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* 🌟 Efectos en Preguntas Sugeridas */
.quick-question-btn {
  position: relative;
  background: linear-gradient(135deg, #2c5aa0 0%, #4a7bc8 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.quick-question-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.3), 
    transparent);
  transition: left 0.5s ease;
}

.quick-question-btn:hover::before {
  left: 100%;
}

.quick-question-btn:hover {
  background: linear-gradient(135deg, #A8C6FF 0%, var(--restaurant-primary) 100%);
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 25px rgba(var(--accent-rgb), 0.4) !important;
}

/* 💬 Animación de aparición de mensajes mejorada */
.msg {
  animation: messageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  animation-fill-mode: forwards;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.msg.user {
  animation: messageSlideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation-fill-mode: forwards;
}

@keyframes messageSlideInRight {
  from {
    opacity: 0;
    transform: translateX(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.msg.bot {
  animation: messageSlideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation-fill-mode: forwards;
}

@keyframes messageSlideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* 🎭 Hover en burbujas de chat */
.msg .bubble {
  transition: all 0.2s ease !important;
}

/* Los estilos hover ahora los maneja theme-loader.php dinámicamente con los colores del tema */
/* Se mantiene solo la transición base */
.msg .bubble {
  transition: all 0.2s ease !important;
}

/* 🔄 Indicador de carga mejorado */
.bubble.typing {
  animation: typingPulse 1.5s ease infinite;
}

@keyframes typingPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
}

/* ✨ Efecto de brillo en el header del chat */
.chat-header {
  position: relative;
  overflow: hidden;
}

.chat-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: headerShine 3s ease infinite;
}

@keyframes headerShine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* 🎨 Mejoras en el scrollbar del chat */
/* Los colores del scrollbar ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
.chat-window::-webkit-scrollbar-thumb {
  /* background: linear-gradient(180deg, var(--restaurant-primary) 0%, var(--restaurant-primary-dark) 100%); */
  border-radius: 4px;
  transition: all 0.3s ease;
}


.chat-window::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
}

/* 📱 Mejoras para accesibilidad táctil */
@media (hover: none) and (pointer: coarse) {
  .quick-question-btn,
  .chat-form button,
  .btn-send {
    min-height: 44px !important; /* Tamaño mínimo táctil recomendado */
    padding: 12px 20px !important;
  }
  
  /* Desactivar hover en dispositivos táctiles */
  /* Los estilos hover ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
  /* .msg .bubble:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  } */
}

/* 🌈 Gradiente animado en elementos activos */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.active-element {
  background: linear-gradient(
    -45deg,
    var(--restaurant-primary),
    #A8C6FF,
    var(--restaurant-primary-dark),
    var(--restaurant-primary)
  );
  background-size: 400% 400%;
  animation: gradientShift 3s ease infinite;
}

/* 🎯 Cursor personalizado en áreas interactivas */
.quick-question-btn,
button,
.clickable {
  cursor: pointer !important;
}

.quick-question-btn:hover,
button:hover,
.clickable:hover {
  cursor: pointer !important;
}

/* 🔍 MODO OSCURO DESHABILITADO - Forzar siempre modo claro */
@media (prefers-color-scheme: dark) {
  .chat-window {
    background: #f8f9fa !important; /* Fondo claro siempre */
    color: #1a1a1a !important;
  }
  
  .msg.bot .bubble {
    background: #ffffff !important; /* Fondo blanco siempre */
    color: #1a1a1a !important;
  }
  
  .msg.bot .bubble * {
    color: #1a1a1a !important; /* Texto oscuro siempre */
  }
  
  .msg.user .bubble {
    /* Los colores ahora los maneja theme-loader.php dinámicamente con máxima prioridad */
    /* background: linear-gradient(135deg, var(--restaurant-primary) 0%, var(--restaurant-primary-dark) 100%) !important; */
    /* color: #ffffff !important; */
  }
}

/* ⚡ Optimización de rendimiento */
.msg,
.bubble,
.quick-question-btn,
button {
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 🎪 Animación de entrada del chat container */
.chat-container {
  animation: containerFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes containerFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========================================
   FIN MEJORAS MODERNAS CHATBOT 2025
   ======================================== */

/* ========== OCULTAR ELEMENTOS DE ENTRADA MANTENIENDO FUNCIONALIDAD ========== */

/* Ocultar el campo de entrada de texto pero mantener funcionalidad */
#user-input,
.user-input {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* Ocultar el botón enviar pero mantener funcionalidad */
#send-btn,
.send-btn {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* Ocultar el contenedor del input group si está vacío */
.input-group:has(#user-input:only-child) {
  display: none !important;
}

/* Ajustar el contenedor de botones para ocupar el espacio disponible */
.btn-row {
  width: 100% !important;
  max-width: 100% !important;
  justify-content: center !important;
  gap: 15px !important;
}

/* Asegurar que los botones se distribuyan uniformemente - SIN RESTRICCIONES DE ANCHO */
.btn-row > .stop-btn,
.btn-row > .clear-btn,
.btn-row > .view-carta-btn {
  flex: 1 !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.btn-row > .view-carta-btn {
  flex: 1.35 !important;
}

@media (max-width: 768px) {
  .btn-row > .view-carta-btn {
    flex: 1.1 !important;
  }
}

@media (max-width: 480px) {
  .btn-row > .view-carta-btn {
    flex: 1 !important;
  }
}

/* Ajustar el formulario para que no tenga espacios vacíos */
.chat-form {
  padding: 15px 20px !important;
}

/* Responsive para móviles - ajustar botones ocultos */
@media (max-width: 768px) {
  .btn-row {
    gap: 10px !important;
  }
  
  .btn-row > .stop-btn,
  .btn-row > .clear-btn {
    flex: 1 !important;
    max-width: 150px !important;
    min-width: 100px !important;
  }
}

@media (max-width: 480px) {
  .btn-row {
    gap: 8px !important;
  }
  
  .btn-row > .stop-btn,
  .btn-row > .clear-btn {
    flex: 1 !important;
    max-width: 120px !important;
    min-width: 80px !important;
  }
}

/* ========== FIN OCULTAR ELEMENTOS DE ENTRADA ========== */
