/* ============================================================
   Chatbot Jurídico — Estilos del widget flotante v2.0
   Paleta: azul marino + dorado + blanco cálido
   Optimizado para conversión y experiencia de usuario
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --cj-navy: #1a2744;
  --cj-navy-mid: #243154;
  --cj-navy-lite: #2f4070;
  --cj-gold: #c9a84c;
  --cj-gold-lite: #e6c97a;
  --cj-gold-deep: #a8863a;
  --cj-white: #f8f6f1;
  --cj-text: #2d2d2d;
  --cj-muted: #7a7a7a;
  --cj-radius: 14px;
  --cj-shadow: 0 16px 48px rgba(26, 39, 68, .32), 0 3px 10px rgba(0, 0, 0, .12);
  --cj-z: 99999;
  --cj-w: 440px;
  --cj-h: min(720px, calc(100dvh - 120px));
  --cj-wa-green: #25d366;
  --cj-wa-dark: #128c5e;
}

/* ══════════════════════════════════════════════════════════
   LAUNCHER BUTTON
══════════════════════════════════════════════════════════ */
#cj-launcher {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: var(--cj-z);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px 13px 18px;
  background: linear-gradient(135deg, var(--cj-navy) 0%, var(--cj-navy-lite) 100%);
  border: 2px solid rgba(248, 246, 241, .25);
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 28px rgba(26, 39, 68, .45), 0 1px 4px rgba(0, 0, 0, .2);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
  user-select: none;
  outline: none;
  font: inherit;
  appearance: none;
  overflow: visible !important;
}

#cj-launcher:hover,
#cj-launcher:focus {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 36px rgba(26, 39, 68, .55), 0 2px 6px rgba(0, 0, 0, .2);
}

#cj-launcher:focus-visible,
#cj-reset-btn:focus-visible,
#cj-close-btn:focus-visible,
.botui-actions-buttons-button:focus-visible {
  outline: 3px solid #fff !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px var(--cj-navy) !important;
}

#cj-launcher:active {
  transform: scale(.97);
}

#cj-launcher.cj-active {
  padding: 13px 20px;
  border-color: rgba(248, 246, 241, .2);
}

#cj-launcher svg {
  width: 22px;
  height: 22px;
  color: var(--cj-white);
  flex-shrink: 0;
}

.cj-launcher-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--cj-white);
  letter-spacing: 0;
  white-space: nowrap;
}

#cj-launcher.cj-active .cj-launcher-label {
  display: none;
}

/* ── Badge de notificación ──────────────────────────────── */
#cj-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  background: #e53935;
  color: #fff;
  border-radius: 50%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  opacity: 0;
  transform: scale(0);
  transition: opacity .3s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
  z-index: 2;
}

#cj-badge.cj-badge-visible {
  opacity: 1;
  transform: scale(1);
}

/* Pulso de atención */
#cj-badge.cj-badge-visible::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #e53935;
  animation: cj-pulse 2s ease-out infinite;
}

@keyframes cj-pulse {
  0% {
    opacity: .7;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(2);
  }
}

/* ══════════════════════════════════════════════════════════
   WIDGET CONTAINER
══════════════════════════════════════════════════════════ */
#cj-widget {
  position: fixed;
  bottom: 90px;
  left: 28px;
  z-index: var(--cj-z);
  width: var(--cj-w);
  height: var(--cj-h);
  background: var(--cj-white);
  border-radius: var(--cj-radius);
  box-shadow: var(--cj-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .8);
  opacity: 0;
  transform: translateY(24px) scale(.96);
  pointer-events: none;
  transition: opacity .32s ease, transform .32s cubic-bezier(.34, 1.15, .64, 1);
}

#cj-widget.cj-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* ══════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════ */
#cj-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: linear-gradient(135deg, var(--cj-navy) 0%, var(--cj-navy-lite) 100%);
  border-bottom: 1px solid rgba(201, 168, 76, .3);
  flex-shrink: 0;
  position: relative;
}

/* Línea decorativa dorada en la base del header */
#cj-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cj-gold), transparent);
}

.cj-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid rgba(201, 168, 76, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.cj-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cj-header-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--cj-white);
  line-height: 1.2;
}

.cj-header-status {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  color: rgba(248, 246, 241, .75);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Punto pulsante "En línea" */
.cj-status-dot {
  width: 7px;
  height: 7px;
  background: #4caf50;
  border-radius: 50%;
  display: inline-block;
  animation: cj-blink 2.5s ease-in-out infinite;
}

@keyframes cj-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .4;
  }
}

#cj-reset-btn,
#cj-close-btn {
  background: none;
  border: none;
  color: rgba(248, 246, 241, .6);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: color .2s, background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cj-reset-btn {
  margin-right: 4px;
  color: rgba(248, 246, 241, .75);
  background: rgba(255, 255, 255, .12);
  border: 1.5px solid rgba(255, 255, 255, .25) !important;
  padding: 6px 8px;
}

#cj-reset-btn:hover {
  background: rgba(255, 255, 255, .22);
  color: var(--cj-white);
  border-color: rgba(255, 255, 255, .5) !important;
}

#cj-close-btn:hover {
  color: var(--cj-white);
  background: rgba(255, 255, 255, .12);
}

/* ══════════════════════════════════════════════════════════
   BODY / BOTUI WRAPPER
══════════════════════════════════════════════════════════ */
#cj-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f0eee9;
  overflow: hidden;
  min-height: 0;
}

#cj-botui {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* ══════════════════════════════════════════════════════════
   BOTUI OVERRIDES
══════════════════════════════════════════════════════════ */
.botui-app-container {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: transparent !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-size: 16px !important;
}

/* ── Área de mensajes ─────────────────────────────────── */
.botui-messages-container {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  min-height: 0 !important;
  padding: 16px 14px 12px !important;
  background: transparent !important;
  scroll-behavior: smooth;
}

.botui-messages-container::-webkit-scrollbar {
  width: 5px;
}

.botui-messages-container::-webkit-scrollbar-track {
  background: transparent;
}

.botui-messages-container::-webkit-scrollbar-thumb {
  background: rgba(26, 39, 68, .2);
  border-radius: 8px;
}

.botui-messages-container::-webkit-scrollbar-thumb:hover {
  background: rgba(26, 39, 68, .38);
}

/* ── Burbuja del bot ─────────────────────────────────── */
.botui-message {
  margin-bottom: 10px !important;
}

.botui-message-content {
  background: #ffffff !important;
  color: var(--cj-text) !important;
  border: 1px solid rgba(26, 39, 68, .09) !important;
  border-radius: 4px 16px 16px 16px !important;
  padding: 11px 15px !important;
  font-size: 15.5px !important;
  line-height: 1.6 !important;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .07), 0 0 0 0 transparent !important;
  max-width: 86% !important;
  word-break: break-word !important;
  /* Animación de entrada */
  animation: cj-msgIn .25s ease-out both;
}

@keyframes cj-msgIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Burbuja humana ──────────────────────────────────── */
.botui-message-content.human {
  background: linear-gradient(135deg, var(--cj-navy) 0%, var(--cj-navy-lite) 100%) !important;
  color: var(--cj-white) !important;
  border-color: transparent !important;
  border-radius: 16px 16px 4px 16px !important;
  margin-left: auto !important;
  box-shadow: 0 2px 8px rgba(26, 39, 68, .22) !important;
}

/* Links dentro de burbujas */
.botui-message-content a {
  color: var(--cj-navy) !important;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.botui-message-content.human a {
  color: var(--cj-gold-lite) !important;
}

/* ── Loading dots mejorados ──────────────────────────── */
.botui-message-content-loading {
  padding: 14px 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.botui-message-content-loading span {
  width: 7px !important;
  height: 7px !important;
  background: var(--cj-navy) !important;
  border-radius: 50% !important;
  opacity: .35;
  animation: cj-dot 1.2s ease-in-out infinite !important;
}

.botui-message-content-loading span:nth-child(2) {
  animation-delay: .2s !important;
}

.botui-message-content-loading span:nth-child(3) {
  animation-delay: .4s !important;
}

@keyframes cj-dot {

  0%,
  80%,
  100% {
    transform: scale(.8);
    opacity: .35;
  }

  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* ══════════════════════════════════════════════════════════
   ÁREA DE ACCIONES (BOTONES)
══════════════════════════════════════════════════════════ */
.botui-actions-container {
  padding: 8px 12px 12px !important;
  display: block !important;
  background: rgba(248, 246, 241, .95) !important;
  border-top: 1px solid rgba(26, 39, 68, .09) !important;
  flex: 0 0 auto !important;
  max-height: 230px !important;
  overflow: hidden !important;
  backdrop-filter: blur(4px);
}

/* BotUI envuelve las opciones en este contenedor interno. */
.botui-actions-buttons {
  width: 100% !important;
  max-height: 210px !important;
  padding: 1px 3px 3px 1px !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(26, 39, 68, .28) transparent;
}

.botui-actions-buttons::-webkit-scrollbar {
  width: 5px;
}

.botui-actions-buttons::-webkit-scrollbar-thumb {
  background: rgba(26, 39, 68, .28);
  border-radius: 8px;
}

/* ── Botones generales ───────────────────────────────── */
.botui-actions-buttons-button {
  background: #fff !important;
  color: var(--cj-navy) !important;
  border: 1.5px solid rgba(26, 39, 68, .3) !important;
  border-radius: 9px !important;
  padding: 8px 13px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background .18s ease, color .18s ease, border-color .18s ease,
    transform .15s ease, box-shadow .18s ease !important;
  text-align: left !important;
  line-height: 1.3 !important;
  min-height: 40px !important;
  width: 100% !important;
  margin: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

.botui-actions-buttons-button:hover {
  background: var(--cj-navy) !important;
  color: var(--cj-white) !important;
  border-color: var(--cj-navy) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 10px rgba(26, 39, 68, .22) !important;
}

.botui-actions-buttons-button:active {
  transform: scale(.97) !important;
  box-shadow: none !important;
}

/* ── Sistema local de íconos SVG ─────────────────────── */
.botui-actions-buttons-button.cj-icon-button {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.botui-actions-buttons-button.cj-icon-button::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-color: currentColor;
  -webkit-mask: var(--cj-action-icon) center / contain no-repeat;
  mask: var(--cj-action-icon) center / contain no-repeat;
}

.cj-icon-arrow { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.cj-icon-back { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E"); }
.cj-icon-home { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-8 9 8v9a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
.cj-icon-compass { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M15.5 8.5l-2 5-5 2 2-5z'/%3E%3C/svg%3E"); }
.cj-icon-scales { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M5 6h14M3 20h18M5 6l-3 6h6zM19 6l-3 6h6z'/%3E%3C/svg%3E"); }
.cj-icon-calculator { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cpath d='M8 6h8M8 11h.01M12 11h.01M16 11h.01M8 15h.01M12 15h.01M16 15h.01M8 19h.01M12 19h.01M16 19h.01'/%3E%3C/svg%3E"); }
.cj-icon-building { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v17M16 9h3a1 1 0 0 1 1 1v11M8 7h4M8 11h4M8 15h4M9 21v-3h2v3M2 21h20'/%3E%3C/svg%3E"); }
.cj-icon-landmark { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9h18L12 3zM5 9v8M9 9v8M15 9v8M19 9v8M3 17h18M2 21h20'/%3E%3C/svg%3E"); }
.cj-icon-document { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h8l4 4v16H6zM14 2v5h5M9 12h6M9 16h6'/%3E%3C/svg%3E"); }
.cj-icon-book { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5a3 3 0 0 1 3-3h5v18H6a3 3 0 0 0-3 2zM21 5a3 3 0 0 0-3-3h-5v18h5a3 3 0 0 1 3 2z'/%3E%3C/svg%3E"); }
.cj-icon-cpu { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3Crect x='9' y='9' width='6' height='6'/%3E%3Cpath d='M9 2v4M15 2v4M9 18v4M15 18v4M2 9h4M2 15h4M18 9h4M18 15h4'/%3E%3C/svg%3E"); }
.cj-icon-message { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E"); }
.cj-icon-phone { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 2 .7 2.8a2 2 0 0 1-.4 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E"); }
.cj-icon-search { --cj-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E"); }

/* ── Botón WhatsApp — siempre destacado ──────────────── */
.botui-actions-buttons-button.cj-value-whatsapp_direct,
.botui-actions-buttons-button.cj-value-whatsapp {
  background: var(--cj-wa-green) !important;
  color: #fff !important;
  border-color: var(--cj-wa-green) !important;
  order: -1;
  /* aparece primero */
}

.botui-actions-buttons-button.cj-value-whatsapp_direct:hover,
.botui-actions-buttons-button.cj-value-whatsapp:hover {
  background: var(--cj-wa-dark) !important;
  border-color: var(--cj-wa-dark) !important;
  color: #fff !important;
}

/* ── Botón CTA principal (link/agendar) ──────────────── */
.botui-actions-buttons-button.cj-value-link,
.botui-actions-buttons-button.cj-value-form {
  background: linear-gradient(135deg, var(--cj-navy) 0%, var(--cj-navy-lite) 100%) !important;
  color: var(--cj-white) !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(26, 39, 68, .2) !important;
}

.botui-actions-buttons-button.cj-value-link:hover,
.botui-actions-buttons-button.cj-value-form:hover {
  background: linear-gradient(135deg, var(--cj-navy-lite) 0%, var(--cj-navy) 100%) !important;
  box-shadow: 0 4px 14px rgba(26, 39, 68, .32) !important;
  transform: translateY(-1px) !important;
}

.botui-actions-buttons-button.cj-value-link_eval,
.botui-actions-buttons-button.cj-value-liquidacion_contextual,
.botui-actions-buttons-button.cj-value-consultas,
.botui-actions-buttons-button.cj-value-liquidaciones,
.botui-actions-buttons-button.cj-value-inmobiliario,
.botui-actions-buttons-button.cj-value-accidentes_trabajo,
.botui-actions-buttons-button.cj-value-contratos,
.botui-actions-buttons-button.cj-value-sucesiones {
  background: linear-gradient(135deg, var(--cj-navy) 0%, var(--cj-navy-lite) 100%) !important;
  color: var(--cj-white) !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(26, 39, 68, .2) !important;
}

.botui-actions-buttons-button.cj-value-link_eval:hover,
.botui-actions-buttons-button.cj-value-liquidacion_contextual:hover,
.botui-actions-buttons-button.cj-value-consultas:hover,
.botui-actions-buttons-button.cj-value-liquidaciones:hover,
.botui-actions-buttons-button.cj-value-inmobiliario:hover,
.botui-actions-buttons-button.cj-value-accidentes_trabajo:hover,
.botui-actions-buttons-button.cj-value-contratos:hover,
.botui-actions-buttons-button.cj-value-sucesiones:hover {
  background: linear-gradient(135deg, var(--cj-navy-lite) 0%, var(--cj-navy) 100%) !important;
  box-shadow: 0 4px 14px rgba(26, 39, 68, .32) !important;
}

/* ── Botón evaluacion gratuita ───────────────────────── */
.botui-actions-buttons-button.cj-value-evaluacion,
.botui-actions-buttons-button.cj-value-orientador {
  background: linear-gradient(135deg, var(--cj-gold-deep) 0%, var(--cj-gold) 100%) !important;
  color: var(--cj-navy) !important;
  border-color: transparent !important;
  font-weight: 700 !important;
}

.botui-actions-buttons-button.cj-value-evaluacion:hover,
.botui-actions-buttons-button.cj-value-orientador:hover {
  background: linear-gradient(135deg, var(--cj-gold) 0%, var(--cj-gold-lite) 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 12px rgba(201, 168, 76, .35) !important;
}

.botui-actions-buttons-button.cj-value-recursos,
.botui-actions-buttons-button.cj-value-guias,
.botui-actions-buttons-button.cj-value-tecnologia_derecho,
.botui-actions-buttons-button.cj-value-guia_tecnologia,
.botui-actions-buttons-button.cj-value-escalas,
.botui-actions-buttons-button.cj-value-calculadoras,
.botui-actions-buttons-button.cj-value-calc_lrt,
.botui-actions-buttons-button.cj-value-baremo_lrt,
.botui-actions-buttons-button.cj-value-guia_art {
  background: #fffaf0 !important;
  border-color: rgba(201, 168, 76, .55) !important;
}

.botui-actions-buttons-button.cj-value-recursos:hover,
.botui-actions-buttons-button.cj-value-guias:hover,
.botui-actions-buttons-button.cj-value-tecnologia_derecho:hover,
.botui-actions-buttons-button.cj-value-guia_tecnologia:hover,
.botui-actions-buttons-button.cj-value-escalas:hover,
.botui-actions-buttons-button.cj-value-calculadoras:hover,
.botui-actions-buttons-button.cj-value-calc_lrt:hover,
.botui-actions-buttons-button.cj-value-baremo_lrt:hover,
.botui-actions-buttons-button.cj-value-guia_art:hover {
  background: var(--cj-navy) !important;
  color: var(--cj-white) !important;
  border-color: var(--cj-navy) !important;
}

/* ── Animación de entrada de botones ─────────────────── */
.botui-actions-buttons-button {
  animation: cj-btnIn .2s ease-out both;
}

.botui-actions-buttons-button:nth-child(2) {
  animation-delay: .05s;
}

.botui-actions-buttons-button:nth-child(3) {
  animation-delay: .10s;
}

.botui-actions-buttons-button:nth-child(4) {
  animation-delay: .15s;
}

.botui-actions-buttons-button:nth-child(5) {
  animation-delay: .20s;
}

.botui-actions-buttons-button:nth-child(6) {
  animation-delay: .25s;
}

.botui-actions-buttons-button:nth-child(7) {
  animation-delay: .30s;
}

@keyframes cj-btnIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════════════════════════════════
   FOOTER "powered by" sutil
══════════════════════════════════════════════════════════ */
#cj-footer {
  padding: 5px 14px 7px;
  background: rgba(248, 246, 241, .95);
  border-top: 1px solid rgba(26, 39, 68, .06);
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

#cj-footer span {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 11.5px;
  color: var(--cj-muted);
  letter-spacing: .2px;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
.cj-search-help,
.cj-search-no-results {
  box-sizing: border-box;
  max-width: 850px;
  margin: 26px auto 0;
  padding: 22px;
  border: 1px solid #d7e4f0;
  border-radius: 14px;
  background: #f7fbff;
  box-shadow: 0 8px 24px rgba(26, 58, 92, .08);
}

.cj-search-help {
  display: flex;
  align-items: center;
  gap: 18px;
}

.cj-search-help-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  background: var(--cj-navy);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cj-search-help-content h2,
.cj-search-no-results strong {
  display: block;
  margin: 0 0 7px;
  color: #1a2940;
  font-size: 20px;
  line-height: 1.3;
}

.cj-search-help-content p,
.cj-search-no-results p {
  margin: 0 0 14px;
  color: #526273;
  font-size: 15px;
  line-height: 1.55;
}

.cj-search-help-button {
  min-height: 44px;
  padding: 11px 18px;
  border: 0;
  border-radius: 8px;
  background: #0878bd;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}

.cj-search-help-button:hover,
.cj-search-help-button:focus-visible {
  background: #05649e;
  color: #fff;
  transform: translateY(-1px);
}

.cj-search-no-results {
  border-color: #f2cf83;
  background: #fffaf0;
}

.cj-search-no-results[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  :root {
    --cj-w: auto;
    --cj-h: auto;
  }

  #cj-widget {
    top: max(8px, env(safe-area-inset-top));
    right: 8px;
    left: 8px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: auto;
    height: auto !important;
    max-height: none !important;
    border-radius: 12px;
  }

  #cj-launcher {
    left: 14px;
    bottom: 14px;
    max-width: calc(100vw - 28px);
  }

  .botui-actions-buttons-button {
    min-height: 46px !important;
    font-size: 14.5px !important;
    padding: 10px 12px !important;
    text-align: left !important;
  }

  .botui-actions-container {
    max-height: min(38dvh, 300px) !important;
    padding: 8px 9px 10px !important;
  }

  .botui-actions-buttons {
    grid-template-columns: 1fr !important;
    max-height: calc(min(38dvh, 300px) - 18px) !important;
    gap: 7px !important;
  }

  .botui-messages-container {
    padding: 13px 11px 10px !important;
  }

  .botui-message-content {
    max-width: 92% !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
  }

  .cj-search-help,
  .cj-search-no-results {
    margin: 22px 12px 0;
    padding: 18px;
  }

  .cj-search-help {
    align-items: flex-start;
  }

  .cj-search-help-icon {
    font-size: 28px;
  }

  .cj-search-help-content h2,
  .cj-search-no-results strong {
    font-size: 18px;
  }

  .cj-search-help-button {
    width: 100%;
  }
}

@media (max-width: 360px) {
  #cj-header {
    gap: 7px;
    padding: 10px;
  }

  .cj-avatar {
    width: 34px;
    height: 34px;
  }

  .cj-header-name {
    font-size: 13.5px;
  }

  #cj-reset-btn {
    font-size: 12px;
    padding: 5px 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #cj-launcher,
  #cj-widget,
  #cj-badge,
  #cj-badge::after,
  .botui-actions-buttons-button,
  .botui-message-content,
  .botui-message-content.loading {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
