/* ====================================== */
/* THEMIS CHATBOT WIDGET - CSS PREMIUM    */
/* ====================================== */

.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  width: 420px;
  max-width: 90vw;
  transition: width 0.3s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Chat Expandido */
.chat-widget.chat-expanded {
  width: 700px;
  max-width: 95vw;
}

.chat-widget.chat-expanded .chat-messages {
  height: 60vh;
}

/* Botón flotante principal */
.chat-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #0d1b2e;
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

.chat-button:hover {
  background: #1a2a40;
  transform: scale(1.1);
}

/* Contenedor del Chat */
.chat-container {
  display: none;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  overflow: hidden;
  border: 1px solid #e9ecef;
}

/* Header Institucional */
.chat-header {
  background: #0d1b2e;
  color: #ffffff;
  padding: 15px 20px;
  font-weight: 500;
  border-bottom: 2px solid #c8a84b; /* Separador Dorado */
}

/* Área de Mensajes */
.chat-messages {
  height: 350px;
  overflow-y: auto;
  padding: 20px;
  background: #fdfdfd;
}

/* Burbujas de Mensaje */
.message {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

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

.message-content {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.message.user .message-content {
  background: #0d1b2e;
  color: #ffffff;
}

.message.bot .message-content {
  background: #ffffff;
  color: #212529;
  border: 1px solid #e9ecef;
}

.message-time {
  font-size: 11px;
  color: #adb5bd;
  margin-top: 4px;
  padding: 0 4px;
}

/* Chips / Accesos Rápidos */
.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  background: #f1f3f5;
  color: #0d1b2e;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.chip:hover {
  background: #c8a84b;
  color: #ffffff;
  border-color: #c8a84b;
}

/* Barra de Input */
.chat-input {
  padding: 15px;
  border-top: 1px solid #e9ecef;
  background: #ffffff;
}

.chat-input .input-group {
  display: flex;
  align-items: center;
}

.chat-input input {
  border-radius: 25px !important;
  border: 1px solid #dee2e6;
  padding: 10px 15px;
  font-size: 14px;
}

.chat-input input:focus {
  border-color: #0d1b2e;
  box-shadow: none;
}

.chat-input button {
  border-radius: 50% !important;
  width: 40px;
  height: 40px;
  background: #0d1b2e;
  border: none;
  color: white;
  margin-left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chat-input button:hover {
  background: #c8a84b;
}

/* Indicador de Escritura */
.typing-indicator {
  display: none;
  padding: 10px 20px;
  color: #adb5bd;
  font-size: 12px;
  font-style: italic;
}