/* ==========================================================================
   Embeddable chat widget styles — Intercom-style Messenger.
   Everything themeable is a CSS variable on .lc-root, set at runtime from the
   server config. Reskinning a resold bot = change those variables, nothing else.
   All selectors are namespaced `.lc-` so this never clashes with a host site.
   ========================================================================== */

.lc-root {
  --lc-accent: #5b86ff;
  --lc-accent2: #9a7bff;
  --lc-bg: #ffffff;
  --lc-text: #0f1222;
  --lc-muted: #6b7280;
  --lc-user: #5b86ff;
  --lc-radius: 20px;
  --lc-surface: #f3f5fa;
  --lc-border: rgba(15, 18, 34, 0.08);
  --lc-shadow: 0 24px 60px -16px rgba(20, 24, 60, 0.34), 0 8px 20px -10px rgba(20, 24, 60, 0.16);
  --lc-z: 2147483000;

  position: fixed !important;
  bottom: 22px !important;
  z-index: var(--lc-z) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--lc-text);
}
.lc-root.lc-right { right: 22px !important; }
.lc-root.lc-left  { left: 22px !important; }

/* ---- Launcher ---- */
.lc-launcher {
  width: 52px; height: 52px; border-radius: 17px;
  border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--lc-accent), var(--lc-accent2));
  box-shadow: 0 10px 26px -8px rgba(20, 24, 60, 0.44);
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: transform .16s ease, box-shadow .16s ease;
  position: relative;
}
.lc-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(20, 24, 60, 0.48); }
.lc-launcher:active { transform: scale(.96); }
.lc-launcher svg { width: 23px; height: 23px; }
.lc-launcher .lc-ico-open, .lc-launcher .lc-ico-close { transition: opacity .18s, transform .18s; }
.lc-launcher .lc-ico-close { position: absolute; opacity: 0; transform: rotate(-45deg) scale(.7); }
.lc-root.lc-open .lc-launcher .lc-ico-open  { opacity: 0; transform: rotate(45deg) scale(.7); }
.lc-root.lc-open .lc-launcher .lc-ico-close { opacity: 1; transform: rotate(0) scale(1); }

.lc-badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 19px; height: 19px; padding: 0 5px;
  background: #ff4d6d; color: #fff; border-radius: 10px;
  font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
  border: 2px solid var(--lc-bg); display: none;
}
.lc-root.lc-has-unread .lc-badge { display: block; }

/* ---- Panel ---- */
.lc-panel {
  position: absolute; bottom: 68px;
  width: 384px; max-width: calc(100vw - 32px);
  height: 634px; max-height: calc(100vh - 118px);
  background: var(--lc-bg);
  border-radius: var(--lc-radius);
  box-shadow: var(--lc-shadow);
  border: 1px solid var(--lc-border);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(20px) scale(.94);
  pointer-events: none;
  transition: opacity .24s cubic-bezier(.22, 1, .36, 1), transform .32s cubic-bezier(.22, 1, .36, 1), width .2s ease, height .2s ease;
  transform-origin: bottom right;
}
.lc-root.lc-left .lc-panel { transform-origin: bottom left; right: auto; left: 0; }
.lc-root.lc-right .lc-panel { right: 0; }
.lc-root.lc-open .lc-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.lc-root.lc-expanded .lc-panel { width: 452px; height: 704px; }

/* ---- Screen router: exactly one screen visible at a time ---- */
.lc-screen { display: none; flex: 1 1 auto; min-height: 0; flex-direction: column; }
.lc-root.lc-screen-home .lc-home,
.lc-root.lc-screen-messages .lc-messages-screen,
.lc-root.lc-screen-help .lc-help-screen,
.lc-root.lc-screen-thread .lc-thread { display: flex; }

/* ---- Bottom nav (hidden inside a thread) ---- */
.lc-nav {
  flex: 0 0 auto; display: flex; border-top: 1px solid var(--lc-border);
  background: linear-gradient(180deg, #fbfcfe, var(--lc-bg));
  box-shadow: 0 -4px 14px -10px rgba(20,24,60,.22);
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
}
.lc-root.lc-screen-thread .lc-nav { display: none; }
.lc-navbtn {
  flex: 1; position: relative; background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 6px; color: #7a8195; font: inherit; font-size: 12px; font-weight: 600;
  transition: color .14s;
}
/* gradient "you are here" indicator */
.lc-navbtn::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 3px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--lc-accent), var(--lc-accent2));
  transition: width .2s ease;
}
.lc-navbtn.lc-active::before { width: 30px; }
.lc-navbtn .lc-navico { display: flex; opacity: .62; transition: opacity .14s, transform .14s; }
.lc-navbtn .lc-navico svg { width: 23px; height: 23px; }
.lc-navbtn.lc-active { color: var(--lc-accent); }
.lc-navbtn.lc-active .lc-navico { opacity: 1; transform: translateY(-1px); }
.lc-navbtn:hover { color: var(--lc-text); }
.lc-navbtn:hover .lc-navico { opacity: .9; }
.lc-navbadge {
  position: absolute; top: 4px; left: 50%; margin-left: 7px;
  min-width: 16px; height: 16px; padding: 0 4px; background: #ff4d6d; color: #fff;
  border-radius: 8px; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  display: none;
}

/* =========================================================================
   HOME
   ========================================================================= */
/* The home screen's own background is the brand gradient, so if anything ever
   leaves a gap above the hero it fills with brand colour, never a white box. */
.lc-home { background: linear-gradient(135deg, var(--lc-accent), var(--lc-accent2)); }
.lc-hero {
  position: relative; overflow: hidden;
  flex: 0 0 auto; color: #fff; padding: 14px 16px 26px;
  background: linear-gradient(135deg, var(--lc-accent), var(--lc-accent2));
}
.lc-hero-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(140px 130px at 88% -10%, rgba(255,255,255,.26), transparent 70%),
    radial-gradient(180px 140px at 8% 130%, rgba(255,255,255,.14), transparent 72%);
}
.lc-hero-top, .lc-hero-greet { position: relative; z-index: 1; }
.lc-hero-top { display: flex; align-items: center; justify-content: space-between; }
.lc-hero-id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.lc-hero-logo { width: 30px; height: 30px; border-radius: 9px; overflow: hidden; flex: 0 0 auto; display: flex; background: #fff; box-shadow: 0 2px 8px -3px rgba(0,0,0,.3); }
.lc-hero-logo svg, .lc-hero-logo img { width: 100%; height: 100%; display: block; object-fit: contain; padding: 2px; }
.lc-hero-brand { font-weight: 800; font-size: 16px; letter-spacing: -.2px; }
.lc-hero .lc-hbtn { background: rgba(255,255,255,.16); color: #fff; }
.lc-hero .lc-hbtn:hover { background: rgba(255,255,255,.3); }
.lc-hero-greet { margin-top: 14px; display: flex; flex-direction: column; }
.lc-hero-hi { font-size: 14px; font-weight: 600; opacity: .82; }
.lc-hero-sub { font-size: 21px; font-weight: 800; letter-spacing: -.3px; margin-top: 1px; }

/* brand logo inside any avatar */
.lc-avatar-img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: contain; background: #fff; padding: 2px; }

.lc-home-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  margin-top: -16px; padding: 13px; background: var(--lc-bg);
  border-radius: 18px 18px 0 0; position: relative;
  display: flex; flex-direction: column; gap: 10px;
}

.lc-recent {
  width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--lc-text);
  background: var(--lc-bg); border: 1px solid var(--lc-border); border-radius: 14px;
  padding: 13px 14px; box-shadow: 0 4px 14px -8px rgba(20,24,60,.18);
  transition: transform .12s, box-shadow .14s;
}
.lc-recent:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(20,24,60,.24); }
.lc-recent-lbl { font-weight: 700; font-size: 13px; margin-bottom: 9px; }
.lc-recent-row { display: flex; align-items: center; gap: 11px; }
.lc-recent-main { flex: 1; min-width: 0; }
.lc-recent-t { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-recent-s { font-size: 12.5px; color: var(--lc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.lc-recent-meta { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.lc-recent-time { font-size: 11px; color: var(--lc-muted); }
.lc-reddot { width: 8px; height: 8px; border-radius: 50%; background: #ff4d6d; }

.lc-searchbtn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: 12px;
  padding: 12px 14px; cursor: pointer; font: inherit; font-size: 13.5px; color: var(--lc-muted);
  transition: border-color .14s;
}
.lc-searchbtn:hover { border-color: var(--lc-accent); }
.lc-searchbtn svg { width: 17px; height: 17px; color: var(--lc-accent); }

.lc-quickhelp {
  background: var(--lc-bg); border: 1px solid var(--lc-border); border-radius: 14px; overflow: hidden;
}
.lc-qhelp {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: none; border: none; border-bottom: 1px solid var(--lc-border); cursor: pointer;
  padding: 13px 14px; font: inherit; font-size: 13.5px; color: var(--lc-text); text-align: left;
  transition: background .13s;
}
.lc-qhelp:last-child { border-bottom: none; }
.lc-qhelp:hover { background: var(--lc-surface); }
.lc-qhelp span { flex: 1; min-width: 0; }
.lc-qhelp svg { width: 16px; height: 16px; color: var(--lc-accent); flex: 0 0 auto; }

.lc-ask {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--lc-accent); color: #fff; border: none; border-radius: 12px;
  padding: 13px; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px;
  transition: filter .14s, transform .1s;
}
.lc-ask:hover { filter: brightness(1.06); transform: translateY(-1px); }
.lc-ask svg { width: 17px; height: 17px; }

/* =========================================================================
   MESSAGES + HELP shared header
   ========================================================================= */
.lc-simplehead {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 14px 12px 13px 16px; border-bottom: 1px solid var(--lc-border);
  font-weight: 800; font-size: 17px; letter-spacing: -.2px;
}
.lc-simplehead > span:not(.lc-help-title), .lc-help-title { flex: 1; }
.lc-simplehead .lc-x { margin-left: auto; }

/* generic ghost header button (white-context) */
.lc-hbtn {
  background: transparent; border: none; color: var(--lc-muted); cursor: pointer;
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; transition: background .13s, color .13s;
}
.lc-hbtn:hover { background: var(--lc-surface); color: var(--lc-text); }
.lc-hbtn svg { width: 18px; height: 18px; }

/* ---- Messages list ---- */
.lc-list-scroll { flex: 1; overflow-y: auto; padding: 10px 10px 4px; display: flex; flex-direction: column; gap: 6px; }
.lc-conv {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; cursor: pointer;
  background: var(--lc-bg); border: 1px solid var(--lc-border); border-radius: 12px; padding: 11px 12px;
  color: var(--lc-text); font: inherit; transition: background .15s, border-color .15s, box-shadow .15s;
}
.lc-conv:hover { background: var(--lc-surface); border-color: rgba(91,134,255,.38); box-shadow: 0 2px 8px -4px rgba(20,24,60,.12); }
.lc-conv-main { flex: 1; min-width: 0; }
.lc-conv-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-conv.lc-unread .lc-conv-title { font-weight: 700; }
.lc-conv-snip { font-size: 12.5px; color: var(--lc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.lc-conv-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.lc-conv-time { font-size: 11px; color: var(--lc-muted); }
.lc-conv-del { background: none; border: none; color: var(--lc-muted); cursor: pointer; width: 22px; height: 22px;
  border-radius: 6px; display: flex; align-items: center; justify-content: center; opacity: 0; transition: .12s; }
.lc-conv-del svg { width: 13px; height: 13px; }
.lc-conv:hover .lc-conv-del { opacity: .5; }
.lc-conv-del:hover { opacity: 1 !important; color: #ff4d6d; background: rgba(255,77,109,.1); }
.lc-list-empty { text-align: center; color: var(--lc-muted); font-size: 13px; padding: 40px 16px; line-height: 1.7; }
.lc-newbtn { flex: 0 0 auto; margin: 8px 12px calc(12px + env(safe-area-inset-bottom)); padding: 12px; border: none; border-radius: 12px; cursor: pointer;
  background: var(--lc-accent); color: #fff; font: inherit; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 7px; transition: filter .14s, transform .1s; }
.lc-newbtn svg { width: 17px; height: 17px; }
.lc-newbtn:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* =========================================================================
   HELP centre
   ========================================================================= */
.lc-help-back { visibility: hidden; }
.lc-help-searchbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; margin: 12px 14px 4px;
  background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: 11px; padding: 0 12px;
}
.lc-help-searchbar svg { width: 17px; height: 17px; color: var(--lc-muted); flex: 0 0 auto; }
.lc-help-input { flex: 1; border: none; outline: none; background: none; padding: 11px 0; font: inherit; font-size: 14px; color: var(--lc-text); }
.lc-help-scroll { flex: 1; overflow-y: auto; padding: 8px 14px 14px; }
.lc-help-count { font-size: 12px; font-weight: 700; color: var(--lc-muted); text-transform: uppercase; letter-spacing: .04em; margin: 8px 2px 10px; }
.lc-help-loading, .lc-help-empty { text-align: center; color: var(--lc-muted); font-size: 13px; padding: 34px 12px; }

.lc-coll {
  width: 100%; display: flex; align-items: flex-start; gap: 12px; text-align: left; cursor: pointer;
  background: none; border: none; border-bottom: 1px solid var(--lc-border); padding: 15px 2px;
  font: inherit; color: var(--lc-text); transition: opacity .13s;
}
.lc-coll:hover { opacity: .72; }
.lc-coll-ico { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--lc-surface); color: var(--lc-accent); }
@supports (background: color-mix(in srgb, red, blue)) {
  .lc-coll-ico { background: color-mix(in srgb, var(--lc-accent) 13%, transparent); }
}
.lc-coll-ico svg { width: 19px; height: 19px; }
.lc-coll-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lc-coll-t { font-weight: 700; font-size: 14.5px; }
.lc-coll-d { font-size: 12.5px; color: var(--lc-muted); line-height: 1.4; }
.lc-coll-n { font-size: 12px; color: var(--lc-muted); margin-top: 2px; }
.lc-coll-chev { flex: 0 0 auto; color: var(--lc-muted); display: flex; align-self: center; }
.lc-coll-chev svg { width: 17px; height: 17px; }

.lc-artrow {
  width: 100%; display: flex; align-items: center; gap: 11px; text-align: left; cursor: pointer;
  background: none; border: none; border-bottom: 1px solid var(--lc-border); padding: 14px 2px;
  font: inherit; color: var(--lc-text); transition: opacity .13s;
}
.lc-artrow:hover { opacity: .72; }
.lc-artrow-ico { flex: 0 0 auto; color: var(--lc-accent); display: flex; }
.lc-artrow-ico svg { width: 17px; height: 17px; }
.lc-artrow-t { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; }
.lc-artrow svg:last-child { width: 16px; height: 16px; color: var(--lc-muted); flex: 0 0 auto; }

.lc-article-t { font-size: 19px; font-weight: 800; letter-spacing: -.3px; margin: 6px 0 12px; line-height: 1.25; }
.lc-article-b { font-size: 14.5px; line-height: 1.65; color: #2b2f42; }
.lc-article-b p { margin: 0 0 12px; }
.lc-article-b ul { margin: 8px 0; padding-left: 20px; }
.lc-article-b a { color: var(--lc-accent); font-weight: 600; }
.lc-article-cta { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--lc-border); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.lc-article-cta-q { font-size: 13.5px; font-weight: 600; color: var(--lc-muted); }
.lc-article-ask { background: var(--lc-accent); color: #fff; border: none; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; transition: filter .14s; }
.lc-article-ask:hover { filter: brightness(1.06); }
.lc-article-link { font-size: 13px; font-weight: 600; color: var(--lc-accent); text-decoration: none; }
.lc-article-link:hover { text-decoration: underline; }

/* =========================================================================
   THREAD
   ========================================================================= */
/* NOTE: display is owned by the screen router (.lc-screen). Do NOT set
   display here or the thread leaks onto other screens and covers the nav. */
.lc-thead {
  position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 11px 10px 11px 8px; border-bottom: 1px solid var(--lc-border); background: var(--lc-bg);
}
.lc-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--lc-accent), var(--lc-accent2)); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.lc-avatar svg { width: 18px; height: 18px; }
.lc-avatar.sm { width: 36px; height: 36px; border-radius: 10px; }
.lc-avatar.sm svg { width: 18px; height: 18px; }
.lc-htext { flex: 1; min-width: 0; }
.lc-title { font-weight: 700; font-size: 14.5px; line-height: 1.2; letter-spacing: -.1px; }
.lc-sub { font-size: 11.5px; color: var(--lc-muted); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.lc-dot { width: 7px; height: 7px; border-radius: 50%; background: #48e08b; box-shadow: 0 0 0 3px rgba(72,224,139,.22); }

.lc-menu {
  position: absolute; top: 50px; right: 10px; z-index: 5; min-width: 202px;
  background: var(--lc-bg); border: 1px solid var(--lc-border); border-radius: 13px;
  box-shadow: var(--lc-shadow); padding: 6px;
}
.lc-menu[hidden] { display: none; }
.lc-menu-item { display: flex; align-items: center; gap: 11px; width: 100%; background: none; border: none;
  padding: 10px 11px; border-radius: 9px; cursor: pointer; font: inherit; font-size: 13.5px; color: var(--lc-text); text-align: left; }
.lc-menu-item:hover { background: var(--lc-surface); }
.lc-menu-item svg { width: 17px; height: 17px; color: var(--lc-muted); flex: 0 0 auto; }

/* ---- Messages stream ---- */
.lc-messages {
  flex: 1; overflow-y: auto; padding: 15px 14px 8px;
  display: flex; flex-direction: column; gap: 9px;
  background: var(--lc-bg); scroll-behavior: smooth;
}
.lc-messages::-webkit-scrollbar { width: 8px; }
.lc-messages::-webkit-scrollbar-thumb { background: rgba(15,18,34,.14); border-radius: 4px; }

.lc-msg { display: flex; max-width: 100%; }
.lc-msg-bot  { flex-direction: column; align-items: flex-start; gap: 4px; }
.lc-msg-user { justify-content: flex-end; }

.lc-daysep { align-self: center; font-size: 11px; color: var(--lc-muted); font-weight: 600; margin: 4px 0; }

.lc-meta { font-size: 11px; color: var(--lc-muted); margin-left: 3px; }

.lc-bubble {
  padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5;
  max-width: 86%; word-wrap: break-word; overflow-wrap: anywhere; white-space: normal;
}
.lc-msg-bot .lc-bubble {
  background: var(--lc-surface); color: var(--lc-text);
  border: 1px solid var(--lc-border); border-bottom-left-radius: 5px;
}
.lc-msg-user .lc-bubble {
  background: var(--lc-accent); color: #fff; border-bottom-right-radius: 5px;
}
.lc-bubble p { margin: 0 0 8px; }
.lc-bubble p:last-child { margin-bottom: 0; }
.lc-bubble ul { margin: 4px 0; padding-left: 18px; }
.lc-bubble li { margin: 2px 0; }
.lc-bubble a { color: var(--lc-accent); font-weight: 600; }
.lc-msg-user .lc-bubble a { color: #fff; text-decoration: underline; }
.lc-bubble strong { font-weight: 700; }
.lc-bubble code {
  background: rgba(15,18,34,.08); padding: 1px 5px; border-radius: 5px;
  font-size: .9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* typing dots */
.lc-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.lc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--lc-muted); opacity: .5; animation: lc-blink 1.2s infinite both; }
.lc-typing span:nth-child(2) { animation-delay: .2s; }
.lc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes lc-blink { 0%,60%,100% { opacity: .25; transform: translateY(0);} 30% { opacity: 1; transform: translateY(-3px);} }

/* tool-activity chip */
.lc-tool { align-self: flex-start; font-size: 12px; color: var(--lc-muted); background: var(--lc-surface); padding: 5px 11px; border-radius: 20px; display: inline-flex; align-items: center; gap: 7px; }
.lc-tool .lc-spin { width: 12px; height: 12px; border: 2px solid var(--lc-border); border-top-color: var(--lc-accent); border-radius: 50%; animation: lc-rot .7s linear infinite; }
@keyframes lc-rot { to { transform: rotate(360deg); } }

/* ---- Source cards (collapsible) ---- */
.lc-sources { align-self: flex-start; max-width: 92%; margin-top: 2px; }
.lc-sources-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; padding: 3px 2px; }
.lc-sources-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--lc-muted); }
.lc-sources-arw { font-size: 10px; color: var(--lc-muted); transition: transform .2s; }
.lc-sources.lc-open .lc-sources-arw { transform: rotate(180deg); }
.lc-sources-row { display: flex; flex-direction: column; gap: 5px; margin-top: 5px; }
.lc-source { display: flex; align-items: center; gap: 8px; text-decoration: none; background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: 10px; padding: 7px 10px; color: var(--lc-text); font-size: 12.5px; line-height: 1.3; transition: border-color .14s, background .14s, transform .1s; }
.lc-source-ico { flex: 0 0 auto; color: var(--lc-accent); display: flex; }
.lc-source-ico svg { width: 13px; height: 13px; }
.lc-source-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.lc-source-arw { flex: 0 0 auto; color: var(--lc-muted); font-size: 14px; }
.lc-source-link { cursor: pointer; }
.lc-source-link:hover { border-color: var(--lc-accent); background: var(--lc-bg); transform: translateY(-1px); }
.lc-source-link:hover .lc-source-arw { color: var(--lc-accent); }

/* ---- Action button (bot offers, user taps — never auto-fires) ---- */
.lc-actionbtn {
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 86%;
  background: var(--lc-bg); border: 1.5px solid var(--lc-accent); border-radius: 12px;
  padding: 11px 13px; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 700;
  color: var(--lc-accent); box-shadow: 0 5px 16px -9px rgba(91,134,255,.6);
  transition: background .14s, color .14s, transform .1s, box-shadow .14s;
}
.lc-actionbtn:hover { background: var(--lc-accent); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(91,134,255,.55); }
.lc-actionbtn-ic { display: flex; } .lc-actionbtn-ic svg { width: 18px; height: 18px; }
.lc-actionbtn-t { flex: 1; text-align: left; }
.lc-actionbtn-go { display: flex; opacity: .65; } .lc-actionbtn-go svg { width: 16px; height: 16px; }
.lc-actionbtn:hover .lc-actionbtn-go { opacity: 1; }
.lc-actionbtn-done { opacity: .5; pointer-events: none; }

/* ---- Quick replies ---- */
.lc-quick { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 14px 6px; }
.lc-chip { border: 1px solid var(--lc-border); background: var(--lc-bg); color: var(--lc-accent); font-weight: 600; font-size: 12.5px; padding: 6px 11px; border-radius: 10px; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.lc-chip:hover { background: var(--lc-surface); border-color: var(--lc-accent); }

/* ---- Composer ---- */
.lc-composer { flex: 0 0 auto; border-top: 1px solid var(--lc-border); padding: 10px 12px; display: flex; align-items: flex-end; gap: 8px; background: var(--lc-bg); }
.lc-input { flex: 1; resize: none; border: 1px solid var(--lc-border); outline: none; border-radius: 11px; padding: 9px 12px; font: inherit; font-size: 14px; max-height: 120px; line-height: 1.4; color: var(--lc-text); background: var(--lc-surface); }
.lc-input:focus { border-color: var(--lc-accent); background: var(--lc-bg); }
.lc-send { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; border: none; cursor: pointer; background: var(--lc-accent); color: #fff; display: flex; align-items: center; justify-content: center; transition: opacity .15s, transform .1s, filter .15s; }
.lc-send:disabled { opacity: .4; cursor: default; }
.lc-send:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.05); }
.lc-send svg { width: 17px; height: 17px; }

.lc-foot { flex: 0 0 auto; text-align: center; font-size: 10.5px; color: var(--lc-muted); padding: 0 12px 9px; background: var(--lc-bg); }
.lc-foot b { color: var(--lc-text); font-weight: 600; }

/* in-chat "email support" card */
.lc-emailcard { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: 12px; padding: 10px 13px; color: var(--lc-accent); font-weight: 600; font-size: 13.5px; }
.lc-emailcard svg { width: 17px; height: 17px; }
.lc-emailcard:hover { border-color: var(--lc-accent); }

/* in-widget email handoff form */
.lc-emailform { display: flex; gap: 7px; background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: 13px; padding: 8px; width: 100%; }
.lc-emailinput { flex: 1; min-width: 0; border: 1px solid var(--lc-border); border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 14px; color: var(--lc-text); background: var(--lc-bg); outline: none; }
.lc-emailinput:focus { border-color: var(--lc-accent); }
.lc-emailsend { border: none; border-radius: 9px; padding: 0 15px; background: var(--lc-accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.lc-emailsend:disabled { opacity: .7; }

/* generic in-chat form (lead / booking) */
.lc-form { background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: 14px; padding: 13px; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.lc-form-t { font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
.lc-fld { border: 1px solid var(--lc-border); border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 13.5px; color: var(--lc-text); background: var(--lc-bg); outline: none; width: 100%; }
.lc-fld:focus { border-color: var(--lc-accent); }
textarea.lc-fld { resize: none; }
.lc-form-send { margin-top: 2px; border: none; border-radius: 10px; padding: 10px; background: var(--lc-accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.lc-form-send:disabled { opacity: .7; }

/* proactive teaser bubble by the launcher */
.lc-teaser { position: absolute; bottom: 68px; max-width: 244px; background: var(--lc-bg); border: 1px solid var(--lc-border); border-radius: 15px; padding: 12px 32px 12px 14px; box-shadow: var(--lc-shadow); font-size: 13.5px; line-height: 1.45; color: var(--lc-text); cursor: pointer; opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .22s ease, transform .22s ease; }
.lc-root.lc-right .lc-teaser { right: 4px; transform-origin: bottom right; }
.lc-root.lc-left .lc-teaser { left: 4px; transform-origin: bottom left; }
.lc-teaser.lc-teaser-show { opacity: 1; transform: translateY(0) scale(1); }
.lc-teaser-t { display: block; }
.lc-teaser-x { position: absolute; top: 6px; right: 7px; width: 20px; height: 20px; border: none; background: var(--lc-surface); color: var(--lc-muted); border-radius: 50%; cursor: pointer; font-size: 11px; line-height: 20px; text-align: center; padding: 0; }
.lc-teaser-x:hover { color: var(--lc-text); }

/* ---- Mobile: full-screen sheet ---- */
@media (max-width: 560px) {
  .lc-panel {
    position: fixed !important; inset: 0 !important;
    width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important;
    border: none !important; border-radius: 0 !important;
    opacity: 1 !important; transform: translateY(100%) !important; pointer-events: none;
    transition: transform .28s cubic-bezier(.32, .72, 0, 1) !important;
  }
  .lc-root.lc-open .lc-panel { transform: translateY(0) !important; pointer-events: auto; }
  .lc-hero { padding-top: calc(18px + env(safe-area-inset-top)); }
  .lc-simplehead, .lc-thead { padding-top: calc(12px + env(safe-area-inset-top)); }
  .lc-composer { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .lc-root.lc-open .lc-launcher { opacity: 0; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lc-panel, .lc-launcher { transition: none; }
  .lc-typing span, .lc-spin { animation: none; }
}
