/* Homepage lead chat (src/js/lead-chat.js). Dark, neutral, one pink accent. */
.lc-launch {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px 8px 8px; border-radius: 999px;
  background: rgba(24, 24, 24, .92); color: var(--fg);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font: 500 15px/1 var(--font-sans); cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), border-color .2s;
}
.lc-launch:hover { border-color: rgba(236, 111, 196, .55); transform: translateY(-1px); }
.lc-launch:active { transform: scale(.97); }
.lc-launch img { width: 28px; height: 28px; border-radius: 50%; }
.lc-open .lc-launch { opacity: 0; pointer-events: none; }

.lc-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 61;
  width: 380px; height: min(600px, calc(100dvh - 40px));
  display: flex; flex-direction: column;
  background: #141414; color: var(--fg);
  border: 1px solid var(--line-strong); border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
  font-family: var(--font-sans); overflow: hidden;
  transform-origin: bottom right; animation: lc-in .22s cubic-bezier(.2, .8, .2, 1);
}
.lc-panel[hidden] { display: none; }
@keyframes lc-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.lc-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 14px 16px; border-bottom: 1px solid var(--line); }
.lc-head img { border-radius: 50%; }
.lc-head div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lc-head strong { font-weight: 500; font-size: 15px; }
.lc-head span { font-size: 12px; color: var(--muted); }
.lc-icon { position: relative; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.lc-icon:hover { background: rgba(255, 255, 255, .06); color: var(--fg); }
.lc-icon svg { width: 16px; height: 16px; }

.lc-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.lc-b { max-width: 85%; margin: 0; padding: 9px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; animation: lc-pop .18s ease-out; }
.lc-b--bot { align-self: flex-start; background: rgba(255, 255, 255, .06); border-bottom-left-radius: 4px; }
.lc-b--user { align-self: flex-end; background: linear-gradient(135deg, #b84f9c, #8a4fbf); color: #fff; border-bottom-right-radius: 4px; }
@keyframes lc-pop { from { opacity: 0; transform: translateY(4px); } }
.lc-typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.lc-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: lc-dot 1s infinite ease-in-out; }
.lc-typing i:nth-child(2) { animation-delay: .15s; }
.lc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes lc-dot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-2px); } }

.lc-foot { padding: 12px 14px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.lc-foot:empty { display: none; }
.lc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lc-chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--fg); font: 400 14px/1 var(--font-sans); cursor: pointer; transition: border-color .15s, background .15s; }
.lc-chip:hover { border-color: rgba(236, 111, 196, .6); background: rgba(236, 111, 196, .08); }
.lc-chip:focus-visible, .lc-primary:focus-visible, .lc-send:focus-visible, .lc-launch:focus-visible, .lc-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lc-chip--ghost { align-self: flex-start; color: var(--muted); border-color: var(--line); }

.lc-form { display: flex; gap: 8px; align-items: flex-end; }
.lc-input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .03); color: var(--fg); font: 400 16px/1.4 var(--font-sans); resize: none; }
.lc-input:focus { outline: none; border-color: rgba(236, 111, 196, .6); }
.lc-send { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--fg); color: #000; cursor: pointer; }
.lc-send svg { width: 16px; height: 16px; }
.lc-err { margin: 0; font-size: 13px; color: #fca5a5; }
.lc-note { margin: 0; font-size: 13px; color: var(--muted); }

.lc-sum { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13.5px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); max-height: 170px; overflow-y: auto; }
.lc-sum dt { color: var(--muted); }
.lc-sum dd { margin: 0; overflow-wrap: anywhere; }
.lc-actions { display: flex; gap: 8px; align-items: center; }
.lc-primary { min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--fg); color: #000; font: 500 14.5px/1 var(--font-sans); cursor: pointer; }
.lc-primary:disabled { opacity: .6; cursor: default; }
.lc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 520px) {
  .lc-launch { right: 14px; bottom: 14px; }
  .lc-panel { inset: 0; width: auto; height: 100dvh; border-radius: 0; border: 0; }
  .lc-open, .lc-open body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .lc-panel, .lc-b, .lc-typing i { animation: none; }
}
