/* =====================================================================
   پنجره گفتگوی سایت (views/partials/chat-box.php) — گوشه پایین چپ، بالای دکمه شناور تماس
   ===================================================================== */
.dnk-chat{position:fixed;left:16px;bottom:18px;z-index:58;font-size:14px;pointer-events:none}
.dnk-chat>*{pointer-events:auto}
.dnk-chat [hidden]{display:none!important}
.dc-launch{width:56px;height:56px;border-radius:50%;border:0;background:var(--accent);color:#fff;cursor:pointer;box-shadow:0 10px 30px rgba(255,90,31,.4);display:grid;place-items:center}

/* حباب دعوت (موبایل) */
.dc-teaser{position:absolute;left:68px;bottom:9px;display:flex;align-items:center;background:#fff;border:1px solid var(--line);border-radius:999px;box-shadow:var(--shadow);white-space:nowrap;animation:dcIn .25s ease}
.dc-teaser-txt{border:0;background:transparent;font:inherit;font-weight:700;font-size:13px;color:var(--ink);padding:9px 14px 9px 4px;cursor:pointer}
.dc-teaser-x{border:0;background:transparent;font-size:18px;line-height:1;color:var(--muted);padding:6px 6px 6px 12px;cursor:pointer}

/* پنجره */
.dc-panel{position:absolute;left:0;bottom:70px;width:340px;max-width:calc(100vw - 32px);background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 18px 50px rgba(17,20,23,.22);display:flex;flex-direction:column;overflow:hidden;animation:dcIn .22s ease}
@keyframes dcIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.dc-head{display:flex;align-items:center;gap:10px;background:var(--dark);color:#fff;padding:12px 14px}
.dc-av{width:38px;height:38px;border-radius:50%;background:var(--accent);display:grid;place-items:center;flex:0 0 auto}
.dc-ttl{flex:1;min-width:0;display:grid;line-height:1.5}
.dc-ttl b{font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dc-ttl small{font-size:11.5px;color:#c4cace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dc-close{border:0;background:transparent;color:#fff;font-size:24px;line-height:1;width:34px;height:34px;border-radius:10px;cursor:pointer;flex:0 0 auto}
.dc-close:hover{background:rgba(255,255,255,.12)}
.dc-log{padding:14px;display:flex;flex-direction:column;gap:8px;height:230px;max-height:42vh;overflow-y:auto;background:#f6f7f8}
.dc-msg{max-width:88%;padding:9px 12px;border-radius:14px;line-height:1.85;font-size:13.5px;word-break:break-word}
.dc-msg.bot{align-self:flex-start;background:#fff;border:1px solid var(--line);border-start-start-radius:4px}
.dc-msg.me{align-self:flex-end;background:var(--accent);color:#fff;border-end-end-radius:4px}
.dc-msg.err{border-color:#f3c0b8;background:#fff5f3;color:#a8321f}
.dc-msg.wait{color:var(--muted);font-size:12.5px}
.dc-quick{display:flex;gap:8px;padding:8px 12px;border-top:1px solid var(--line);background:#fff}
.dc-quick a{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--line);border-radius:10px;padding:7px 8px;font-size:12.5px;font-weight:700;white-space:nowrap}
.dc-quick a.wa{color:#1fa855}
.dc-quick a:hover{background:#f6f7f8}
.dc-quick .ltr{direction:ltr;unicode-bidi:embed}
.dc-form{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--line);background:#fff}
.dc-hp{position:absolute!important;left:-9999px;width:1px;height:1px;opacity:0}
.dc-input{flex:1;min-width:0;border:1px solid var(--line);border-radius:12px;padding:0 12px;height:44px;font:inherit;font-size:16px;background:#fff}
.dc-input:focus{outline:0;border-color:var(--accent)}
.dc-input[dir=ltr]{text-align:left}
.dc-send{flex:0 0 44px;height:44px;border:0;border-radius:12px;background:var(--accent);color:#fff;cursor:pointer;display:grid;place-items:center}
.dc-send:disabled{opacity:.5;cursor:default}
.dc-send svg{transform:scaleX(-1)}

@media(max-width:980px){
  .dnk-chat{bottom:78px}
}
@media(max-width:640px){
  .dnk-chat{left:12px}
  .dc-teaser{left:60px;bottom:6px}
  .dc-panel{position:fixed;left:12px;right:12px;bottom:144px;width:auto;max-width:none}
  .dc-log{height:200px;max-height:34vh}
}
@media print{.dnk-chat{display:none!important}}
