.jl-ia-open { overflow: hidden; }
.jl-ia-overlay[hidden] { display: none !important; }
.jl-ia-login[hidden],
.jl-ia-chat[hidden],
.jl-ia-error[hidden],
.jl-ia-typing[hidden] { display: none !important; }
.jl-ia-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 27, 45, .58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: inherit;
}
.jl-ia-dialog {
  width: min(470px, 100%);
  height: min(720px, calc(100dvh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #082d46;
  background: linear-gradient(180deg, #fff 0%, #f4fbff 100%);
  border: 1px solid rgba(54, 169, 225, .26);
  border-radius: 30px;
  box-shadow: 0 30px 90px rgba(3, 32, 53, .3);
}
.jl-ia-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  color: #fff;
  background: linear-gradient(135deg, #073856, #086b9c 58%, #1d71b8);
}
.jl-ia-brand { display: flex; align-items: center; gap: 12px; }
.jl-ia-brand > div { display: grid; gap: 2px; }
.jl-ia-brand strong { font-size: 18px; letter-spacing: .03em; }
.jl-ia-brand small { font-size: 11px; color: rgba(255,255,255,.76); letter-spacing: .06em; text-transform: uppercase; }
.jl-ia-orbit {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #f9b233;
  border: 1px solid rgba(249,178,51,.7);
  border-radius: 50%;
  box-shadow: inset 0 0 0 7px rgba(249,178,51,.08), 0 0 24px rgba(54,169,225,.3);
}
.jl-ia-close, .jl-ia-text-button, .jl-ia-primary, .jl-ia-send, .jl-ia-starter { font: inherit; cursor: pointer; }
.jl-ia-close {
  width: 42px;
  height: 42px;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
}
.jl-ia-error { margin: 12px 18px 0; padding: 10px 12px; color: #8a2f20; font-size: 13px; background: #fff1ed; border: 1px solid #ffd0c5; border-radius: 12px; }
.jl-ia-login { padding: 30px 28px; overflow-y: auto; }
.jl-ia-eyebrow { color: #1d71b8; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.jl-ia-login h2 { margin: 10px 0 10px; font-size: 32px; line-height: 1.08; }
.jl-ia-login > p { margin: 0 0 24px; color: #587083; font-size: 15px; line-height: 1.65; }
.jl-ia-field { display: grid; gap: 8px; color: #294b61; font-size: 13px; font-weight: 650; }
.jl-ia-field input, .jl-ia-composer textarea {
  width: 100%;
  box-sizing: border-box;
  color: #082d46;
  background: #fff;
  border: 1px solid #c9e2ef;
  outline: none;
}
.jl-ia-code-control { position: relative; display: block; }
.jl-ia-field input { height: 52px; padding: 0 86px 0 15px; border-radius: 14px; }
.jl-ia-toggle-code { position: absolute; top: 50%; right: 9px; transform: translateY(-50%); padding: 8px 9px; color: #1d71b8; font: inherit; font-size: 11px; font-weight: 750; background: #f1f8fc; border: 0; border-radius: 9px; cursor: pointer; }
.jl-ia-toggle-code:focus-visible { outline: 2px solid #36a9e1; outline-offset: 2px; }
.jl-ia-field input:focus, .jl-ia-composer textarea:focus { border-color: #36a9e1; box-shadow: 0 0 0 4px rgba(54,169,225,.12); }
.jl-ia-consent { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; margin: 18px 0; color: #587083; font-size: 12px; line-height: 1.5; }
.jl-ia-consent input { margin-top: 3px; accent-color: #1d71b8; }
.jl-ia-primary {
  width: 100%;
  min-height: 52px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #1d71b8, #087aa9);
  border: 0;
  border-radius: 15px;
  box-shadow: 0 12px 24px rgba(29,113,184,.2);
}
.jl-ia-primary:disabled, .jl-ia-send:disabled { opacity: .55; cursor: wait; }
.jl-ia-privacy { display: block; margin-top: 14px; color: #7b8d99; text-align: center; line-height: 1.45; }
.jl-ia-chat { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.jl-ia-toolbar { display: flex; justify-content: space-between; padding: 9px 16px; border-bottom: 1px solid #dcecf4; }
.jl-ia-text-button { padding: 6px; color: #1d71b8; font-size: 11px; background: transparent; border: 0; }
.jl-ia-messages { min-height: 0; flex: 1; overflow-y: auto; padding: 18px 16px; scroll-behavior: smooth; }
.jl-ia-message { display: grid; gap: 5px; margin-bottom: 16px; }
.jl-ia-message--user { justify-items: end; }
.jl-ia-message-label { color: #78909f; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.jl-ia-message-body { max-width: 88%; padding: 12px 14px; font-size: 14px; line-height: 1.58; white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; border: 1px solid #dcecf4; border-radius: 5px 18px 18px 18px; box-shadow: 0 7px 20px rgba(8,45,70,.06); }
.jl-ia-message--user .jl-ia-message-body { color: #fff; background: #1d71b8; border-color: #1d71b8; border-radius: 18px 5px 18px 18px; }
.jl-ia-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.jl-ia-sources { max-width: 88%; color: #668091; font-size: 10px; line-height: 1.45; }
.jl-ia-typing { padding: 0 18px 8px; color: #1d71b8; font-size: 11px; }
.jl-ia-starters-wrap { padding: 0; background: transparent; border-top: 0; }
.jl-ia-starters-title { display: none; }
.jl-ia-starters { display: flex; gap: 7px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.jl-ia-starters::-webkit-scrollbar { display: none; }
.jl-ia-starter { flex: 0 0 auto; width: auto; max-width: 220px; min-height: 40px; padding: 8px 11px; color: #1d71b8; font-size: 11px; line-height: 1.28; text-align: center; overflow-wrap: anywhere; background: #fff; border: 1px solid #c9e2ef; border-radius: 999px; }
.jl-ia-starter:hover { background: #f1f8fc; border-color: #8ec9e6; }
.jl-ia-starter:focus-visible { outline: 2px solid #36a9e1; outline-offset: 2px; }
.jl-ia-composer { display: grid; grid-template-columns: 1fr auto; gap: 9px; padding: 10px 14px; background: rgba(255,255,255,.92); border-top: 1px solid #dcecf4; }
.jl-ia-composer textarea { min-height: 48px; max-height: 110px; resize: none; padding: 12px; border-radius: 14px; }
.jl-ia-send { align-self: stretch; padding: 0 17px; color: #082d46; font-weight: 750; background: #f9b233; border: 0; border-radius: 14px; }
.jl-ia-disclaimer { margin: 0; padding: 0 14px 10px; color: #7b8d99; font-size: 9px; line-height: 1.35; text-align: center; background: rgba(255,255,255,.92); }
/* El modo de escritorio se determina por el dispositivo apuntador, no por el
   ancho de la ventana. Así, una ventana estrecha en PC no recibe el carrusel
   móvil y un teléfono conserva su desplazamiento horizontal. */
@media (hover: hover) and (pointer: fine) {
  .jl-ia-starters-wrap { padding: 8px 14px 10px; background: rgba(255,255,255,.72); border-top: 1px solid #dcecf4; }
  .jl-ia-starters-title { display: block; margin: 0 0 7px 2px; color: #668091; font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
  .jl-ia-starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; overflow: visible; padding: 0; }
  .jl-ia-starter { width: 100%; max-width: none; min-width: 0; font-size: 10px; text-align: left; border-radius: 13px; }
}
@media (max-width: 640px) {
  .jl-ia-overlay { place-items: end center; padding: 0; background: rgba(4,27,45,.44); }
  .jl-ia-dialog { width: 100%; height: min(88dvh, 820px); border-radius: 26px 26px 0 0; border-bottom: 0; }
  .jl-ia-header { min-height: 70px; padding: 10px 14px; }
  .jl-ia-brand small { font-size: 9px; }
  .jl-ia-login { padding: 24px 20px; }
  .jl-ia-login h2 { font-size: 28px; }
  .jl-ia-message-body { max-width: 92%; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .jl-ia-messages { scroll-behavior: auto; } }
