/* Support portal additions. Only what site.css does not already provide;
   colours, radii and shadows come from the tokens in site.css. */

/* Live status pill in the page head */
.status-pill { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 8px 16px; border-radius: var(--pill); border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: .9rem; font-weight: 700; text-decoration: none; box-shadow: var(--shadow-1); }
.status-pill:hover { border-color: var(--blue-300); color: var(--blue-700); }
.status-pill .muted { font-weight: 600; }

/* Two-column section: heading on the left, content on the right */
.support-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.support-split .section-head { margin-bottom: 0; }
@media (max-width: 860px) { .support-split { grid-template-columns: 1fr; } }

/* Product cards: documentation and ticket links stacked, not side by side */
.card-foot.product-links { flex-direction: column; align-items: flex-start; gap: 8px; }

/* Radio choices with a description (priority) */
.choice-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-group legend { padding: 0; }
.choice-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .choice-list { grid-template-columns: 1fr; } }
/* .field label (site.css) would make these blocks; keep the .check grid. */
.choice-group .choice { display: grid; margin: 0; font-size: .93rem; font-weight: 500; color: var(--text); }
.choice { padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-s); background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--blue-300); }
.choice:has(input:checked) { border-color: var(--blue-500); background: var(--blue-50); }
.choice:has(input:focus-visible) { box-shadow: var(--ring); }
.choice strong { display: block; }
.choice .help { margin: 2px 0 0; }
.field.has-error .choice { border-color: var(--red-500); }

/* Ticket reference and private link */
.ticket-ref { font-family: var(--mono); font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem); font-weight: 700; letter-spacing: .08em; color: var(--ink); margin: 0 0 6px; }
.private-link { display: grid; gap: 10px; margin: 18px 0; }
.private-link input { font-family: var(--mono); font-size: .9rem; font-weight: 600; }
.ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 4px; font-size: .9rem; font-weight: 600; color: var(--muted); }

/* Progress stepper */
.ticket-progress { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ticket-progress li { padding-top: 12px; border-top: 4px solid var(--line); font-size: .9rem; font-weight: 700; color: var(--faint); line-height: 1.35; }
.ticket-progress li.is-done { border-top-color: var(--green-500); color: var(--green-700); }
.ticket-progress li[aria-current="step"] { border-top-color: var(--blue-600); color: var(--ink); }
.ticket-progress time { display: block; margin-top: 2px; font-size: .8rem; font-weight: 600; color: var(--muted); }
@media (max-width: 560px) { .ticket-progress { grid-template-columns: 1fr 1fr; row-gap: 16px; } }
/* Redirect target after "Mark as resolved": keeps the notice clear of the sticky header */
.ticket-status { scroll-margin-top: 110px; }

/* Conversation */
.thread { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 14px; }
.msg { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-1); scroll-margin-top: 110px; }
.msg-staff { border-left: 4px solid var(--blue-500); }
.msg-customer { border-left: 4px solid var(--green-500); }
.msg-system { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 16px; background: var(--surface); box-shadow: none; font-size: .9rem; font-weight: 600; color: var(--muted); }
.msg-system .icon { color: var(--faint); width: 18px; height: 18px; }
.msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 10px; font-size: .88rem; color: var(--muted); }
.msg-head strong { color: var(--ink); font-size: .98rem; }
.msg-body { overflow-wrap: anywhere; }
.msg-body p:last-child { margin-bottom: 0; }
.msg time { font-weight: 600; }

/* Ticket details */
.ticket-facts { margin: 0; }
.ticket-facts > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.ticket-facts > div:last-child { border-bottom: 0; }
.ticket-facts dt { font-size: .84rem; font-weight: 700; color: var(--muted); }
.ticket-facts dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ticket-facts .help { display: block; margin-top: 2px; font-weight: 500; }
.ticket-aside { display: grid; gap: 16px; }
.ticket-aside h2 { font-size: 1.05rem; margin-bottom: 10px; }
.ticket-aside form .btn { width: 100%; }

.error-page .hero-actions { justify-content: center; }

@media print {
  .ticket-aside form, .reply-card { display: none !important; }
}
