/* Canlı dəstək pəncərəsi: panel və ana səhifə */
.sc { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.sc-fab { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border: 0; border-radius: 50%; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan)); box-shadow: 0 10px 30px rgba(41, 154, 251, .45); transition: transform .15s; }
.sc-fab:hover { transform: scale(1.06); }
.sc-fab svg { width: 27px; height: 27px; }
.sc.open .sc-fab svg { transform: rotate(-8deg); }
.sc-badge[hidden] { display: none; }
.sc-badge { position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--danger); border: 2px solid var(--bg); }
.sc-panel { display: flex; flex-direction: column; width: 370px; height: min(560px, calc(100vh - 110px)); border-radius: 18px; overflow: hidden;
  background: var(--navy-900); border: 1px solid var(--border); box-shadow: var(--shadow); animation: scIn .18s ease; }
.sc-panel[hidden] { display: none; }
@keyframes scIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.sc-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; color: #fff; background: linear-gradient(135deg, var(--blue), #1d7fd6); }
.sc-head b { display: block; font-size: 15px; }
.sc-head small { font-size: 12px; opacity: .85; }
.sc-ava { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex: none; background: rgba(255, 255, 255, .2); }
.sc-ava svg { width: 20px; height: 20px; }
.sc-ava.big { width: 56px; height: 56px; margin: 0 auto 10px; color: var(--blue); background: rgba(41, 154, 251, .12); }
.sc-ava.big svg { width: 28px; height: 28px; }
.sc-x { margin-left: auto; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: #fff; cursor: pointer; }
.sc-x:hover { background: rgba(255, 255, 255, .15); }
.sc-x svg { width: 18px; height: 18px; }
.sc-body { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--navy-950); }
.sc-hello { margin: auto 0; text-align: center; padding: 10px 16px; }
.sc-hello b { font-size: 16px; }
.sc-hello p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.sc-msg { display: flex; flex-direction: column; max-width: 82%; }
.sc-msg.me { align-self: flex-end; align-items: flex-end; }
.sc-msg.them { align-self: flex-start; }
.sc-bub { padding: 9px 13px; border-radius: 16px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-msg.me .sc-bub { color: #fff; background: var(--blue); border-bottom-right-radius: 4px; }
.sc-msg.them .sc-bub { color: var(--text); background: var(--navy-800); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.sc-msg small { margin-top: 3px; font-size: 11px; color: var(--muted); }
.sc-sys { align-self: center; padding: 4px 10px; border-radius: 99px; font-size: 11.5px; color: var(--muted); background: var(--muted-bg); }
.sc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--navy-900); }
.sc-form[hidden] { display: none; }
.sc-form textarea { flex: 1; resize: none; max-height: 120px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--navy-950); color: var(--text); font: inherit; font-size: 14px; line-height: 1.4; outline: none; }
.sc-form textarea:focus { border-color: var(--blue); }
.sc-send { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border: 0; border-radius: 12px; cursor: pointer; color: #fff; background: var(--blue); }
.sc-send:hover { background: var(--blue-hover); }
.sc-send:disabled { opacity: .5; }
.sc-send svg { width: 18px; height: 18px; }
.sc-closed { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }
.sc-closed[hidden] { display: none; }
@media (max-width: 520px) {
  .sc { right: 12px; bottom: 12px; }
  .sc-panel { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; }
  .sc.open .sc-fab { display: none; }
}

.sc-form { flex-wrap: wrap; }
.sc-profile { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.sc-profile[hidden] { display: none; }
.sc-profile input { min-width: 0; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--border); background: var(--navy-950); color: var(--text); font: inherit; font-size: 13.5px; outline: none; }
.sc-profile input:focus { border-color: var(--blue); }
.sc-err { width: 100%; font-size: 12.5px; color: var(--danger); }
.sc-err[hidden] { display: none; }

/* Şəkilli mesaj (dəstək göndərir) */
.sc-img { display: block; max-width: 220px; max-height: 260px; width: auto; border-radius: 10px; margin: -2px -4px 4px; cursor: zoom-in; }
.sc-bub > div + div, .sc-bub > a + div { margin-top: 4px; }
