/* ═══════════════════════════════════════════════════════════════════════
   Lix · widget conversacional Padellix
   Paleta editorial Padellix · NO neón, NO chat-cutre
   ═══════════════════════════════════════════════════════════════════════ */

.lix-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink, #0A0A0A);
  color: var(--paper, #F5F1EA);
  padding: 12px 18px 12px 14px;
  font-family: var(--sans, 'Inter', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  border: 1px solid var(--ink, #0A0A0A);
  border-bottom: 2px solid var(--accent, #D9572B);
  cursor: pointer;
  transition: transform .2s var(--ease, cubic-bezier(.2,.8,.2,1)), background .2s, box-shadow .2s;
  box-shadow:
    0 12px 28px -10px rgba(10,10,10,.32),
    0 4px 10px -3px rgba(10,10,10,.18);
  text-decoration: none;
  user-select: none;
}
.lix-launcher:hover {
  background: var(--accent, #D9572B);
  border-color: var(--accent, #D9572B);
  transform: translateY(-2px);
}
.lix-launcher-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #D9572B);
  box-shadow: 0 0 0 0 rgba(217,87,43,.6);
  animation: lix-pulse 2.4s ease-in-out infinite;
}
.lix-launcher:hover .lix-launcher-dot { background: var(--paper, #F5F1EA); }
@keyframes lix-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,87,43,.5); }
  50%      { box-shadow: 0 0 0 8px rgba(217,87,43,0); }
}
.lix-launcher-label-short { display: none; }

@media (max-width: 480px) {
  .lix-launcher {
    right: 12px;
    bottom: 12px;
    padding: 10px 14px 10px 12px;
    font-size: 12px;
  }
  .lix-launcher-label-long { display: none; }
  .lix-launcher-label-short { display: inline; }
}

/* ═══════════ panel ═══════════ */
.lix-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
  width: min(420px, calc(100vw - 32px));
  max-height: min(640px, calc(100vh - 48px));
  background: var(--paper, #F5F1EA);
  border: 1px solid var(--ink, #0A0A0A);
  border-top: 3px solid var(--accent, #D9572B);
  display: none;
  flex-direction: column;
  font-family: var(--sans, 'Inter', system-ui, sans-serif);
  box-shadow:
    0 30px 60px -20px rgba(10,10,10,.32),
    0 12px 24px -8px rgba(10,10,10,.18);
  overflow: hidden;
}
.lix-panel.is-open { display: flex; }
@media (max-width: 480px) {
  .lix-panel {
    right: 8px;
    left: 8px;
    bottom: 8px;
    width: auto;
    max-height: calc(100vh - 16px);
  }
}

.lix-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--paper-3, #DED7CB);
  background: var(--paper-2, #EBE6DD);
}
.lix-head-meta { display: flex; flex-direction: column; gap: 4px; }
.lix-head-kicker {
  font-family: var(--mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent, #D9572B);
}
.lix-head-name {
  font-family: var(--serif, 'Fraunces', Georgia, serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.012em;
  color: var(--ink, #0A0A0A);
  line-height: 1.1;
}
.lix-head-deck {
  font-size: 12px;
  color: var(--ink-3, #6A6660);
  margin-top: 2px;
}
.lix-head-close {
  background: transparent;
  border: 0;
  padding: 4px 6px;
  cursor: pointer;
  color: var(--ink-3, #6A6660);
  font-size: 18px;
  line-height: 1;
}
.lix-head-close:hover { color: var(--ink, #0A0A0A); }

/* ═══════════ stream ═══════════ */
.lix-stream {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--paper, #F5F1EA);
}

.lix-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  font-size: 13.5px;
  line-height: 1.55;
}
.lix-msg-meta {
  font-family: var(--mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3, #6A6660);
  margin-bottom: 4px;
}
.lix-msg-bubble {
  padding: 10px 14px;
  border: 1px solid transparent;
}
.lix-msg-bubble strong {
  font-weight: 600;
  color: var(--accent, #D9572B);
}

.lix-msg--bot { align-self: flex-start; }
.lix-msg--bot .lix-msg-bubble {
  background: var(--paper-2, #EBE6DD);
  border-color: var(--paper-3, #DED7CB);
  color: var(--ink, #0A0A0A);
  border-left: 2px solid var(--accent, #D9572B);
}
.lix-msg--bot .lix-msg-meta::before { content: "● "; color: var(--accent, #D9572B); }

.lix-msg--user { align-self: flex-end; align-items: flex-end; }
.lix-msg--user .lix-msg-bubble {
  background: var(--ink, #0A0A0A);
  color: var(--paper, #F5F1EA);
}
.lix-msg--user .lix-msg-bubble strong { color: var(--accent, #D9572B); }

.lix-typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--paper-2, #EBE6DD);
  border: 1px solid var(--paper-3, #DED7CB);
  border-left: 2px solid var(--accent, #D9572B);
}
.lix-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3, #6A6660);
  animation: lix-typing 1.2s ease-in-out infinite;
}
.lix-typing span:nth-child(2) { animation-delay: .15s; }
.lix-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes lix-typing {
  0%, 80%, 100% { transform: translateY(0); opacity: .5; }
  40%           { transform: translateY(-4px); opacity: 1; }
}

/* ═══════════ form ═══════════ */
.lix-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 12px;
  border-top: 1px solid var(--paper-3, #DED7CB);
  background: var(--paper-2, #EBE6DD);
}
.lix-input {
  flex: 1;
  background: var(--paper, #F5F1EA);
  border: 1px solid var(--paper-3, #DED7CB);
  padding: 10px 12px;
  font-family: var(--sans, 'Inter', system-ui, sans-serif);
  font-size: 13.5px;
  color: var(--ink, #0A0A0A);
  outline: none;
  transition: border-color .15s;
}
.lix-input:focus { border-color: var(--ink, #0A0A0A); }
.lix-input::placeholder { color: var(--ink-3, #6A6660); }

.lix-send {
  background: var(--ink, #0A0A0A);
  color: var(--paper, #F5F1EA);
  border: 1px solid var(--ink, #0A0A0A);
  border-left: none;
  padding: 0 16px;
  font-family: var(--sans, 'Inter', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .15s;
}
.lix-send:hover { background: var(--accent, #D9572B); border-color: var(--accent, #D9572B); }
.lix-send:disabled { opacity: .5; cursor: not-allowed; }

.lix-foot {
  padding: 8px 14px 12px;
  font-family: var(--mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3, #6A6660);
  background: var(--paper-2, #EBE6DD);
  text-align: center;
  border-top: 1px solid var(--paper-3, #DED7CB);
}
.lix-foot-accent { color: var(--accent, #D9572B); }
