/* ---------- Переписка по заказу (js/chat.js) ---------- */
.chat-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }
.chat-btn.unread { border-color: var(--accent); }
.chat-new { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); }

.chat { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; overscroll-behavior: contain;
  margin-top: 10px; padding: 10px; border-radius: 14px; background: var(--bg); }
.chat > .adm-sub, .chat > .hint { margin: 0; }
.msg { max-width: 85%; align-self: flex-start; padding: 8px 11px; border-radius: 14px 14px 14px 4px;
  background: var(--surface); border: 1px solid var(--line); }
.msg.mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; border-color: transparent;
  background: color-mix(in srgb, var(--accent) 24%, var(--surface)); }
.msg-who { margin: 0; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.msg-text { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-img { display: block; margin-top: 6px; max-width: 100%; max-height: 260px; min-width: 80px; min-height: 60px;
  border-radius: 10px; background: var(--line); object-fit: contain; cursor: zoom-in; }
.msg-img.full { max-height: none; cursor: zoom-out; }
.msg-doc { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 6px; padding: 8px 10px;
  text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px;
  font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.msg-doc small { color: var(--muted); font-weight: 500; }
.msg-doc:disabled { opacity: .6; }

.chat-compose { margin-top: 10px; }
.chat-compose textarea { width: 100%; min-height: 56px; resize: vertical; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.chat-row { display: flex; gap: 8px; align-items: stretch; margin-top: 8px; }
.chat-row .ghost { margin-top: 0; display: flex; align-items: center; cursor: pointer; }
.chat-file { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 8px 10px; border-radius: 10px;
  background: var(--bg); font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.chat-file button { margin-left: auto; flex: none; border: 0; background: none; color: var(--danger); font-weight: 600; font-size: 13px; }
