/* Web support: the customer page (/support) and the technician's viewer in the Console. */

/* ---------- customer page ---------- */
.sp { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.sp-card { width: min(460px, 100%); display: flex; flex-direction: column; gap: 16px; }
.sp-code { font-size: 28px; letter-spacing: 10px; text-align: center; direction: ltr; font-variant-numeric: tabular-nums; }
.sp-status { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius);
  background: var(--panel-2); border: 1px solid var(--border); }
.sp-status.sharing { border-color: var(--ok); }
.sp-preview { width: 100%; max-height: 200px; background: #000; border-radius: var(--radius); object-fit: contain; }
.sp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-actions .btn { flex: 1; justify-content: center; }
.btn.big { padding: 12px 18px; font-size: 15px; }

/* ---------- chat (both sides) ---------- */
.chat { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.chat-log { flex: 1; min-height: 80px; max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
  padding: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); }
.chat-log .msg { max-width: 85%; padding: 6px 10px; border-radius: 10px; background: var(--panel); white-space: pre-wrap;
  overflow-wrap: anywhere; align-self: flex-start; }
.chat-log .msg.mine { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.chat-log .msg.sys { align-self: center; background: none; color: var(--muted); font-size: 12px; }
.chat form { display: flex; gap: 8px; }
.chat form input { flex: 1; }

/* ---------- technician viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; }
.viewer > header { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel);
  border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.viewer > header .title { font-weight: 600; }
.viewer > header .stats { font-size: 12px; color: var(--muted); direction: ltr; }
.viewer > header .spacer { flex: 1; }
.viewer-body { flex: 1; display: flex; min-height: 0; }
.viewer-stage { flex: 1; position: relative; overflow: auto; display: flex; align-items: center; justify-content: center; }
.viewer-stage video { display: block; max-width: 100%; max-height: 100%; }
.viewer-stage.actual { align-items: flex-start; justify-content: flex-start; }
.viewer-stage.actual video { max-width: none; max-height: none; }
.viewer-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--muted); padding: 24px; pointer-events: none; }
.viewer-side { width: 300px; background: var(--panel); border-inline-start: 1px solid var(--border); padding: 12px;
  display: flex; flex-direction: column; gap: 12px; }
.viewer-alert { position: absolute; top: 12px; inset-inline: 12px; margin-inline: auto; width: fit-content; max-width: 90%;
  padding: 8px 14px; border-radius: 8px; background: var(--panel); border: 1px solid var(--border); color: var(--text);
  overflow-wrap: anywhere; z-index: 1; }
.viewer-side .chat { flex: 1; }
.monitor-select { width: auto; font-size: 12px; padding: 3px 6px; }
.files-box { display: flex; flex-direction: column; gap: 8px; }
.files-actions { display: flex; gap: 6px; }
.transfers { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow: auto; }
.transfer { font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.transfer-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transfer progress { width: 100%; height: 6px; }
.transfer-state { display: flex; align-items: center; justify-content: space-between; gap: 6px; overflow-wrap: anywhere; }
.transfer-error { color: var(--bad); }
.viewer-side .chat-log { max-height: none; }
@media (max-width: 800px) { .viewer-side { position: absolute; inset-inline-end: 0; top: 0; bottom: 0; } }

/* ---------- session list ---------- */
.code-big { font-size: 34px; letter-spacing: 8px; direction: ltr; text-align: center; font-variant-numeric: tabular-nums;
  padding: 12px; background: var(--panel-2); border: 1px dashed var(--border); border-radius: var(--radius); }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { flex: 1; direction: ltr; }
.sp-agent { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); }
