/*
 * befcrm.com — canlı destek: sağ altta "Canlı destek" düğmesi + sohbet paneli (partials/livechat.php, js/livechat.js; 10.11.2026).
 * Konum: .wa-fab (site.css) en altta — mobilde 48×48, sağ/alt 16px; ≥720px yükseklik 48, sağ/alt 24px. Bu düğme 12px boşlukla
 * onun üstünde (mobil alt 76px, masaüstü 84px); WhatsApp yoksa en altta. İndirim balonu (promo.css) bunun da bir kat üstünde.
 * Panel: masaüstünde düğmenin üstünde yüzen kart (380×600, 20px köşe); dar (<560px) ya da alçak (≤520px) ekranda tam ekran.
 * Renk: siyah hap + beyaz metin (WhatsApp yeşilinden ve kırmızı indirim balonundan ayrı); kırmızı yalnız eylem ve odakta.
 * Belirteçler site.css'ten (--ink*, --line*, --accent*, --bg-*). Hareket yalnız prefers-reduced-motion: no-preference iken.
 * Sağdan sola: konumlar ve iç boşluklar mantıksal (inset-inline-end, padding-inline), WhatsApp düğmesi gibi solda durur.
 */
.lc {
  --lc-side: 16px;
  --lc-b: 16px;
  --lc-ink: var(--ink, #0f0f12);
  --lc-red: var(--accent, #e60000);
  --lc-line: var(--line, #e6e6e1);
  --lc-soft: var(--bg-2, #f6f6f4);
  --lc-ok: #16a34a;
  --lc-wait: #d97706;
  --lc-ring: 0 0 0 4px rgba(230, 0, 0, .12);
}
.wa-fab ~ .lc { --lc-b: 76px; }
@media (min-width: 720px) {
  .lc { --lc-side: 24px; --lc-b: 24px; }
  .wa-fab ~ .lc { --lc-b: 84px; }
}
/* Mobil menü açıkken (site.js html.is-locked) ve baskıda gizli — WhatsApp düğmesiyle aynı */
html.is-locked .lc { display: none; }
@media print { .lc { display: none !important; } }
/* Tam ekran panel açıkken sayfa kaymasın (livechat.js) */
html.lc-lock, html.lc-lock body { overflow: hidden; }

/* ============================================================ Düğme */
.lc-fab {
  position: fixed; z-index: 82; bottom: var(--lc-b); inset-inline-end: var(--lc-side);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-width: 48px; height: 48px; margin: 0; padding: 0 12px;
  border: 0; border-radius: 999px; background: var(--lc-ink); color: #fff;
  font: inherit; font-size: .95rem; font-weight: 700; line-height: 1; letter-spacing: -.005em; white-space: nowrap;
  box-shadow: 0 10px 28px -10px rgba(15, 15, 18, .6), 0 2px 6px rgba(15, 15, 18, .14);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.lc-fab:hover { background: #26262c; color: #fff; }
.lc-fab:focus-visible { outline: 3px solid var(--lc-red); outline-offset: 3px; border-radius: 999px; }
.lc-fab__ic { position: relative; flex: none; display: grid; place-items: center; width: 24px; height: 24px; }
.lc-fab__ic .ic { grid-area: 1 / 1; width: 24px; height: 24px; stroke-width: 1.9; }
.lc-fab__down { opacity: 0; }
.lc.is-open .lc-fab__chat { opacity: 0; }
.lc.is-open .lc-fab__down { opacity: 1; }
/* Temsilci çevrimiçi: ikonun köşesinde yeşil nokta (halkası düğme renginde) */
.lc-fab__dot {
  position: absolute; top: -1px; inset-inline-end: -2px; display: none;
  width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px var(--lc-ink);
}
.lc.is-online .lc-fab__dot { display: block; }
.lc.is-open .lc-fab__dot { display: none; }
/* Okunmamış yanıt sayısı */
.lc-fab__badge {
  position: absolute; top: -6px; inset-inline-end: -6px;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--lc-red); color: #fff; box-shadow: 0 0 0 2px #fff;
  font-size: .6875rem; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums;
}
/* Mobilde yalnız ikon (yazı ekran okuyucuda kalır), masaüstünde "Canlı destek" */
.lc-fab__label {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
@media (min-width: 720px) {
  .lc-fab { padding-inline: 14px 18px; }
  .lc-fab__label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
}
/* Dar ekranda çerez bandı açıkken gizli (bant alt kenarı kaplar) — indirim balonuyla aynı */
@media (max-width: 639px) {
  body:has(> .cookie.is-on) .lc-fab { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* ============================================================ Panel */
.lc-panel {
  position: fixed; z-index: 95;
  bottom: calc(var(--lc-b) + 60px); inset-inline-end: var(--lc-side);
  width: min(380px, calc(100vw - 2 * var(--lc-side)));
  height: min(600px, calc(100vh - var(--lc-b) - 76px));
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 20px; background: #fff; color: var(--lc-ink);
  box-shadow: 0 0 0 1px rgba(15, 15, 18, .06), 0 2px 6px rgba(15, 15, 18, .06), 0 28px 70px -24px rgba(15, 15, 18, .42);
  font-size: 1rem; font-weight: 400; line-height: 1.5; text-align: start;
  transform-origin: 100% 100%;
}
@supports (height: 100dvh) {
  .lc-panel { height: min(600px, calc(100dvh - var(--lc-b) - 76px)); }
}
[dir="rtl"] .lc-panel { transform-origin: 0 100%; }
.lc-panel:focus { outline: none; }

/* --- Başlık */
.lc-head {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding-block: 12px; padding-inline: 16px 8px;
  border-bottom: 1px solid var(--lc-line); background: #fff;
}
.lc-mark { position: relative; flex: none; width: 40px; height: 40px; }
.lc-mark__img {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  background: var(--lc-ink); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .02em; line-height: 1;
}
.lc-mark__img.is-brand { box-shadow: inset 0 0 0 1px var(--lc-line); }
.lc-mark__dot {
  position: absolute; bottom: 0; inset-inline-end: 0; display: none;
  width: 11px; height: 11px; border-radius: 50%; background: var(--lc-ok); box-shadow: 0 0 0 2px #fff;
}
.lc-panel[data-tone="on"] .lc-mark__dot { display: block; }
.lc-head__txt { flex: 1; min-width: 0; }
.lc-title { margin: 0; font-family: inherit; font-size: 1rem; font-weight: 650; line-height: 1.25; letter-spacing: -.01em; color: var(--lc-ink); }
.lc-status { display: flex; align-items: flex-start; gap: 7px; margin: 3px 0 0; font-size: .8125rem; line-height: 1.35; color: var(--ink-3, #5f5f68); }
.lc-status::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .42em; border-radius: 50%; background: var(--ink-4, #8b8b94); }
.lc-panel[data-tone="on"] .lc-status::before { background: var(--lc-ok); }
.lc-panel[data-tone="wait"] .lc-status::before { background: var(--lc-wait); }
.lc-x {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-2, #3f3f46); cursor: pointer;
}
.lc-x:hover { background: var(--lc-soft); color: var(--lc-ink); }
.lc-x:focus-visible { outline: 2px solid var(--lc-red); outline-offset: -2px; border-radius: 50%; }
.lc-x .ic { width: 20px; height: 20px; }

/* --- Bağlantı uyarısı */
.lc-net {
  flex: none; display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 16px;
  border-bottom: 1px solid #f6dfb0; background: var(--warn-soft, #fff6e5); color: #7a3a06;
  font-size: .8125rem; font-weight: 600; line-height: 1.4;
}
.lc-net .ic { flex: none; width: 15px; height: 15px; }

/* --- Gövde (kaydırılan alan: başlangıç formu ya da mesajlar) */
.lc-body {
  position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 16px 12px; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--line-2, #d3d3cd) transparent;
}
.lc-body::-webkit-scrollbar { width: 8px; }
.lc-body::-webkit-scrollbar-track { background: transparent; }
.lc-body::-webkit-scrollbar-thumb { background: var(--line-2, #d3d3cd); border-radius: 8px; border: 2px solid #fff; }
.lc-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 100%; margin: 0; font-size: .875rem; color: var(--ink-3, #5f5f68); }
.lc-spin { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2, #d3d3cd); border-top-color: var(--lc-ink); }

/* ============================================================ Başlangıç formu */
.lc-start { display: grid; gap: 14px; }
.lc-form { display: grid; gap: 12px; }
.lc-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 339px) { .lc-row { grid-template-columns: minmax(0, 1fr); } }
.lc-field { display: grid; gap: 6px; min-width: 0; }
.lc-label { font-size: .875rem; font-weight: 650; line-height: 1.3; color: var(--lc-ink); }
.lc-input {
  display: block; width: 100%; min-height: 48px; margin: 0; padding: 11px 14px;
  border: 1px solid var(--line-2, #d3d3cd); border-radius: 14px; background: #fff; color: var(--lc-ink);
  font: inherit; font-size: 1rem; line-height: 1.4; box-shadow: none;
}
.lc-input::placeholder { color: var(--ink-3, #5f5f68); opacity: 1; }
.lc-input:hover { border-color: var(--ink-4, #8b8b94); }
.lc-input:focus { outline: none; border-color: var(--lc-red); box-shadow: var(--lc-ring); }
.lc-input[aria-invalid="true"] { border-color: var(--bad, #c81e1e); }
.lc-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(200, 30, 30, .12); }
textarea.lc-input { min-height: 96px; max-height: 180px; resize: none; overflow-y: hidden; }
.lc-err { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: .8125rem; font-weight: 600; line-height: 1.4; color: var(--bad, #c81e1e); }
.lc-err .ic { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.lc-go { width: 100%; min-height: 50px; margin-top: 2px; }
.lc-note { margin: 0; font-size: .8125rem; line-height: 1.5; color: var(--ink-3, #5f5f68); }
.lc-note a { color: var(--lc-ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.lc-note a:hover { color: var(--accent-ink, #b00000); }
.lc-alert { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--bad-soft, #fdf0f0); color: #8e1515; font-size: .875rem; font-weight: 500; line-height: 1.45; }
.lc-alert--info { background: var(--lc-soft); color: var(--ink-2, #3f3f46); }

/* Oturumlu firma kullanıcısı: "Merhaba {ad}, hesabınızla devam ediyorsunuz · Değiştir" */
.lc-me { display: flex; align-items: center; gap: 10px; padding-block: 6px; padding-inline: 10px 6px; border-radius: 14px; background: var(--lc-soft); }
.lc-me__av {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft, #fff1f1); color: var(--accent-ink, #b00000); font-size: .75rem; font-weight: 700; line-height: 1;
}
.lc-me__t { flex: 1; min-width: 0; margin: 0; font-size: .875rem; line-height: 1.4; color: var(--ink-2, #3f3f46); overflow-wrap: anywhere; }
.lc-me__t b { font-weight: 650; color: var(--lc-ink); }
.lc-me__btn {
  flex: none; min-height: 44px; margin: 0; padding: 0 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--accent-ink, #b00000); font: inherit; font-size: .875rem; font-weight: 650; cursor: pointer;
}
.lc-me__btn:hover { background: #fff; }
.lc-me__btn:focus-visible { outline: 2px solid var(--lc-red); outline-offset: 0; border-radius: 999px; }

/* ============================================================ Mesajlar */
.lc-log { display: flex; flex-direction: column; }
.lc-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; margin-top: 3px; }
.lc-msg.is-first { margin-top: 14px; }
.lc-log > .lc-msg:first-child, .lc-start > .lc-msg { margin-top: 0; }
.lc-msg--visitor { align-items: flex-end; }
.lc-msg__who { display: flex; align-items: center; gap: 6px; margin: 0 0 5px; padding-inline-start: 4px; font-size: .75rem; font-weight: 650; line-height: 1.2; color: var(--ink-2, #3f3f46); }
.lc-msg:not(.is-first) .lc-msg__who { display: none; }
.lc-msg__who .ic { flex: none; width: 13px; height: 13px; stroke-width: 1.5; color: var(--lc-red); }
.lc-av {
  flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--lc-red); color: #fff; font-size: .625rem; font-weight: 700; letter-spacing: .02em; line-height: 1;
}
.lc-msg__bubble {
  max-width: min(84%, 520px); margin: 0; padding: 9px 14px; border-radius: 18px;
  font-size: .9375rem; line-height: 1.5; text-align: start; white-space: pre-wrap; overflow-wrap: anywhere;
}
.lc-msg--ai .lc-msg__bubble { background: var(--ai-soft, #f3f3f4); color: var(--lc-ink); }
.lc-msg--agent .lc-msg__bubble { background: var(--accent-soft, #fff1f1); color: var(--lc-ink); box-shadow: inset 0 0 0 1px #ffe1e1; }
.lc-msg--visitor .lc-msg__bubble { background: var(--lc-ink); color: #fff; }
/* Ardışık balonlar: birleşen köşe küçülür */
.lc-msg--visitor:not(.is-first) .lc-msg__bubble { border-start-end-radius: 6px; }
.lc-msg--visitor:not(.is-last) .lc-msg__bubble { border-end-end-radius: 6px; }
.lc-msg--ai:not(.is-first) .lc-msg__bubble, .lc-msg--agent:not(.is-first) .lc-msg__bubble { border-start-start-radius: 6px; }
.lc-msg--ai:not(.is-last) .lc-msg__bubble, .lc-msg--agent:not(.is-last) .lc-msg__bubble { border-end-start-radius: 6px; }
.lc-msg__bubble a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.lc-msg--ai .lc-msg__bubble a, .lc-msg--agent .lc-msg__bubble a { color: var(--accent-ink, #b00000); }
.lc-msg__bubble strong { font-weight: 650; }
.lc-msg__meta {
  display: none; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin: 4px 0 0; padding-inline: 4px;
  font-size: .75rem; line-height: 1.3; color: var(--ink-3, #5f5f68); font-variant-numeric: tabular-nums;
}
.lc-msg.is-last .lc-msg__meta, .lc-msg.is-pending .lc-msg__meta, .lc-msg.is-failed .lc-msg__meta { display: flex; }
.lc-msg__meta .ic { flex: none; width: 14px; height: 14px; }
.lc-msg.is-pending .lc-msg__bubble { opacity: .72; }
.lc-msg.is-failed .lc-msg__bubble { background: #fff; color: var(--lc-ink); box-shadow: inset 0 0 0 1px #f4caca; }
.lc-msg.is-failed .lc-msg__meta { color: var(--bad, #c81e1e); font-weight: 600; }
.lc-retry {
  position: relative; margin: 0; padding: 0; border: 0; background: none; color: var(--bad, #c81e1e);
  font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; cursor: pointer;
}
.lc-retry::after { content: ""; position: absolute; inset: -14px -10px; }
.lc-retry:focus-visible { outline: 2px solid var(--lc-red); outline-offset: 2px; border-radius: 4px; }
/* Sistem satırı: ortada, küçük, sakin */
.lc-msg--system { align-items: center; margin: 14px 0 2px; }
.lc-sys { max-width: 92%; margin: 0; font-size: .8125rem; line-height: 1.45; color: var(--ink-3, #5f5f68); text-align: center; overflow-wrap: anywhere; }

/* "yazıyor…" */
.lc-typing { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .8125rem; line-height: 1.3; color: var(--ink-3, #5f5f68); }
.lc-typing__b { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 13px; border-radius: 16px; background: var(--ai-soft, #f3f3f4); }
.lc-typing__b i { display: block; width: 6px; height: 6px; border-radius: 50%; background: #6b6b74; }

/* ============================================================ Ekler (ek sözleşme 2): görsel küçük resim, dosya kartı, yükleme */
.lc-msg__bubble--att { padding: 4px; white-space: normal; }
.lc-msg__cap { margin: 0; padding: 6px 10px 5px; white-space: pre-wrap; }
.lc-att { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.lc-msg__bubble .lc-att { text-decoration: none; }
.lc-att--img {
  display: block; width: min(220px, 100%); aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px;
  background: var(--bg-3, #eeeeea);
}
.lc-att--img img { display: block; width: 100%; height: 100%; object-fit: cover; }
a.lc-att:focus-visible { outline: 2px solid var(--lc-red); outline-offset: 2px; border-radius: 14px; }
.lc-att--file { width: min(260px, 100%); min-height: 52px; padding-block: 8px; padding-inline: 8px 12px; border-radius: 14px; }
.lc-att__ic {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: #fff; color: var(--lc-red); box-shadow: inset 0 0 0 1px rgba(15, 15, 18, .06);
}
.lc-att__ic .ic { width: 20px; height: 20px; }
.lc-msg--visitor .lc-att__ic { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.lc-att__txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.lc-att__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .875rem; font-weight: 600; line-height: 1.3; }
.lc-att__meta { font-size: .75rem; line-height: 1.3; color: var(--ink-3, #5f5f68); font-variant-numeric: tabular-nums; }
.lc-msg--visitor .lc-att__meta { color: rgba(255, 255, 255, .78); }
.lc-att__dl { flex: none; display: grid; place-items: center; color: inherit; opacity: .85; }
.lc-att__dl .ic { width: 16px; height: 16px; }
a.lc-att--file:hover .lc-att__name { text-decoration: underline; text-underline-offset: .18em; }
/* Yükleme: bekleyen balon tam opak kalır, ek soluk; ilerleme çubuğu balonun altında */
.lc-msg.is-pending .lc-msg__bubble--att { opacity: 1; }
.lc-msg.is-pending .lc-att { opacity: .78; }
.lc-up { display: block; height: 4px; margin: 6px 8px 4px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .22); }
.lc-up__bar { display: block; width: 0; height: 100%; border-radius: inherit; background: #fff; }
.lc-msg.is-failed .lc-att__ic { background: var(--lc-soft); color: var(--lc-red); }
.lc-msg.is-failed .lc-att__meta { color: var(--ink-3, #5f5f68); }
.lc-msg__meta .lc-retry + .lc-retry { margin-inline-start: 10px; }
/* Panele dosya sürüklenince */
.lc-drop {
  position: absolute; inset: 8px; z-index: 6; display: grid; place-items: center; align-content: center; gap: 10px;
  border: 2px dashed var(--lc-red); border-radius: 16px; background: rgba(255, 255, 255, .95);
  color: var(--lc-ink); font-size: .9375rem; font-weight: 650; text-align: center; pointer-events: none;
}
.lc-drop .ic { width: 28px; height: 28px; color: var(--lc-red); }

/* ============================================================ Sohbet içi form kartı (temsilcinin gönderdiği) */
.lc-fcard {
  display: grid; gap: 12px; width: min(100%, 316px); margin: 0; padding: 14px;
  border: 1px solid var(--lc-line); border-radius: 18px; background: #fff; color: var(--lc-ink); text-align: start;
  box-shadow: 0 1px 2px rgba(15, 15, 18, .05), 0 12px 28px -18px rgba(15, 15, 18, .3);
}
.lc-msg--form:not(.is-first) .lc-fcard { border-start-start-radius: 6px; }
.lc-msg--form:not(.is-last) .lc-fcard { border-end-start-radius: 6px; }
.lc-fcard__t { margin: 0; font-size: .9375rem; font-weight: 650; line-height: 1.35; color: var(--lc-ink); overflow-wrap: anywhere; }
.lc-fcard__f { display: grid; gap: 10px; }
.lc-fcard__i { margin: -4px 0 2px; font-size: .875rem; line-height: 1.5; color: var(--ink-2, #3f3f46); white-space: pre-wrap; overflow-wrap: anywhere; }
.lc-fcard__i a { color: var(--accent-ink, #b00000); text-decoration: underline; text-underline-offset: .18em; }
.lc-fcard .lc-field { gap: 5px; }
.lc-fcard .lc-label { font-size: .8125rem; }
.lc-fcard .lc-input { min-height: 44px; padding: 10px 12px; border-radius: 12px; }
.lc-fcard textarea.lc-input { min-height: 84px; resize: vertical; overflow-y: auto; }
.lc-fcard select.select { min-height: 44px; border-radius: 12px; }
.lc-fcard .cs__btn { min-height: 44px; padding-inline: 12px 8px; border-radius: 12px; }
.lc-fcard .cs__btn:focus-visible, .lc-fcard .cs.is-open .cs__btn { box-shadow: var(--lc-ring); }
.lc-req { color: var(--bad, #c81e1e); }
/* Şifre: göster / gizle */
.lc-pw { position: relative; }
.lc-pw .lc-input { padding-inline-end: 48px; }
.lc-pw__btn {
  position: absolute; top: 0; inset-inline-end: 0; display: grid; place-items: center; width: 44px; height: 44px;
  margin: 0; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2, #3f3f46); cursor: pointer;
}
.lc-pw__btn:hover { color: var(--lc-ink); background: var(--lc-soft); }
.lc-pw__btn:focus-visible { outline: 2px solid var(--lc-red); outline-offset: -4px; }
.lc-pw__btn .ic { width: 18px; height: 18px; }
.lc-pw__btn .icon--eye-off, .lc-pw__btn[aria-pressed="true"] .icon--eye { display: none; }
.lc-pw__btn[aria-pressed="true"] .icon--eye-off { display: block; }
.lc-fcard__note {
  display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 9px 11px; border-radius: 12px;
  background: var(--lc-soft); font-size: .8125rem; line-height: 1.45; color: var(--ink-2, #3f3f46);
}
.lc-fcard__note .ic { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--ok, #15803d); }
.lc-fcard__go { --btn-h: 44px; width: 100%; }
.lc-log.is-closed .lc-fcard__f { opacity: .55; pointer-events: none; }
/* Kilitli kart: "Gönderildi" + özet */
.lc-fcard__done { display: grid; gap: 10px; }
.lc-fcard__ok { display: flex; align-items: center; gap: 7px; margin: 0; font-size: .875rem; font-weight: 650; line-height: 1.3; color: var(--ok, #15803d); }
.lc-fcard__ok .ic { flex: none; width: 16px; height: 16px; }
.lc-fcard__msg { margin: 0; font-size: .8125rem; line-height: 1.45; color: var(--ink-3, #5f5f68); }
.lc-sum { display: grid; gap: 8px; margin: 0; }
.lc-sum__row { display: grid; gap: 1px; min-width: 0; }
.lc-sum dt { font-size: .75rem; font-weight: 600; line-height: 1.3; color: var(--ink-3, #5f5f68); }
.lc-sum dd { margin: 0; font-size: .875rem; line-height: 1.4; color: var(--lc-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.lc-sum dd.is-masked { letter-spacing: .14em; }
/* Ziyaretçinin form yanıtı (sağda, koyu balon) */
.lc-msg__bubble--resp { min-width: min(200px, 84%); white-space: normal; }
.lc-resp__t { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; font-weight: 650; line-height: 1.35; }
.lc-resp__t .ic { flex: none; width: 15px; height: 15px; color: #86efac; }
.lc-resp__b { margin: 0; white-space: pre-wrap; }
.lc-msg--visitor .lc-sum dt { color: rgba(255, 255, 255, .78); }
.lc-msg--visitor .lc-sum dd { color: #fff; }
.lc-msg.is-failed .lc-sum dt { color: var(--ink-3, #5f5f68); }
.lc-msg.is-failed .lc-sum dd { color: var(--lc-ink); }

/* ============================================================ Yazma alanı */
.lc-foot { flex: none; padding: 10px 12px 0; border-top: 1px solid var(--lc-line); background: #fff; }
.lc-compose {
  display: flex; align-items: flex-end; gap: 4px; margin: 0; padding: 4px;
  border: 1px solid var(--line-2, #d3d3cd); border-radius: 26px; background: #fff;
}
/* Ataç (dosya ekle): yazı alanının başında */
.lc-clip {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-2, #3f3f46); cursor: pointer;
}
.lc-clip:hover { background: var(--lc-soft); color: var(--lc-ink); }
.lc-clip:disabled { color: var(--ink-4, #8b8b94); cursor: default; background: transparent; }
.lc-clip:focus-visible { outline: 2px solid var(--lc-red); outline-offset: -2px; border-radius: 50%; }
.lc-clip .ic { width: 20px; height: 20px; }
.lc-compose:hover { border-color: var(--ink-4, #8b8b94); }
.lc-compose:focus-within { border-color: var(--lc-red); box-shadow: var(--lc-ring); }
.lc-compose__in {
  flex: 1; min-width: 0; min-height: 44px; max-height: 136px; margin: 0; padding: 11px 0;
  border: 0; border-radius: 0; outline: 0; background: transparent; color: var(--lc-ink); box-shadow: none;
  font: inherit; font-size: 1rem; line-height: 22px; resize: none; overflow-y: hidden;
}
.lc-compose__in::placeholder { color: var(--ink-3, #5f5f68); opacity: 1; }
.lc-compose__in:focus { outline: none; }
.lc-send {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: var(--lc-red); color: #fff; cursor: pointer;
}
.lc-send:hover { background: var(--accent-hover, #c40000); }
.lc-send:disabled { background: var(--bg-3, #eeeeea); color: var(--ink-3, #5f5f68); cursor: default; }
.lc-send:focus-visible { outline: 2px solid var(--lc-ink); outline-offset: 2px; border-radius: 50%; }
.lc-send .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.lc-cerr { margin: 8px 4px 0; font-size: .8125rem; font-weight: 600; line-height: 1.4; color: var(--bad, #c81e1e); }
.lc-tools { display: flex; align-items: center; min-height: 44px; }
.lc-end {
  min-height: 44px; margin: 0; margin-inline-start: -6px; padding: 0 8px; border: 0; border-radius: 10px;
  background: none; color: var(--ink-2, #3f3f46); font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer;
}
.lc-end:hover { color: var(--lc-ink); text-decoration: underline; text-underline-offset: .2em; }
.lc-end:focus-visible, .lc-cbtn:focus-visible { outline: 2px solid var(--lc-red); outline-offset: -2px; }
.lc-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; width: 100%; }
.lc-confirm__q { flex: 1 1 auto; margin: 0; padding-inline-start: 2px; font-size: .8125rem; font-weight: 650; line-height: 1.35; color: var(--lc-ink); }
.lc-cbtn {
  flex: none; min-height: 44px; margin: 0; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--lc-ink); font: inherit; font-size: .8125rem; font-weight: 650; cursor: pointer;
}
.lc-cbtn:hover { background: var(--lc-soft); }
.lc-cbtn--dark { background: var(--lc-ink); color: #fff; }
.lc-cbtn--dark:hover { background: #26262c; }
.lc-cbtn:disabled { opacity: .55; cursor: default; }

/* --- Kapanan sohbet */
.lc-closed { flex: none; display: grid; justify-items: center; gap: 4px; padding: 18px 20px 20px; border-top: 1px solid var(--lc-line); background: #fff; text-align: center; }
.lc-closed__ic { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border-radius: 50%; background: var(--accent-soft, #fff1f1); color: var(--lc-red); }
.lc-closed__ic .ic { width: 22px; height: 22px; }
.lc-closed__t { margin: 0; font-size: 1rem; font-weight: 650; line-height: 1.3; color: var(--lc-ink); }
.lc-closed__s { margin: 0 0 10px; font-size: .875rem; line-height: 1.5; color: var(--ink-2, #3f3f46); }
.lc-restart { min-width: min(240px, 100%); }

/* ============================================================ Dar / alçak ekran: tam ekran sayfa */
@media (max-width: 559px), (max-height: 520px) {
  .lc-panel {
    inset: 0; width: auto; height: auto; border-radius: 0; box-shadow: none; transform-origin: 50% 100%;
    padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
  }
  /* Ekran klavyesi açılınca görünen alana otur (livechat.js visualViewport → --lc-vt / --lc-vh) */
  .lc-panel.has-vv { bottom: auto; top: var(--lc-vt, 0px); height: var(--lc-vh, 100%); }
  .lc-head { padding-top: max(12px, env(safe-area-inset-top)); }
  .lc-foot { padding-bottom: env(safe-area-inset-bottom); }
  .lc-closed { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}

/* ============================================================ Hareket (yalnız "hareketi azalt" kapalıyken) */
@media (prefers-reduced-motion: no-preference) {
  .lc-fab { transition: background-color .2s, transform .25s var(--ease, ease), box-shadow .2s, opacity .2s, visibility .2s; }
  .lc-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -12px rgba(15, 15, 18, .65), 0 2px 6px rgba(15, 15, 18, .14); }
  .lc-fab:active { transform: translateY(0) scale(.97); }
  .lc-fab__ic .ic { transition: opacity .2s, transform .35s var(--ease, ease); }
  .lc-fab__down { transform: rotate(-90deg) scale(.6); }
  .lc.is-open .lc-fab__chat { transform: rotate(90deg) scale(.6); }
  .lc.is-open .lc-fab__down { transform: none; }
  /* Panel düğmeden büyüyerek açılır */
  .lc-panel { transition: opacity .18s ease, transform .34s var(--ease, ease); }
  .lc-panel:not(.is-in) { opacity: 0; transform: translateY(12px) scale(.96); }
  .lc-input, .lc-compose { transition: border-color .2s, box-shadow .2s; }
  .lc-x, .lc-send, .lc-me__btn, .lc-cbtn, .lc-clip, .lc-pw__btn { transition: background-color .15s, color .15s; }
  .lc-up__bar { transition: width .2s linear; }
  .lc-msg.is-new { animation: lc-in .32s var(--ease, ease) both; }
  .lc-typing:not([hidden]) { animation: lc-in .28s var(--ease, ease) both; }
  .lc-typing__b i { animation: lc-dot 1.2s ease-in-out infinite; }
  .lc-typing__b i:nth-child(2) { animation-delay: .15s; }
  .lc-typing__b i:nth-child(3) { animation-delay: .3s; }
  .lc-spin, .lc-net .ic { animation: lc-rot .9s linear infinite; }
  .lc-net .ic { animation-duration: 1.6s; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 559px), (prefers-reduced-motion: no-preference) and (max-height: 520px) {
  .lc-panel:not(.is-in) { transform: translateY(32px); }
}
@media (prefers-reduced-motion: reduce) {
  .lc .btn, .lc .btn:hover, .lc .btn:active { transition: none; transform: none; }
  .lc .btn.is-loading::after { animation: none; }
}
@keyframes lc-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes lc-dot { 0%, 60%, 100% { transform: none; opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes lc-rot { to { transform: rotate(1turn); } }
