/* Support page (support.html), the partner page, and the bits the account page and the admin portal borrow. */

.support-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.support-hero h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 6px; }
.support-hero p { margin: 0; color: var(--dim); max-width: 60ch; line-height: 1.8; }
.support-hero .row-actions { margin-top: 0; }

.support-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.support-side { padding: 16px; display: grid; gap: 10px; }
.support-side h3 { margin: 4px 4px 2px; font-size: 14px; color: var(--muted); font-weight: 600; }
.ticket-item { display: grid; gap: 3px; text-align: start; width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.02); color: var(--text); cursor: pointer; font: inherit; transition: background .15s, border-color .15s; }
.ticket-item:hover { background: rgba(255,255,255,.05); }
.ticket-item[aria-current="true"] { border-color: rgba(255, 194, 75, .55); background: rgba(255, 194, 75, .07); }
.ticket-item b { font-size: 14px; }
.ticket-item span { font-size: 12px; color: var(--muted); }

.chat { display: flex; flex-direction: column; min-height: 560px; padding: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.chat-head h2 { font-size: 17px; margin: 0; }
.chat-head .who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--on-gold);
  background: linear-gradient(160deg, var(--gold-hi), var(--gold) 60%, var(--gold-2)); flex: none; }
.chat-head small { display: block; color: var(--muted); font-size: 12px; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-inline-end: 6px; box-shadow: 0 0 0 3px rgba(22, 199, 106, .18); }

.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; max-height: 62vh; scroll-behavior: smooth; }
.msg { max-width: min(78%, 560px); padding: 10px 14px; border-radius: 16px; line-height: 1.85; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere;
  animation: msg-in .25s var(--ease); }
.msg a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.msg .name { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; font-weight: 700; }
.msg.them { align-self: flex-start; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-start-start-radius: 6px; }
.msg.me { align-self: flex-end; background: rgba(255, 194, 75, .14); border: 1px solid rgba(255, 194, 75, .3); border-start-end-radius: 6px; }
.msg.staff { border-color: rgba(22, 199, 106, .35); }
.msg.system { align-self: center; max-width: 90%; background: none; border: 0; color: var(--muted); font-size: 13px; text-align: center; }
.msg .msg-action { margin-top: 10px; }
.day-sep { align-self: center; color: var(--muted); font-size: 12px; margin: 8px 0; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.typing { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 16px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); animation: dot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px; border-top: 1px solid var(--line); align-items: end; }
.composer textarea { resize: none; min-height: 48px; max-height: 160px; }
.chat-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 14px 0 18px; }
.cat { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.03); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: start; transition: border-color .15s, background .15s; }
.cat:hover { background: rgba(255,255,255,.06); }
.cat[aria-pressed="true"] { border-color: var(--gold); background: rgba(255, 194, 75, .1); }
.cat span { font-size: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); color: var(--dim);
  font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { color: var(--text); background: rgba(255,255,255,.07); }

.stars { display: flex; gap: 6px; justify-content: center; margin: 8px 0; }
.stars button { font-size: 26px; background: none; border: 0; cursor: pointer; filter: grayscale(1) opacity(.5); transition: filter .15s, transform .15s; }
.stars button:hover, .stars button.on { filter: none; transform: scale(1.1); }
.chat-empty { margin: auto; text-align: center; color: var(--muted); padding: 30px; line-height: 1.9; }

/* the admin portal's sales and support views */
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 10px; }
.mini-bars i { flex: 1; min-width: 3px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--gold), var(--ember)); opacity: .85; position: relative; }
.mini-bars i:hover { opacity: 1; }
.mini-bars i.zero { background: rgba(255,255,255,.06); }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.money { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.stat-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.stat-card b.money { font-size: clamp(22px, 2.2vw, 30px); white-space: nowrap; }
.stat-card.good b { color: var(--green); }
.stat-card.warn b { color: var(--amber); }
.log-lines { font-family: Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.8; white-space: pre-wrap; margin: 0; color: var(--dim); }
.check-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.check-list li { display: flex; gap: 10px; align-items: baseline; }
.check-list li::before { content: "○"; color: var(--muted); }
.check-list li.done::before { content: "●"; color: var(--green); }
.transcript { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; padding: 6px 2px; }
.transcript .msg { max-width: 92%; }
.transcript .msg.note { align-self: center; background: rgba(77, 210, 255, .07); border: 1px dashed rgba(77, 210, 255, .35); color: #a8e6ff; font-size: 13px; }
.kb-item textarea { min-height: 150px; }

@media (max-width: 900px) {
  .support-grid { grid-template-columns: 1fr; }
  .split-2, .split-3 { grid-template-columns: 1fr; }
  .chat-log { max-height: 58vh; }
  .msg { max-width: 88%; }
}
