/* The support site for Diagon's clients (support/index.html). Builds on app.css (colours, cards, forms, tables).
   Always light, whatever the staff site's theme. */
body.sp { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }

/* ---------- Top bar ---------- */
.sp-top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 12px 32px;
  background: var(--black); color: #fff; border-bottom: 1px solid #1f2419;
}
.sp-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 18px; letter-spacing: 0.02em; }
.sp-brand b { color: var(--lime); font-weight: 700; }
.sp-brand img { display: block; width: auto; height: 32px; } /* the D keeps its own shape (108 × 130) */
.sp-nav { display: flex; gap: 4px; margin-right: auto; }
.sp-nav a { color: #c9cdc3; text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: var(--r-sm); }
.sp-nav a:hover { color: #fff; background: #1d2118; }
.sp-nav a.active { color: var(--lime); }
.sp-who { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #d1d5db; }
.sp-who [hidden] { display: none; }
.sp-who .btn.secondary { color: #fff; background: transparent; border-color: #3f3f46; }
.sp-who a.btn { text-decoration: none; }

/* ---------- Home: a short welcome ---------- */
/* The picture behind the welcome, under a dark overlay so the words stay easy to read. To use a photo instead (e.g. of
   the team), put it in this folder and change the url below; the overlay stays. */
.sp-hero {
  --hero-image: url("hero-bg.svg");
  color: #fff; border-top: 1px solid #1f2419;
  background:
    radial-gradient(ellipse 60% 70% at 50% 45%, rgba(10, 12, 8, 0.62) 0%, rgba(10, 12, 8, 0.15) 100%),
    linear-gradient(180deg, rgba(10, 12, 8, 0.2) 0%, rgba(10, 12, 8, 0.55) 100%),
    var(--hero-image) center / cover no-repeat,
    var(--black);
}
.sp-hero[hidden] { display: none; }
.sp-hero-inner { max-width: 760px; margin: 0 auto; padding: 88px 24px 120px; text-align: center; }
.sp-hero h1 { margin: 0; font-size: clamp(30px, 4vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.sp-lead { margin: 14px auto 30px; max-width: 560px; font-size: 16px; line-height: 1.6; color: #c9cdc3; }
.sp-search {
  display: flex; gap: 8px; max-width: 560px; margin: 0 auto; padding: 5px; background: #fff; border-radius: 10px;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
}
.sp-search input { flex: 1; min-width: 0; border: 0; padding: 9px 12px; font: inherit; font-size: 15px; color: #141414; background: transparent; }
.sp-search input:focus { outline: none; }
.sp-search:focus-within { box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.45); }

/* ---------- Home: the three ways in ---------- */
.sp-cards {
  position: relative; z-index: 1; width: 100%; max-width: 1000px; margin: -56px auto 8px; padding: 0 24px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.sp-cards[hidden] { display: none; }
.sp-card {
  display: grid; gap: 6px; align-content: start; padding: 24px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 12px 28px -18px rgba(17, 17, 17, 0.28);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sp-card:hover { border-color: var(--lime-line); box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 16px 32px -18px rgba(17, 17, 17, 0.34); }
.sp-card:hover strong { color: var(--accent); }
.sp-card:focus-visible { outline: none; box-shadow: var(--ring); }
.sp-card strong { font-size: 16px; }
.sp-card > span:last-child { color: var(--grey); font-size: 14px; line-height: 1.5; }
.sp-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; border-radius: 10px; background: var(--lime-soft); }
.sp-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- The other pages ---------- */
.sp-main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 28px 20px 40px; display: grid; gap: 18px; align-content: start; }
.sp-main > section[hidden] { display: none; }
.sp-main h1 { font-size: 24px; margin: 0; }
.sp-main h2 { font-size: 16px; margin: 0 0 10px; }
#v-ticket, #v-faqs { display: grid; gap: 18px; }
#v-ticket > .card, #v-faqs > .card { margin: 0; }
.sp-signin { max-width: 440px; width: 100%; justify-self: center; margin-top: 24px; }
.sp-signin h1 { margin-bottom: 6px; }
.sp-signin input.wide { max-width: none; }
.sp-code { font-size: 22px; letter-spacing: 0.35em; font-variant-numeric: tabular-nums; }
.sp-ticket-head { display: grid; gap: 8px; justify-items: start; }
.sp-ticket-head p { margin: 0; }
.sp-ticket-head a.btn, .card-head a.btn, .sp-still a.btn, .sp-form-head a.btn { text-decoration: none; }

/* Submit a ticket: a header with a line under it, then evenly spaced sections */
.sp-form-card { padding: 32px 36px 28px; }
.sp-form-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--border);
}
.sp-form-head h1 { margin: 0 0 6px; }
.sp-form-head p { margin: 0; max-width: 560px; font-size: 14px; line-height: 1.55; }
.sp-form { display: grid; gap: 22px; }
.sp-form .field { margin: 0; }
.sp-form label { margin-bottom: 8px; }
.sp-form input.wide, .sp-form select.wide, .sp-form textarea.wide { width: 100%; max-width: none; }
.sp-form .rich-box { min-height: 160px; }
.sp-row[hidden] { display: none; }
.sp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

/* The type, as three choices */
.sp-types { border: 0; margin: 0; padding: 0; min-width: 0; }
.sp-types legend { padding: 0; margin-bottom: 10px; font-weight: 600; font-size: 13.5px; }
.sp-type-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sp-types .field-error { margin: 8px 0 0; }
.sp-type {
  display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 14px 16px; cursor: pointer; font-weight: 400;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); transition: border-color 0.15s ease;
}
.sp-type:hover { border-color: var(--border-strong); }
.sp-type:has(input:checked) { border-color: var(--lime-pressed); background: var(--lime-wash); box-shadow: 0 0 0 1px var(--lime-pressed) inset; }
.sp-type:has(input:focus-visible) { box-shadow: var(--ring); }
.sp-type input { margin: 2px 0 0; accent-color: var(--accent); }
.sp-type span { display: grid; gap: 3px; }
.sp-type strong { font-size: 14px; }
.sp-type small { color: var(--grey); font-size: 12.5px; line-height: 1.4; }
.sp-types.invalid .sp-type { border-color: var(--error-line); }
.sp-form-actions { margin-top: 4px; padding-top: 20px; border-top: 1px solid var(--border); }
.sp-form-actions a.btn { text-decoration: none; }
@media (max-width: 700px) {
  .sp-form-card { padding: 22px 18px; }
  .sp-type-row, .sp-two { grid-template-columns: 1fr; }
}

/* FAQs */
.sp-page-head { display: grid; gap: 12px; }
.sp-page-head input.wide { max-width: 520px; padding: 11px 14px; font-size: 15px; border-radius: 12px; }
.sp-faq-groups { display: grid; gap: 18px; }
.sp-faq-group { margin: 0; }
.sp-faq-group h2 { color: var(--grey); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.sp-faq { border-top: 1px solid var(--border); }
.sp-faq:first-of-type { border-top: 0; }
.sp-faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 2px; font-weight: 600; font-size: 15px;
}
.sp-faq summary::-webkit-details-marker { display: none; }
.sp-faq summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--lime-soft); color: var(--accent); font-size: 18px; font-weight: 700; transition: transform 0.15s ease;
}
.sp-faq[open] summary::after { content: "–"; background: var(--lime); color: var(--black); }
.sp-faq summary:hover { color: var(--accent); }
.sp-faq summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
.sp-faq-answer { padding: 0 2px 16px; color: var(--text); line-height: 1.65; overflow-wrap: anywhere; }
.sp-faq-answer a { color: var(--accent); }
.sp-empty { margin: 4px 0; }
.sp-still { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sp-still > div { flex: 1; min-width: 200px; }
.sp-still p { margin: 4px 0 0; }

.sp-foot { text-align: center; padding: 22px; font-size: 12px; color: var(--grey); }

/* ---------- Narrow screens ---------- */
@media (max-width: 800px) { .sp-cards { grid-template-columns: 1fr; max-width: 560px; } }
@media (max-width: 700px) {
  .sp-top { flex-wrap: wrap; gap: 10px 16px; padding: 10px 16px; }
  .sp-nav { order: 3; width: 100%; overflow-x: auto; }
  .sp-who #who-name { display: none; }
  .sp-hero-inner { padding: 48px 16px 80px; }
  .sp-cards { padding: 0 16px; margin-top: -44px; }
}

/* "Ticket submitted" pop-up */
dialog.sp-done { width: min(440px, calc(100vw - 32px)); padding: 28px 28px 24px; text-align: center; }
.sp-done-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--lime-soft); border: 1px solid var(--lime-line); margin-bottom: 14px; }
.sp-done-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
dialog.sp-done h2 { margin: 0 0 8px; font-size: 20px; }
dialog.sp-done p { margin: 0 0 8px; color: var(--grey); line-height: 1.55; }
dialog.sp-done p strong { color: var(--text); }
.sp-done-problems { color: var(--error) !important; }
.sp-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }

/* Rating: five stars and a comment (#rate from the email, and on a done ticket) */
.sp-rate { display: grid; gap: 12px; }
.sp-stars { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.sp-stars button { font-size: 34px; line-height: 1; padding: 2px 4px; color: #D4D6D0; background: none; border: 0; cursor: pointer; border-radius: 6px; }
.sp-stars button.on { color: #F5A524; }
.sp-stars button:hover, .sp-stars button:focus-visible { outline: none; box-shadow: var(--ring); }
.sp-stars-word { margin-left: 10px; color: var(--grey); font-size: 14px; }
.sp-rated-stars { font-size: 26px; letter-spacing: 2px; color: #F5A524 !important; margin: 0 0 6px !important; }
.sp-rated-closed { margin-top: 14px !important; color: var(--text) !important; }

