.lta-copiloto-root,
.lta-copiloto-root * { box-sizing: border-box; }

.lta-copiloto-root {
  --lta-cp-bg: #0b0710;
  --lta-cp-card: #140d1c;
  --lta-cp-card-2: #1b1225;
  --lta-cp-text: #fff9ff;
  --lta-cp-muted: #bfb4c9;
  --lta-cp-purple: #a41dd0;
  --lta-cp-cyan: #51d9ff;
  --lta-cp-green: #21d976;
  font-family: Sora, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
  color: var(--lta-cp-text) !important;
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(104px, calc(env(safe-area-inset-bottom) + 86px));
  z-index: 2147483000;
  isolation: isolate;
}

.lta-copiloto-root button,
.lta-copiloto-root textarea,
.lta-copiloto-root a { font: inherit !important; text-transform: none !important; letter-spacing: 0 !important; }
.lta-copiloto-root .screen-reader-text { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.lta-copiloto-launcher {
  appearance: none !important; border: 1px solid rgba(255,255,255,.17) !important;
  border-radius: 999px !important; background: linear-gradient(135deg, #7614a3, #b221dd 58%, #5c1dd0) !important;
  color: #fff !important; min-width: 64px; height: 64px; padding: 6px 18px 6px 8px !important;
  display: flex !important; align-items: center; gap: 10px; cursor: pointer;
  box-shadow: 0 16px 48px rgba(164,29,208,.42), inset 0 1px rgba(255,255,255,.28) !important;
  transition: transform .22s ease, box-shadow .22s ease;
}
.lta-copiloto-launcher:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 20px 60px rgba(164,29,208,.56) !important; }
.lta-copiloto-launcher:focus-visible,
.lta-copiloto-panel button:focus-visible,
.lta-copiloto-panel textarea:focus-visible,
.lta-copiloto-panel a:focus-visible { outline: 3px solid var(--lta-cp-cyan) !important; outline-offset: 3px !important; }
.lta-copiloto-launcher-label { font-size: 13px !important; font-weight: 800 !important; white-space: nowrap; }

.lta-copiloto-robot { width: 48px; height: 48px; display: inline-grid; place-items: center; position: relative; flex: 0 0 48px; }
.lta-copiloto-head { width: 38px; height: 30px; border: 2px solid rgba(255,255,255,.9); border-radius: 11px; background: linear-gradient(180deg,#251333,#100919); display: flex; align-items: center; justify-content: center; gap: 7px; box-shadow: inset 0 0 18px rgba(81,217,255,.18); }
.lta-copiloto-head i { width: 6px; height: 8px; border-radius: 50%; background: var(--lta-cp-cyan); box-shadow: 0 0 10px var(--lta-cp-cyan); animation: lta-cp-blink 4.2s infinite; }
.lta-copiloto-antenna { position: absolute; top: 2px; width: 2px; height: 8px; background: #fff; }
.lta-copiloto-antenna::before { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--lta-cp-cyan); left: -2px; top: -3px; box-shadow: 0 0 10px var(--lta-cp-cyan); }

.lta-copiloto-panel {
  position: absolute; right: 0; bottom: 76px; width: min(390px, calc(100vw - 28px)); height: min(620px, calc(100dvh - 150px));
  display: grid; grid-template-rows: auto minmax(0,1fr) auto auto auto; overflow: hidden;
  border: 1px solid rgba(255,255,255,.16); border-radius: 24px; background: radial-gradient(circle at 80% 0, rgba(164,29,208,.18), transparent 38%), var(--lta-cp-bg);
  color: var(--lta-cp-text) !important; box-shadow: 0 30px 100px rgba(0,0,0,.66);
  opacity: 0; visibility: hidden; transform: translateY(18px) scale(.96); transform-origin: right bottom;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.lta-copiloto-root[data-state="open"] .lta-copiloto-panel { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.lta-copiloto-header { min-height: 78px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.1); background: rgba(20,13,28,.92); }
.lta-copiloto-avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg,#8f1aba,#441075); }
.lta-copiloto-avatar .lta-copiloto-robot { transform: scale(.77); }
.lta-copiloto-header > span:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.lta-copiloto-header strong { color: #fff !important; font-size: 15px !important; font-weight: 800 !important; }
.lta-copiloto-header small { color: var(--lta-cp-muted) !important; font-size: 11px !important; display: flex; align-items: center; gap: 5px; }
.lta-copiloto-header small i { width: 7px; height: 7px; border-radius: 50%; background: var(--lta-cp-green); box-shadow: 0 0 8px var(--lta-cp-green); }
.lta-copiloto-close,.lta-copiloto-reset { width: 36px !important; height: 36px !important; padding: 0 !important; border: 1px solid rgba(255,255,255,.12) !important; border-radius: 11px !important; background: rgba(255,255,255,.04) !important; color: #fff !important; cursor: pointer; font-size: 21px !important; }

.lta-copiloto-messages { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 12px; scrollbar-width: thin; scrollbar-color: #5a3569 transparent; }
.lta-copiloto-message { display: flex; flex-direction: column; align-items: flex-start; margin: 0 0 14px; animation: lta-cp-in .24s ease both; }
.lta-copiloto-message.is-user { align-items: flex-end; }
.lta-copiloto-agent { margin: 0 0 5px 4px; color: #de8cff !important; font-size: 10px !important; font-weight: 800 !important; text-transform: uppercase !important; letter-spacing: .08em !important; }
.lta-copiloto-bubble { max-width: 88%; padding: 11px 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px 17px 17px 17px; background: var(--lta-cp-card-2); color: #f9f4fb !important; font-size: 13px !important; line-height: 1.58 !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.is-user .lta-copiloto-bubble { border-color: rgba(205,101,245,.32); border-radius: 17px 7px 17px 17px; background: linear-gradient(135deg,#76209b,#9a1dc0); color: #fff !important; }
.lta-copiloto-media { width: 88%; margin: 8px 0 0; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: var(--lta-cp-card); }
.lta-copiloto-media img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #100919; }
.lta-copiloto-media.is-contain img { aspect-ratio: 16 / 10; object-fit: contain; }
.lta-copiloto-media figcaption { padding: 8px 10px; color: var(--lta-cp-muted) !important; font-size: 10px !important; line-height: 1.4 !important; }
.lta-copiloto-message-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.lta-copiloto-message-actions a { min-height: 34px; display: inline-flex; align-items: center; padding: 7px 11px; border-radius: 999px; text-decoration: none !important; color: #fff !important; font-size: 11px !important; font-weight: 800 !important; }
.lta-copiloto-message-actions .is-whatsapp { background: #087c3c; border: 1px solid #20c871; }
.lta-copiloto-message-actions .is-page { background: #25182f; border: 1px solid #63416e; }
.lta-copiloto-message.is-loading .lta-copiloto-bubble { display: flex; gap: 5px; padding: 14px 16px; }
.lta-copiloto-message.is-loading i { width: 6px; height: 6px; border-radius: 50%; background: #d57cf5; animation: lta-cp-dot 1.1s infinite; }
.lta-copiloto-message.is-loading i:nth-child(2) { animation-delay: .14s; }.lta-copiloto-message.is-loading i:nth-child(3) { animation-delay: .28s; }

.lta-copiloto-suggestions { max-height: 190px; padding: 0 16px 10px; display: grid; grid-template-columns: minmax(0,1fr); gap: 7px; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #5a3569 transparent; }
.lta-copiloto-suggestions[hidden] { display: none !important; }
.lta-copiloto-suggestions button { width: 100%; min-width: 0; min-height: 38px; padding: 8px 12px !important; border: 1px solid rgba(213,124,245,.32) !important; border-radius: 13px !important; background: rgba(164,29,208,.08) !important; color: #eadcf0 !important; cursor: pointer; font-size: 11px !important; line-height: 1.4 !important; text-align: left !important; white-space: normal !important; overflow-wrap: anywhere; }
.lta-copiloto-suggestions button::after { content: "→"; float: right; margin-left: 10px; color: #df85ff; font-weight: 800; }
.lta-copiloto-suggestions button:hover { border-color: rgba(220,124,255,.68) !important; background: rgba(164,29,208,.16) !important; }
.lta-copiloto-form { margin: 0 12px 10px; padding: 7px 7px 7px 12px; display: flex; align-items: flex-end; gap: 7px; border: 1px solid rgba(255,255,255,.15); border-radius: 17px; background: #17101e; }
.lta-copiloto-form:focus-within { border-color: #c769e7; box-shadow: 0 0 0 3px rgba(164,29,208,.15); }
.lta-copiloto-form textarea { width: 100%; min-height: 36px; max-height: 110px; resize: none; padding: 8px 0 !important; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; color: #fff !important; font-size: 13px !important; line-height: 1.45 !important; }
.lta-copiloto-form textarea::placeholder { color: #918497 !important; opacity: 1; }
.lta-copiloto-form button { flex: 0 0 38px; width: 38px !important; height: 38px !important; padding: 0 !important; border: 0 !important; border-radius: 12px !important; background: linear-gradient(135deg,#9f1bc9,#6417b6) !important; color: #fff !important; cursor: pointer; font-size: 20px !important; }
.lta-copiloto-form button:disabled { opacity: .45; cursor: wait; }
.lta-copiloto-panel footer { min-height: 34px; padding: 0 14px 10px; display: flex; justify-content: space-between; gap: 10px; color: #8d8292 !important; font-size: 9px !important; }
.lta-copiloto-panel footer a { color: #72e5aa !important; font-size: 10px !important; font-weight: 800 !important; text-decoration: none !important; }

@keyframes lta-cp-in { from { opacity: 0; transform: translateY(7px); } }
@keyframes lta-cp-dot { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes lta-cp-blink { 0%,46%,50%,100% { transform: scaleY(1); } 48% { transform: scaleY(.12); } }

@media (max-width: 600px) {
  .lta-copiloto-root { right: max(12px, env(safe-area-inset-right)); bottom: max(86px, calc(env(safe-area-inset-bottom) + 72px)); }
  .lta-copiloto-launcher { width: 58px; height: 58px; padding: 5px !important; justify-content: center; }
  .lta-copiloto-launcher-label { display: none; }
  .lta-copiloto-panel { position: fixed; right: 8px; left: 8px; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; height: min(720px, calc(100dvh - 16px)); max-height: none; border-radius: 24px; transform-origin: center bottom; }
}

@media (prefers-reduced-motion: reduce) {
  .lta-copiloto-root *, .lta-copiloto-root *::before, .lta-copiloto-root *::after { animation: none !important; transition-duration: .01ms !important; }
}
