/* Support (src/support-views.ts): /support's quick links, the contact form,
   "Your requests", and the owner's queue at /admin/support. Colors are the
   site's tokens only, so dark mode and the Appearance themes follow. */

.sp-page .lede { margin-bottom: 20px; }
.sp-page .section-title { margin-top: 36px; }
.sp-sent { margin: 8px 0 0; }
.sp-sent:focus { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Quick links: cards, one column on phones, two from 640px. */
.sp-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .sp-links { grid-template-columns: 1fr 1fr; } }
.sp-link { display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 16px; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); background: var(--bg); color: var(--text-body); text-decoration: none; transition: border-color 0.15s, background-color 0.15s; }
.sp-link:hover { border-color: var(--primary); background: var(--primary-soft); }
.sp-link strong { display: block; margin-bottom: 2px; color: var(--text); font-size: 16px; }
.sp-link .small { display: block; line-height: 1.5; }
.sp-link-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }

.sp-intro { margin: 0 0 20px; color: var(--text-body); }

/* The form. */
.sp-form { display: grid; gap: 22px; padding: 24px; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); background: var(--bg-soft); }
@media (max-width: 520px) { .sp-form { padding: 18px 16px; gap: 20px; } }
.sp-form .field > label { font-size: 15px; font-weight: 600; }
.sp-req, .sp-opt { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--text-dim); }
.sp-hint { margin: 0; font-weight: 400; line-height: 1.5; }
.sp-form .form-error { margin: 0; font-weight: 500; }
.sp-form .form-error::before { content: '! '; font-weight: 700; }
.sp-form .form-error:empty::before { content: none; }
.sp-form select[aria-invalid='true'], .sp-form textarea[aria-invalid='true'] { border-color: var(--danger); }
.sp-form textarea { min-height: 160px; line-height: 1.55; }
.sp-form input[readonly] { background: var(--bg-muted); color: var(--text-body); cursor: default; }

/* The honeypot: out of sight and out of reach, never display:none (some bots skip those). */
.sp-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* The problems, above the form, each a link to its field. */
.sp-errors { padding: 14px 16px; border: 1px solid var(--bad-line); border-left-width: 4px; border-radius: var(--radius); background: var(--bad-bg); color: var(--text); font-size: 15px; }
.sp-errors[hidden] { display: none; }
.sp-errors:focus { outline: 2px solid var(--danger); outline-offset: 2px; }
.sp-errors p { margin: 0; font-weight: 600; }
.sp-errors ul { margin: 8px 0 0; padding-left: 20px; }
.sp-errors li + li { margin-top: 4px; }
.sp-errors a { color: var(--bad-fg); }

/* Browser info: the box, and exactly what it adds. */
.sp-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; }
.sp-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.sp-browser-info { margin: 2px 0 0 28px; }
.sp-browser-info p { margin: 0 0 6px; }
.sp-browser-info dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0; }
.sp-browser-info dt { color: var(--text-body); font-weight: 500; }
.sp-browser-info dd { margin: 0; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
@media (max-width: 420px) { .sp-browser-info { margin-left: 0; } .sp-browser-info dl { grid-template-columns: 1fr; } .sp-browser-info dd { margin-bottom: 4px; } }

.sp-send { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.sp-send p { margin: 0; flex: 1 1 16rem; }
@media (max-width: 520px) { .sp-send .btn { width: 100%; } }
.sp-mail { margin: 20px 0 0; color: var(--text-body); }

/* Your requests. */
.sp-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.sp-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); background: var(--bg); }
.sp-item-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; color: var(--text); }
.sp-item-msg { margin: 6px 0 4px; color: var(--text-body); overflow-wrap: anywhere; }
.sp-item .small { margin: 0; }
.sp-page-path, .sp-item .sp-page { overflow-wrap: anywhere; }

/* The guide and week pages' "Spot a mistake? Report it". */
.report-mistake { margin: 24px 0 8px; }

/* The owner's queue. */
.sp-counts { margin: -8px 0 16px; }
.sp-table td { overflow-wrap: anywhere; }
.sp-quote { margin: 0 0 20px; padding: 14px 16px; border-left: 3px solid var(--primary); background: var(--bg-soft); border-radius: var(--radius); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; }
.sp-actions { margin-bottom: 8px; }
.sp-actions .btn { white-space: nowrap; }
