/* ==========================================================
   Letthe Lightin assistant — styles (loaded by chatbot.js)
   Site palette: sage #597266 / #46594f, deep green #2f3d36, champagne #b0915f / #d9c39a, ivory #FAF7F2
   px only, 4px corners (circles use 9999px), durations in ms
   ========================================================== */
.llc { --llc-sage: #597266; --llc-sage-dark: #46594f; --llc-deep: #2f3d36; --llc-gold: #b0915f; --llc-gold-light: #d9c39a;
  --llc-ivory: #faf7f2; --llc-line: #dcd5c9; --llc-ink: #2a2a27; --llc-body: #5f5e59; --llc-muted: #8a8983;
  font-family: Lato, system-ui, sans-serif; }
.llc *, .llc *::before, .llc *::after { box-sizing: border-box; }

/* Launcher */
.llc-launcher { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: 56px; height: 56px; display: grid; place-items: center;
  border: 0; border-radius: 9999px; background: var(--llc-sage); color: #fff; cursor: pointer;
  box-shadow: 0 12px 28px rgb(70 89 79 / 35%); transition: background-color 300ms, transform 300ms, opacity 300ms; }
.llc-launcher:hover { background: var(--llc-sage-dark); transform: translateY(-2px); }
.llc-launcher:focus-visible { outline: 2px solid var(--llc-gold); outline-offset: 3px; }
.llc-launcher svg { grid-area: 1 / 1; transition: opacity 250ms, transform 250ms; }
.llc-ic-close { opacity: 0; transform: rotate(-90deg); }
.llc.is-open .llc-ic-chat { opacity: 0; transform: rotate(90deg); }
.llc.is-open .llc-ic-close { opacity: 100%; transform: none; }
.llc-ping { position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 9999px; background: var(--llc-gold); border: 2px solid #fff; }
.llc.is-seen .llc-ping { display: none; }
.llc.is-hidden .llc-launcher { opacity: 0; pointer-events: none; }

/* Panel */
.llc-panel { position: fixed; right: 20px; bottom: 88px; z-index: 81; width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; overflow: hidden;
  border-radius: 4px; background: #fff; border: 1px solid var(--llc-line); box-shadow: 0 24px 64px rgb(31 38 34 / 28%);
  opacity: 0; transform: translateY(12px); transition: opacity 250ms ease-out, transform 250ms ease-out; }
.llc-panel[hidden] { display: none; }
.llc.is-open .llc-panel { opacity: 100%; transform: none; }

.llc-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--llc-deep); color: #fff; flex: none; }
.llc-avatar { flex: none; width: 40px; height: 40px; border-radius: 9999px; object-fit: cover; border: 2px solid var(--llc-gold-light); }
.llc-head-text { flex: 1; min-width: 0; }
.llc-name { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 20px; line-height: 24px; font-weight: 500; }
.llc-status { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 12px; line-height: 16px; color: rgb(255 255 255 / 75%); }
.llc-dot { width: 8px; height: 8px; border-radius: 9999px; background: #7fc495; box-shadow: 0 0 0 3px rgb(127 196 149 / 25%); }
.llc-close { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgb(255 255 255 / 25%); border-radius: 9999px;
  background: none; color: #fff; cursor: pointer; transition: background-color 300ms, color 300ms; }
.llc-close:hover { background: #fff; color: var(--llc-deep); }

.llc-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--llc-ivory); scroll-behavior: smooth; }
.llc-msg { max-width: 88%; font-size: 14px; line-height: 22px; animation: llcIn 300ms ease-out both; }
.llc-msg.is-bot { align-self: flex-start; }
.llc-msg.is-user { align-self: flex-end; }
.llc-bubble { padding: 10px 14px; border-radius: 4px; white-space: pre-line; overflow-wrap: anywhere; }
.llc-msg.is-bot .llc-bubble { background: #fff; border: 1px solid var(--llc-line); color: var(--llc-ink); }
.llc-msg.is-user .llc-bubble { background: var(--llc-sage); color: #fff; }
@keyframes llcIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 100%; transform: none; } }

/* Typing dots */
.llc-typing .llc-bubble { display: flex; gap: 4px; padding: 14px; }
.llc-typing i { width: 6px; height: 6px; border-radius: 9999px; background: var(--llc-muted); animation: llcDot 1000ms infinite ease-in-out; }
.llc-typing i:nth-child(2) { animation-delay: 150ms; }
.llc-typing i:nth-child(3) { animation-delay: 300ms; }
@keyframes llcDot { 0%, 80%, 100% { opacity: 30%; transform: none; } 40% { opacity: 100%; transform: translateY(-3px); } }

/* Link cards */
.llc-card { display: block; margin-top: 8px; padding: 10px 12px; border-radius: 4px; border: 1px solid var(--llc-line); background: var(--llc-ivory);
  color: var(--llc-ink); text-decoration: none; white-space: normal; transition: border-color 300ms, background-color 300ms; }
.llc-card:hover { border-color: var(--llc-sage); background: #fff; }
.llc-card-t { display: block; font-family: "Cormorant Garamond", Georgia, serif; font-size: 18px; line-height: 22px; font-weight: 500; color: var(--llc-deep); }
.llc-card-d { display: block; margin-top: 2px; font-size: 12px; line-height: 18px; color: var(--llc-body); }
.llc-card-m { display: block; margin-top: 4px; font-size: 11px; line-height: 16px; color: var(--llc-gold); }
.llc-card-go { display: inline-block; margin-top: 6px; font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--llc-sage); }

/* Quick actions */
.llc-quick { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; flex: none; border-top: 1px solid var(--llc-line); background: #fff; scrollbar-width: none; }
.llc-quick::-webkit-scrollbar { display: none; }
.llc-quick:empty { display: none; }
.llc-chip { flex: none; padding: 6px 12px; border: 1px solid var(--llc-line); border-radius: 9999px; background: #fff; color: var(--llc-deep);
  font: inherit; font-size: 12px; line-height: 16px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background-color 300ms, color 300ms, border-color 300ms; }
.llc-chip:hover { background: var(--llc-sage); border-color: var(--llc-sage); color: #fff; }

/* Input */
.llc-form { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--llc-line); background: #fff; flex: none; }
.llc-form input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid var(--llc-line); border-radius: 4px; background: var(--llc-ivory);
  font: inherit; font-size: 14px; color: var(--llc-ink); outline: none; transition: border-color 300ms, background-color 300ms; }
.llc-form input:focus { border-color: var(--llc-sage); background: #fff; }
.llc-form input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgb(89 114 102 / 15%); }
.llc-send { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 4px; background: var(--llc-sage); color: #fff; cursor: pointer; transition: background-color 300ms; }
.llc-send:hover { background: var(--llc-sage-dark); }

@media (max-width: 480px) {
  .llc-launcher { right: 14px; bottom: 14px; width: 52px; height: 52px; }
  .llc-panel { right: 12px; left: 12px; bottom: 76px; width: auto; max-width: none; height: min(72vh, 560px); }
}
@media (prefers-reduced-motion: reduce) {
  .llc-msg, .llc-typing i { animation: none; }
  .llc-panel, .llc-launcher, .llc-launcher svg { transition: none; }
}
