/**
 * Chatbot Modal Styles - Diseño Minimalista Glass
 * Efecto glass con fondo blanco y estética moderna
 */

/* ===== Variables CSS ===== */
:root {
  --chatbot-primary: #6366f1;
  --chatbot-primary-hover: #4f46e5;
  --chatbot-bg: rgba(255, 255, 255, 0.85);
  --chatbot-glass: rgba(0, 0, 0, 0.04);
  --chatbot-glass-hover: rgba(0, 0, 0, 0.08);
  --chatbot-border: rgba(0, 0, 0, 0.1);
  --chatbot-text: #1a1a1a;
  --chatbot-text-secondary: rgba(0, 0, 0, 0.65);
  --chatbot-radius: 20px;
  --chatbot-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ===== Overlay (Oculto) ===== */
.chatbot-overlay {
  display: none !important;
}

/* ===== Modal Principal ===== */
.chatbot-modal {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 420px;
  height: 680px;
  background: var(--chatbot-bg);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: var(--chatbot-radius);
  border: 1px solid var(--chatbot-border);
  box-shadow: var(--chatbot-shadow), 0 0 0 1px rgba(0, 0, 0, 0.02) inset;
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-modal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Estado Minimizado */
.chatbot-modal.minimized {
  height: 70px;
  overflow: hidden;
}

.chatbot-modal.minimized .chatbot-modal-body {
  display: none;
}

/* ===== Header del Modal ===== */
.chatbot-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-bottom: 1px solid var(--chatbot-border);
  border-radius: var(--chatbot-radius) var(--chatbot-radius) 0 0;
  flex-shrink: 0;
  box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.03) inset;
}

.chatbot-modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chatbot-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--chatbot-primary), #8b5cf6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.chatbot-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}

.chatbot-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chatbot-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--chatbot-text);
  line-height: 1;
  letter-spacing: -0.02em;
}

.chatbot-status {
  font-size: 12px;
  color: var(--chatbot-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.chatbot-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chatbot-modal-header-right {
  display: flex;
  gap: 6px;
}

.chatbot-btn-icon {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--chatbot-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.chatbot-btn-icon:hover {
  background: var(--chatbot-glass-hover);
  color: var(--chatbot-text);
}

/* ===== Cuerpo del Modal ===== */
.chatbot-modal-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* ===== Área de Mensajes ===== */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 32px 28px;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Scrollbar minimalista */
.chatbot-messages::-webkit-scrollbar {
  width: 4px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ===== Mensaje de Bienvenida ===== */
.chatbot-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  height: 100%;
}

.chatbot-welcome-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--chatbot-primary), #8b5cf6);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.chatbot-welcome-icon svg {
  color: white;
}

.chatbot-welcome-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--chatbot-text);
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.chatbot-welcome-text {
  font-size: 15px;
  color: var(--chatbot-text-secondary);
  margin: 0 0 40px 0;
  max-width: 340px;
  line-height: 1.7;
}

/* ===== Botones Rápidos ===== */
.chatbot-quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

.chatbot-quick-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--chatbot-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--chatbot-border);
  border-radius: 14px;
  color: var(--chatbot-text);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  line-height: 1.5;
}

.chatbot-quick-btn:hover {
  background: var(--chatbot-glass-hover);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.chatbot-quick-btn svg {
  flex-shrink: 0;
  color: var(--chatbot-primary);
  opacity: 0.8;
}

/* ===== Mensajes ===== */
.chatbot-message {
  display: flex;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Indicador de flujo conversacional */
.flow-indicator {
  margin-bottom: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--chatbot-primary), #8b5cf6);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.flow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 500;
}

.flow-name {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.flow-step {
  background: rgba(0, 0, 0, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
}

.flow-progress-bar {
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.flow-progress-fill {
  height: 100%;
  background: var(--chatbot-primary);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.chatbot-message-user {
  justify-content: flex-end;
}

.chatbot-message-bot {
  justify-content: flex-start;
}

.chatbot-message-content {
  max-width: 80%;
  padding: 16px 20px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: normal;
}

.chatbot-message-user .chatbot-message-content {
  background: rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--chatbot-text);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 1px 0 0 rgba(0, 0, 0, 0.03) inset;
}

.chatbot-message-bot .chatbot-message-content {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--chatbot-text);
  border-bottom-left-radius: 6px;
  border: none;
  box-shadow: none;
  padding: 20px 0;
}

.chatbot-message-text {
  word-wrap: break-word;
  white-space: pre-wrap;
  letter-spacing: normal;
  font-size: 15px;
  line-height: 1.8;
}

/* Mejoras tipográficas para mensajes del bot */
.chatbot-message-bot .chatbot-message-text {
  font-size: 15px;
  line-height: 1.9;
  color: #1a1a1a;
  letter-spacing: normal;
}

/* Estilo para listas en mensajes */
.chatbot-message-text ul,
.chatbot-message-text ol {
  margin: 12px 0;
  padding-left: 20px;
  list-style-position: outside;
}

.chatbot-message-text li {
  margin: 8px 0;
  line-height: 1.8;
}

/* Estilo para párrafos */
.chatbot-message-text p {
  margin: 12px 0;
}

.chatbot-message-text p:first-child {
  margin-top: 0;
}

.chatbot-message-text p:last-child {
  margin-bottom: 0;
}

.chatbot-message-time {
  font-size: 11px;
  opacity: 0.4;
  margin-top: 8px;
  text-align: right;
  letter-spacing: 0.02em;
}

.chatbot-message-bot .chatbot-message-time {
  text-align: left;
}

/* ===== Indicador de Escritura ===== */
.chatbot-typing-indicator {
  display: flex;
  justify-content: flex-start;
}

.chatbot-typing-dots {
  display: flex;
  gap: 6px;
  padding: 14px 18px;
  background: var(--chatbot-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--chatbot-border);
  border-radius: 16px;
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chatbot-typing-dots span {
  width: 7px;
  height: 7px;
  background: var(--chatbot-text-secondary);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite;
}

.chatbot-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.chatbot-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-7px);
    opacity: 1;
  }
}

/* ===== Opciones de Dropdown ===== */
.chatbot-dropdown-options {
  margin: 12px 0;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-dropdown-label {
  font-size: 12px;
  color: var(--chatbot-text-secondary);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.chatbot-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.chatbot-dropdown-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px 20px;
  background: var(--chatbot-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--chatbot-border);
  border-radius: 14px;
  color: var(--chatbot-text);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.chatbot-dropdown-btn:hover {
  background: var(--chatbot-glass-hover);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateX(4px);
}

.chatbot-dropdown-btn-label {
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.5;
}

.chatbot-dropdown-btn-extra {
  font-size: 13px;
  color: var(--chatbot-text-secondary);
  line-height: 1.5;
}

/* ===== Área de Input ===== */
.chatbot-input-area {
  padding: 20px 24px;
  border-top: 1px solid var(--chatbot-border);
  background: rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-radius: 0 0 var(--chatbot-radius) var(--chatbot-radius);
  flex-shrink: 0;
  box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.03) inset;
}

.chatbot-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chatbot-input {
  flex: 1;
  padding: 15px 20px;
  border: 1px solid var(--chatbot-border);
  border-radius: 14px;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
  background: var(--chatbot-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: var(--chatbot-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 0 0 rgba(0, 0, 0, 0.03) inset;
  line-height: 1.6;
}

.chatbot-input:focus {
  border-color: var(--chatbot-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25), 0 4px 12px rgba(0, 0, 0, 0.15), 0 1px 0 0 rgba(0, 0, 0, 0.05) inset;
  background: rgba(0, 0, 0, 0.06);
}

.chatbot-input::placeholder {
  color: var(--chatbot-text-secondary);
}

.chatbot-send-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--chatbot-primary), #8b5cf6);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.chatbot-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.chatbot-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: scale(1);
}

/* 🎤 NUEVO: Botón de Voz */
.chatbot-voice-btn {
  width: 44px;
  height: 44px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--chatbot-primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-right: 8px;
}

.chatbot-voice-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  transform: scale(1.05);
}

.chatbot-voice-btn:active {
  transform: scale(0.95);
}

/* Estado: Grabando */
.chatbot-voice-btn.recording {
  background: #ef4444;
  color: white;
  border-color: #dc2626;
  animation: pulse-recording 1.5s ease-in-out infinite;
}

.chatbot-voice-btn.recording:hover {
  background: #dc2626;
  border-color: #b91c1c;
}

/* Animación de pulso para grabación */
@keyframes pulse-recording {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
}

/* Animación del círculo interno cuando está grabando */
.pulse-animation {
  animation: pulse-circle 1.5s ease-in-out infinite;
}

@keyframes pulse-circle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ===== Botón Flotante ===== */
.chatbot-trigger-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--chatbot-primary), #8b5cf6);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  z-index: 9997;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-trigger-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5);
}

.chatbot-trigger-btn svg {
  width: 26px;
  height: 26px;
}

/* Badge de notificación */
.chatbot-trigger-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: 2px solid rgba(0, 0, 0, 0.9);
  border-radius: 10px;
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* ===== Responsive ===== */

/* Tablets y pantallas medianas (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  .chatbot-modal {
    width: 400px;
    height: 650px;
  }
}

/* Tablets pequeñas y móviles grandes (481px - 768px) */
@media (max-width: 768px) {
  .chatbot-modal {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height para móviles */
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .chatbot-modal.minimized {
    height: 70px;
    border-radius: 20px 20px 0 0;
    left: auto;
    right: 12px;
    bottom: 12px;
    width: 320px;
    max-width: calc(100% - 24px);
  }

  .chatbot-modal-header {
    border-radius: 0;
    padding: 16px 20px;
  }

  .chatbot-modal-header-left {
    gap: 12px;
  }

  .chatbot-icon {
    width: 36px;
    height: 36px;
  }

  .chatbot-icon svg {
    width: 20px;
    height: 20px;
  }

  .chatbot-title {
    font-size: 15px;
  }

  .chatbot-status {
    font-size: 11px;
  }

  .chatbot-btn-icon {
    width: 34px;
    height: 34px;
  }

  .chatbot-btn-icon svg {
    width: 18px;
    height: 18px;
  }

  .chatbot-input-area {
    border-radius: 0;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom)); /* Para notch de móviles */
  }

  .chatbot-trigger-btn {
    right: 16px;
    bottom: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
  }

  .chatbot-message-content {
    max-width: 85%;
    font-size: 14px;
    padding: 14px 18px;
  }

  .chatbot-quick-actions {
    max-width: 100%;
  }

  .chatbot-quick-btn {
    padding: 14px 18px;
    font-size: 14px;
  }

  .chatbot-messages {
    padding: 20px 16px;
  }

  .chatbot-welcome {
    padding: 40px 20px;
  }

  .chatbot-dropdown-btn {
    padding: 14px 18px;
    font-size: 14px;
  }
}

/* Móviles medianos (376px - 480px) */
@media (max-width: 480px) {
  .chatbot-modal-header {
    padding: 14px 16px;
  }

  .chatbot-modal-header-left {
    gap: 10px;
  }

  .chatbot-icon {
    width: 34px;
    height: 34px;
  }

  .chatbot-icon svg {
    width: 18px;
    height: 18px;
  }

  .chatbot-title {
    font-size: 14px;
  }

  .chatbot-status {
    font-size: 10px;
  }

  .chatbot-btn-icon {
    width: 32px;
    height: 32px;
  }

  .chatbot-btn-icon svg {
    width: 16px;
    height: 16px;
  }

  .chatbot-messages {
    padding: 16px 12px;
    gap: 20px;
  }

  .chatbot-input-area {
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  .chatbot-input {
    padding: 12px 16px;
    font-size: 14px;
  }

  .chatbot-send-btn,
  .chatbot-voice-btn {
    width: 40px;
    height: 40px;
  }

  .chatbot-send-btn svg,
  .chatbot-voice-btn svg {
    width: 18px;
    height: 18px;
  }

  .chatbot-welcome {
    padding: 30px 16px;
  }

  .chatbot-welcome-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
  }

  .chatbot-welcome-icon svg {
    width: 42px;
    height: 42px;
  }

  .chatbot-welcome-title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .chatbot-welcome-text {
    font-size: 13px;
    margin-bottom: 30px;
  }

  .chatbot-quick-btn {
    padding: 12px 16px;
    font-size: 13px;
    gap: 12px;
  }

  .chatbot-quick-btn svg {
    width: 14px;
    height: 14px;
  }

  .chatbot-message-content {
    max-width: 88%;
    font-size: 13px;
    padding: 12px 16px;
  }

  .chatbot-dropdown-btn {
    padding: 12px 16px;
    font-size: 13px;
  }

  .chatbot-modal.minimized {
    width: 280px;
    right: 8px;
    bottom: 8px;
  }
}

/* Móviles pequeños (320px - 375px) */
@media (max-width: 375px) {
  .chatbot-modal-header {
    padding: 12px 14px;
  }

  .chatbot-modal-header-left {
    gap: 8px;
  }

  .chatbot-icon {
    width: 32px;
    height: 32px;
  }

  .chatbot-icon svg {
    width: 16px;
    height: 16px;
  }

  .chatbot-title {
    font-size: 13px;
  }

  .chatbot-status {
    font-size: 9px;
  }

  .chatbot-btn-icon {
    width: 30px;
    height: 30px;
  }

  .chatbot-btn-icon svg {
    width: 14px;
    height: 14px;
  }

  .chatbot-modal-header-right {
    gap: 4px;
  }

  .chatbot-messages {
    padding: 14px 10px;
    gap: 16px;
  }

  .chatbot-input-area {
    padding: 12px 14px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .chatbot-form {
    gap: 8px;
  }

  .chatbot-input {
    padding: 10px 14px;
    font-size: 13px;
  }

  .chatbot-send-btn,
  .chatbot-voice-btn {
    width: 38px;
    height: 38px;
  }

  .chatbot-send-btn svg,
  .chatbot-voice-btn svg {
    width: 16px;
    height: 16px;
  }

  .chatbot-voice-btn {
    margin-right: 0;
  }

  .chatbot-welcome {
    padding: 24px 12px;
  }

  .chatbot-welcome-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
  }

  .chatbot-welcome-icon svg {
    width: 36px;
    height: 36px;
  }

  .chatbot-welcome-title {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .chatbot-welcome-text {
    font-size: 12px;
    margin-bottom: 24px;
    line-height: 1.6;
  }

  .chatbot-quick-btn {
    padding: 10px 14px;
    font-size: 12px;
    gap: 10px;
  }

  .chatbot-quick-btn svg {
    width: 12px;
    height: 12px;
  }

  .chatbot-message-content {
    max-width: 90%;
    font-size: 12px;
    padding: 10px 14px;
  }

  .chatbot-message-text {
    font-size: 12px;
    line-height: 1.6;
  }

  .chatbot-dropdown-btn {
    padding: 10px 14px;
    font-size: 12px;
  }

  .chatbot-dropdown-btn-label {
    font-size: 12px;
  }

  .chatbot-dropdown-btn-extra {
    font-size: 11px;
  }

  .chatbot-trigger-btn {
    width: 52px;
    height: 52px;
    right: 12px;
    bottom: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .chatbot-trigger-btn svg {
    width: 24px;
    height: 24px;
  }

  .chatbot-modal.minimized {
    width: 260px;
    height: 64px;
  }
}

/* Landscape mode en móviles */
@media (max-height: 500px) and (orientation: landscape) {
  .chatbot-modal {
    height: 100vh;
    height: 100dvh;
  }

  .chatbot-messages {
    padding: 12px 16px;
  }

  .chatbot-welcome {
    padding: 20px 16px;
  }

  .chatbot-welcome-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
  }

  .chatbot-welcome-icon svg {
    width: 32px;
    height: 32px;
  }

  .chatbot-welcome-title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .chatbot-welcome-text {
    font-size: 12px;
    margin-bottom: 20px;
  }

  .chatbot-quick-btn {
    padding: 8px 14px;
  }

  .chatbot-input-area {
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .chatbot-modal-header {
    padding: 10px 16px;
  }
}

/* Fix para iOS Safari y Chrome móvil */
@supports (padding: max(0px)) {
  .chatbot-input-area {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .chatbot-trigger-btn {
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}
