/* The support chat (chat.js): on support.goseq.app, and inside the chat button's panel on every page. It uses the
   site's colour tokens; widget.css gives the panel its own copy, so it looks the same on pages without style.css. */
.gc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gc-grow { flex: 1; min-width: 0; }
.gc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: 600 15px/1.2 var(--font); cursor: pointer; text-decoration: none; }
.gc-btn:hover { border-color: var(--accent); }
.gc-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.gc-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.gc-btn.block { width: 100%; }
.gc-btn[disabled] { opacity: .65; cursor: progress; }
.gc-link { min-height: 44px; padding: 8px 2px; font: 600 14.5px var(--font); color: var(--accent); background: none; border: 0; cursor: pointer; }
.gc-link:hover { color: var(--accent-hover); text-decoration: underline; }
.gc-link[disabled] { opacity: .5; cursor: default; text-decoration: none; }
.gc-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; }
/* the app's spinner (www/css/app.css): with reduce motion on, a still arc */
.gc-arc { display: inline-block; flex: none; width: 18px; height: 18px; }
.gc-arc circle { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 89, 200; stroke-dashoffset: -35; }
:is(.gc-btn, .gc-link, .gc-chip, .gc-req, .gc-send, .gc-attach, .gc-pic a, .gc-file, .gc-stars button):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.gc-pill { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 4px 11px 4px 9px; border-radius: 99px; font-size: 13px; font-weight: 700; line-height: 1.3; white-space: nowrap;
  color: var(--st-open); background: var(--st-open-bg); }
.gc-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.gc-pill.s-pending { color: var(--st-pending); background: var(--st-pending-bg); }
.gc-pill.s-waiting { color: var(--st-waiting); background: var(--st-waiting-bg); }
.gc-pill.s-resolved { color: var(--st-resolved); background: var(--st-resolved-bg); }
.gc-pill.s-closed { color: var(--st-closed); background: var(--st-closed-bg); }

/* ---------- the header ---------- */
.gc-head { padding: 12px 0 18px; border-bottom: 1px solid var(--line); }
.gc-ref { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.gc-subject { margin: 0 0 12px; font-size: clamp(24px, 4vw, 34px); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; overflow-wrap: anywhere; }
.gc-subject:focus { outline: none; }
.gc-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.gc-note { font-size: 15px; color: var(--muted); }
.gc-follow { margin: 10px 0 0; font-size: 14.5px; color: var(--muted); }
.gc-follow .gc-link { min-height: 0; padding: 0; }

/* ---------- the conversation ---------- */
.gc-chat { margin: 0; padding: 22px 0 8px; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.gc-row { display: flex; gap: 10px; align-items: flex-end; }
.gc-row.me { flex-direction: row-reverse; }
.gc-av { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; overflow: hidden; font: 800 14px var(--font); }
.gc-av svg { width: 100%; height: 100%; display: block; }
.gc-av.isaac { border-radius: 50%; background: var(--text); color: var(--bg); }
.gc-col { min-width: 0; max-width: min(560px, calc(100% - 42px)); display: grid; gap: 4px; }
.me .gc-col { justify-items: end; max-width: 86%; }
.gc-meta { padding: 0 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.gc-bubble { padding: 11px 15px; border-radius: 18px 18px 18px 6px; background: var(--surface); border: 1px solid var(--line); font-size: 16px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.me .gc-bubble { border-radius: 18px 18px 6px 18px; background: var(--accent); border-color: transparent; color: var(--on-accent); }
.me .gc-bubble a { color: inherit; }
.gc-row.isaac .gc-bubble { border-color: color-mix(in srgb, var(--text) 38%, transparent); }
.gc-bubble a { color: var(--accent); font-weight: 600; }
.gc-bubble.dots { justify-self: start; display: inline-flex; gap: 5px; align-items: center; min-height: 44px; padding: 0 18px; }
.gc-bubble.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .35; }
.gc-bubble.dots i:nth-child(2) { opacity: .6; } .gc-bubble.dots i:nth-child(3) { opacity: .85; }
.gc-tw::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -3px; background: currentColor; opacity: .6; }
.gc-sys { align-self: center; max-width: 90%; font-size: 13.5px; line-height: 1.45; text-align: center; color: var(--muted); }
.gc-sys.waiting { color: var(--text); font-weight: 600; }
/* the handover dividers run the full width, so a change of who you're talking to can't be missed */
.gc-div { display: flex; align-items: center; gap: 12px; font-size: 13.5px; font-weight: 700; color: var(--text); text-align: center; }
.gc-div::before, .gc-div::after { content: ""; flex: 1 1 16px; height: 1px; background: color-mix(in srgb, var(--text) 22%, transparent); }
.gc-div span { display: inline-flex; align-items: center; gap: 8px; }
.gc-div .gc-av { width: 24px; height: 24px; font-size: 11px; border-radius: 7px; }
.gc-div .gc-av.isaac { border-radius: 50%; }
/* the summary, and "Did this sort it out?" */
.gc-card { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.gc-card b { display: block; font-size: 15.5px; }
.gc-sum ul { margin: 8px 0 0; padding-left: 20px; list-style: disc; font-size: 15px; line-height: 1.5; }
.gc-sum li + li { margin-top: 4px; }
.gc-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.gc-ask b { flex: 1 1 160px; }
.gc-ask-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.gc-ask:not(.live) { align-self: center; padding: 0; background: none; border: 0; font-size: 13.5px; color: var(--muted); }
.gc-ask:not(.live) b { font-size: inherit; font-weight: 400; }
.gc-ask:not(.live) .gc-ask-btns { display: none; }
/* a screenshot or photo: a thumbnail that opens full size, or a file to save when the browser can't show it */
.gc-bubble.gc-pic { padding: 0; border: 0; background: none; white-space: normal; }
.gc-pic a:not(.gc-file) { display: block; border-radius: 14px; }
.gc-pic img { display: block; max-width: min(220px, 100%); max-height: 300px; width: auto; height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.gc-pic-wait { display: grid; place-items: center; width: 160px; height: 120px; border-radius: 14px; background: var(--surface-2); color: var(--accent); }
.gc-pic-wait .gc-arc { width: 26px; height: 26px; }
.gc-file { display: flex; align-items: center; gap: 10px; max-width: 260px; min-height: 56px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; }
.gc-row .gc-bubble .gc-file { color: var(--text); font-weight: 500; }
a.gc-file[href]:hover { border-color: var(--accent); }
.gc-file svg { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gc-file b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-file small { display: block; font-size: 13px; color: var(--muted); }
.gc-sending .gc-bubble { display: inline-flex; align-items: center; gap: 9px; opacity: .8; }
.gc-sending .gc-bubble span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.gc-empty { padding: 36px 0; text-align: center; color: var(--muted); }

/* ---------- a closed chat ---------- */
.gc-end { margin: 18px 0 0; padding: 20px; border-radius: 18px; background: var(--surface-2); }
.gc-end .gc-h2 { margin: 0 0 8px; }
.gc-stars { display: flex; gap: 2px; margin: 4px 0 12px; }
.gc-stars button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.gc-stars svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.gc-stars button.on { color: #D99100; }
.gc-stars button.on svg { fill: currentColor; }
.gc-rate-more { display: grid; gap: 10px; margin-bottom: 14px; }
.gc-rate-more .gc-btn { justify-self: start; }
.gc-thanks { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-weight: 600; }
.gc-thanks svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.gc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gc-said { margin-top: 8px; } .gc-said:empty { display: none; }

/* ---------- the composer: sticky under the page's chat; pinned to the foot of the panel ---------- */
.gc-compose { position: sticky; bottom: 0; margin-top: 14px; padding: 10px 0 calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--bg) 16px); }
.gc-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 12px 14px; border-radius: 14px; background: var(--st-pending-bg); color: var(--text); font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.gc-banner .gc-av { width: 28px; height: 28px; font-size: 12px; }
.gc-box { display: flex; gap: 10px; align-items: flex-end; padding: 7px 7px 7px 14px; border: 1px solid var(--field-line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.gc-box:focus-within { border-color: var(--accent); }
.gc-box textarea, .gc-box textarea:focus-visible { flex: 1; min-width: 0; min-height: 44px; max-height: 40vh; padding: 10px 0; border: 0; border-radius: 0; background: none; box-shadow: none; font: 16px/1.45 var(--font); color: var(--text); resize: none; outline: none; }
.gc-send { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.gc-send:hover { background: var(--accent-hover); }
.gc-send svg, .gc-chip svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gc-send[disabled] { opacity: .5; }
.gc-attach { flex: none; display: grid; place-items: center; width: 44px; height: 46px; margin-right: -6px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--muted); cursor: pointer; }
.gc-attach:hover { color: var(--accent); background: var(--surface-2); }
.gc-attach svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gc-attach[disabled] { opacity: .4; cursor: default; background: none; color: var(--muted); }
.gc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; padding-top: 8px; font-size: 13.5px; color: var(--muted); }
.gc-foot .gc-link { min-height: 40px; }
.gc-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 99px; border: 1px solid var(--field-line); background: var(--surface);
  color: var(--text); font: 600 14.5px var(--font); cursor: pointer; }
.gc-chip:hover { border-color: var(--accent); color: var(--accent); }
.gc-err { margin: 0 0 8px; font-size: 14.5px; font-weight: 600; color: var(--bad); }
.gc-err:empty { display: none; }

/* ---------- lists and forms ---------- */
.gc-h { margin: 0 0 10px; font-size: 20px; letter-spacing: -.02em; }
.gc-list + .gc-h { margin-top: 24px; }
.gc-h2 { margin: 0 0 4px; font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.gc-h2:focus { outline: none; }
.gc-list { margin: 0; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.gc-list li + li { border-top: 1px solid var(--line); }
.gc-req { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; font: inherit; color: inherit; text-align: left; background: none; border: 0; cursor: pointer; }
.gc-req:hover { background: var(--surface-2); }
.gc-req b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-req small { display: block; font-size: 13.5px; color: var(--muted); }
.gc-new { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; }
.gc-id, .gc-form { display: grid; gap: 12px; }
.gc-f { display: grid; gap: 6px; margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.gc-f i { font-style: normal; font-weight: 500; }
.gc-f input, .gc-f textarea, .gc-f select { width: 100%; min-height: 48px; margin: 0; padding: 10px 14px; font: 16px/1.4 var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--field-line); border-radius: 12px; box-sizing: border-box; }
.gc-f textarea { min-height: 76px; resize: vertical; }
.gc-f :is(input, textarea, select):focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.gc-code { font-size: 22px !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.gc-lead { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.gc-lead b { color: var(--text); }
.gc-lead:focus { outline: none; }
.gc-small { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.gc-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; margin: -4px 0 0; }
.gc-or { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.gc-or::before, .gc-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

@media (prefers-reduced-motion: no-preference) {
  @keyframes gc-in { from { opacity: 0; transform: translateY(8px); } }
  @keyframes gc-dot { 0%, 60%, 100% { transform: none; opacity: .35; } 30% { transform: translateY(-5px); opacity: 1; } }
  @keyframes gc-caret { 50% { opacity: 0; } }
  @keyframes gc-spin { to { transform: rotate(360deg); } }
  @keyframes gc-dash { 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; } 50% { stroke-dasharray: 89, 200; stroke-dashoffset: -35; } 100% { stroke-dasharray: 89, 200; stroke-dashoffset: -124; } }
  .gc-chat > li.new { animation: gc-in .32s var(--ease) both; }
  .gc-bubble.dots i { animation: gc-dot 1.2s ease-in-out infinite; }
  .gc-bubble.dots i:nth-child(2) { animation-delay: .15s; } .gc-bubble.dots i:nth-child(3) { animation-delay: .3s; }
  .gc-tw::after { animation: gc-caret .9s steps(1) infinite; }
  .gc-spin { animation: gc-spin .8s linear infinite; }
  .gc-arc { animation: gc-spin 1.4s linear infinite; }
  .gc-arc circle { animation: gc-dash 1.4s ease-in-out infinite; }
}
/* printing a chat: just the conversation */
@media print {
  body > header, body > footer, body > svg, .sp-home, .tk-back, .gc-compose, .gc-actions, .gc-rate, .gc-said, .gsw { display: none !important; }
  .gc-end { padding: 0; background: none; }
  .gc-bubble, .gc-card { break-inside: avoid; }
}
