/* Live chat widget (istanbul BOSPHORA, ASTRIVON AI): visitor writes in any language, the advisor answers in Turkish.
   Colours come from --lc-* variables. On BOSPHORA they follow site.css (--ink, --brass, --ivory ...);
   [data-lc-site="astrivon"] sets ASTRIVON AI's palette. */
.lc-launch, .lc-panel {
  --lc-ink: var(--ink, #0f1b26); --lc-ink-2: var(--ink-2, #1d2c39); --lc-on-ink: var(--on-ink, #f6f2ea);
  --lc-on-ink-muted: var(--on-ink-muted, #c9c2b5); --lc-accent: var(--brass, #b08847); --lc-on-accent: var(--ink, #0f1b26);
  --lc-bg: var(--ivory, #f6f2ea); --lc-paper: var(--paper, #ffffff); --lc-line: var(--line, #e3dbcd); --lc-muted: var(--muted, #56616b);
  --lc-ring: rgba(212, 170, 94, .55); --lc-field-line: #cfc6b6; --lc-avatar-font: "Playfair Display", Georgia, serif;
}
[data-lc-site="astrivon"] {
  --lc-ink: #172039; --lc-ink-2: #222d4f; --lc-on-ink: #ffffff; --lc-on-ink-muted: #c4cadb;
  --lc-accent: #6545d9; --lc-on-accent: #ffffff; --lc-bg: #f7f8fc; --lc-paper: #ffffff; --lc-line: #dce1eb; --lc-muted: #58647a;
  --lc-ring: rgba(101, 69, 217, .5); --lc-field-line: #dce1eb; --lc-avatar-font: Inter, "Segoe UI", Arial, sans-serif;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
.lc-launch {
  position: fixed; inset-inline-end: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px 0 14px;
  border-radius: 999px; border: 1px solid var(--lc-ring); background: var(--lc-ink); color: var(--lc-on-ink);
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
}
.lc-launch:hover { background: var(--lc-ink-2); }
.lc-launch .lc-dot { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--lc-accent); color: var(--lc-on-accent); display: grid; place-items: center; flex: none; }
.lc-launch .lc-dot::after { content: ""; position: absolute; inset-inline-end: -1px; top: -1px; width: 10px; height: 10px; border-radius: 50%; background: #3fa66b; border: 2px solid var(--lc-ink); }
.lc-launch .lc-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #c0392b; color: #fff; font-size: 12px; display: grid; place-items: center; }
.lc-launch .lc-badge[hidden] { display: none; }
.lc-launch svg, .lc-panel svg { width: 18px; height: 18px; }

.lc-panel {
  position: fixed; inset-inline-end: 20px; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); z-index: 91;
  width: min(390px, calc(100vw - 32px)); height: min(600px, calc(100svh - 120px));
  display: flex; flex-direction: column; background: var(--lc-bg); color: var(--lc-ink);
  border: 1px solid var(--lc-line); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.lc-panel[hidden] { display: none !important; }
@media (max-width: 560px) {
  .lc-panel { inset-inline: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); height: calc(100svh - 80px); }
  .lc-open .lc-launch { display: none; }
  .lc-launch .lc-label { display: none; }
  .lc-launch { padding: 0 12px; }
}
.lc-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--lc-ink); color: var(--lc-on-ink); }
.lc-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--lc-accent); color: var(--lc-on-accent); display: grid; place-items: center; font-family: var(--lc-avatar-font); font-size: 15px; flex: none; }
.lc-head strong { display: block; font-size: 15px; font-weight: 600; }
.lc-head small { display: block; font-size: 12px; color: var(--lc-on-ink-muted); }
.lc-grow { flex: 1; min-width: 0; }
.lc-close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.lc-close:hover { border-color: rgba(246, 242, 234, .35); }
.lc-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.lc-msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.lc-in { background: var(--lc-paper); border: 1px solid var(--lc-line); align-self: flex-start; border-start-start-radius: 4px; }
.lc-out { background: var(--lc-ink); color: var(--lc-on-ink); align-self: flex-end; border-start-end-radius: 4px; }
.lc-out.lc-pending { opacity: .65; }
.lc-who { display: block; font-size: 11.5px; color: var(--lc-muted); margin-bottom: 2px; }
.lc-sys { align-self: center; font-size: 13px; color: var(--lc-muted); text-align: center; max-width: 95%; }
.lc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; background: var(--lc-paper); border-top: 1px solid var(--lc-line); }
.lc-form textarea {
  flex: 1; min-width: 0; resize: none; max-height: 120px; font: inherit; font-size: 16px; line-height: 1.4;
  padding: 10px 12px; border: 1px solid var(--lc-field-line); border-radius: 10px; background: var(--lc-bg); color: var(--lc-ink);
}
.lc-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--lc-accent); color: var(--lc-on-accent); display: grid; place-items: center; cursor: pointer; flex: none; }
.lc-send:disabled { opacity: .5; cursor: default; }
[dir="rtl"] .lc-send svg { transform: scaleX(-1); }
.lc-foot { margin: 0; padding: 0 12px 10px; background: var(--lc-paper); font-size: 11.5px; color: var(--lc-muted); line-height: 1.45; }
.lc-consent { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 8px 12px; background: var(--lc-paper); border-top: 1px solid var(--lc-line); font-size: 12px; line-height: 1.45; color: var(--lc-muted); cursor: pointer; }
.lc-consent[hidden] { display: none; }
.lc-consent input { margin-top: 2px; flex: none; width: 16px; height: 16px; accent-color: var(--lc-accent); }
.lc-consent a { color: var(--lc-ink); text-decoration: underline; }
.lc-consent.lc-attn { background: #fff4d6; color: var(--lc-ink); }
