/* In-app technical support panel (js/helpdesk.js). Uses the page's colour variables, so both editions and both themes fit. */
.hd-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--bar-field-line, rgba(255, 255, 255, .3));
  background: var(--bar-field, rgba(255, 255, 255, .08)); color: var(--bar-text, #fff); font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; }
.hd-btn:hover { background: rgba(255, 255, 255, .16); }
.hd-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hd { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 60; display: flex; flex-direction: column; background: var(--panel, #fff);
  color: var(--text, #111); border-left: 1px solid var(--line, #ddd); box-shadow: -16px 0 40px rgba(0, 0, 0, .18); }
.hd.hidden { display: none; }
.hd-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line, #ddd); }
.hd-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .hd-head b { font-size: 18px; } .hd-head small { color: var(--muted); }
.hd-lang { border: 1px solid var(--line-strong, #ccc); background: transparent; color: var(--text); border-radius: 999px; padding: 6px 12px; font-weight: 600; cursor: pointer; }
.hd-x { border: 0; background: transparent; color: var(--text); font-size: 28px; line-height: 1; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }
.hd-x:hover { background: var(--surface, #f3f3f3); }
.hd-body { flex: 1; overflow: auto; padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.hd-body h4 { margin: 8px 0 0; }
.hd-new { display: flex; flex-direction: column; gap: 10px; } .hd-new label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.hd textarea { width: 100%; box-sizing: border-box; resize: vertical; font: 15px/1.4 Inter, system-ui, sans-serif; padding: 10px 12px; border-radius: 10px;
  border: 1.5px solid var(--field-line, #999); background: var(--panel); color: var(--text); }
.hd-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500 !important; }
.hd-note { color: var(--muted); margin: 0; }
.hd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hd-list button { width: 100%; text-align: left; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface, transparent); color: var(--text); cursor: pointer; }
.hd-list button:hover { border-color: var(--accent); } .hd-list b { flex: 1 1 100%; font-weight: 600; } .hd-list small { color: var(--muted); }
.hd-pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2, #eee); color: var(--text); }
.hd-pill.s-escalated { background: var(--warn-soft); color: var(--warn); } .hd-pill.s-resolved, .hd-pill.s-closed { background: var(--good-soft); color: var(--good); }
.hd-pill.s-critical { background: var(--bad-soft); color: var(--bad); }
.hd-back { align-self: flex-start; border: 0; background: transparent; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; }
.hd-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); }
.hd-chat { display: flex; flex-direction: column; gap: 10px; }
.hd-msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; background: var(--surface, #f3f3f3); line-height: 1.45; overflow-wrap: anywhere; }
.hd-msg small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.hd-msg.r-person { align-self: flex-end; background: var(--accent-soft); }
.hd-msg.r-technician { border: 1.5px solid var(--accent-line); }
.hd-sys { align-self: center; max-width: 94%; text-align: left; font-size: 14px; color: var(--muted); background: var(--surface-2, #f0f0f0); padding: 8px 12px; border-radius: 10px; }
.hd-act { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.hd-act span { color: var(--muted); font-size: 14px; } .hd-act small { color: var(--text); }
.hd-act.a-succeeded { border-style: solid; border-color: var(--good); } .hd-act.a-failed, .hd-act.a-refused, .hd-act.a-expired { border-color: var(--bad); }
.hd-act.a-awaiting_approval { border-color: var(--warn); background: var(--warn-soft); }
.hd-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .hd-sp { flex: 1; } .hd-end { justify-content: flex-end; }
.hd-say { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; }
.hd-files { display: flex; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.hd-file { cursor: pointer; }
@media (max-width: 600px) { .hd { width: 100vw; border-left: 0; } .hd-btn span { display: none; } .hd-btn { padding: 0 10px; } }
@media print { .hd, .hd-btn { display: none !important; } }
