/* ==========================================================================
   help.css — /pub/help layout overrides
   Loaded AFTER index.css, header.css, home.css and category.css.
   home.css supplies the shared layout reset + .sp-main;
   category.css supplies the page-hero title block. Everything below is
   specific to the help page, scoped under body.sp-help.
   ========================================================================== */

.sp-help-layout {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 32px;
  padding: 1.5rem 0 3rem;
  align-items: start;
  margin-top: 16px;
}

/* Override the bare `nav { position: absolute }` rule from index.css.
   That rule was written when the only <nav> on a page was the admin
   hamburger, and it takes any unpositioned nav out of normal flow —
   which made this TOC render on top of the content below it on narrow
   screens. Explicitly resetting position/top/left here puts it back
   into normal flow. */
.sp-help-toc {
  position: static;
  top: auto;
  left: auto;
}

@media (max-width: 900px) {
  .sp-help-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ---------- Sidebar ---------- */
.sp-help-sidebar {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 900px) {
  .sp-help-sidebar {
    position: static;
  }
}

.sp-help-card {
  background: var(--sp-bg);
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  padding: 18px;
}

.sp-help-card__title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sp-muted);
  margin: 0 0 12px;
}

.sp-help-toc {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sp-help-toc a {
  display: flex;
  align-items: center;
  padding: 8px 4px;
  font-size: 13px;
  color: var(--sp-ink);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sp-help-toc a:hover {
  background: var(--sp-bg-soft);
  color: var(--sp-red);
}

.sp-help-toc .bi {
  color: var(--sp-muted);
  font-size: 14px;
}

.sp-help-toc a:hover .bi {
  color: var(--sp-red);
}

/* ---------- Content sections ---------- */
.sp-help-content {
  min-width: 0;
}

.sp-help-section {
  margin-bottom: 44px;
  scroll-margin-top: 100px; /* clears the sticky header when jumping to an anchor */
}

.sp-help-section:last-child {
  margin-bottom: 0;
}

.sp-help-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--sp-ink);
  margin: 0 0 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--sp-ink);
}

.sp-help-section__title .bi {
  color: var(--sp-red);
  font-size: 1.25rem;
}

.sp-help-subtitle {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sp-ink);
  margin: 24px 0 8px;
}

.sp-help-section p {
  color: var(--sp-ink);
  line-height: 1.7;
  font-size: 15px;
}

.sp-help-section a {
  color: var(--sp-red);
  text-decoration: none;
}

.sp-help-section a:hover {
  text-decoration: underline;
}

/* ---------- Numbered steps (How to Order) ---------- */
.sp-help-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.sp-help-steps > li {
  counter-increment: step;
  position: relative;
  padding: 14px 0 14px 52px;
  border-top: 1px solid var(--sp-line);
  font-size: 15px;
  line-height: 1.7;
  color: var(--sp-ink);
}

.sp-help-steps > li:first-child {
  border-top: none;
  padding-top: 8px;
}

.sp-help-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sp-red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-help-steps > li:first-child::before {
  top: 8px;
}

.sp-help-steps ul {
  margin-top: 6px;
  padding-left: 20px;
}

.sp-help-steps ul li {
  margin-bottom: 4px;
}

/* ---------- Generic bullet list ---------- */
.sp-help-list {
  padding-left: 20px;
  margin: 12px 0;
}

.sp-help-list li {
  margin-bottom: 8px;
  line-height: 1.7;
  font-size: 15px;
  color: var(--sp-ink);
}

/* ---------- Payment cards ---------- */
.sp-help-payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

@media (max-width: 700px) {
  .sp-help-payment-grid {
    grid-template-columns: 1fr;
  }
}

.sp-help-payment-card {
  background: var(--sp-bg);
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  padding: 20px;
}

.sp-help-payment-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.sp-help-payment-card__head .bi {
  font-size: 1.5rem;
  color: var(--sp-red);
}

.sp-help-payment-card__head h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--sp-ink);
  margin: 0;
}

.sp-help-payment-card__note {
  font-size: 13px;
  color: var(--sp-muted);
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--sp-line);
}

.sp-help-payment-card__details {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  background: var(--sp-bg-soft);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 14px;
}

.sp-help-payment-card__details li {
  margin-bottom: 4px;
  color: var(--sp-ink);
}

.sp-help-payment-card__details li:last-child {
  margin-bottom: 0;
}

.sp-help-payment-card p {
  font-size: 14px;
  color: var(--sp-ink);
  line-height: 1.6;
  margin: 0 0 8px;
}

/* ---------- Callout boxes ---------- */
.sp-help-callout {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--sp-radius);
  margin: 20px 0;
  align-items: flex-start;
  line-height: 1.65;
}

.sp-help-callout .bi {
  font-size: 1.35rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.sp-help-callout strong {
  display: block;
  margin-bottom: 4px;
}

.sp-help-callout p,
.sp-help-callout div {
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}

/* Warning variant — used for "must pay before dispatch" */
.sp-help-callout--warning {
  background: #fff8e6;
  border: 1px solid #ffe0a3;
  border-left: 5px solid #e3a008;
  color: #5c3a00;
}

.sp-help-callout--warning .bi {
  color: #e3a008;
}

/* ---------- Contact grid ---------- */
.sp-help-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 700px) {
  .sp-help-contact-grid {
    grid-template-columns: 1fr;
  }
}

.sp-help-contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  background: var(--sp-bg);
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  text-decoration: none;
  color: var(--sp-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
  align-items: center;
}

.sp-help-contact-card:hover {
  border-color: var(--sp-red);
  box-shadow: 0 6px 16px var(--sp-shadow);
  color: var(--sp-red);
  text-decoration: none;
}

.sp-help-contact-card .bi {
  font-size: 1.75rem;
  color: var(--sp-red);
  margin-bottom: 4px;
}

.sp-help-contact-card strong {
  font-size: 15px;
}

.sp-help-contact-card span {
  font-size: 13px;
  color: var(--sp-muted);
  line-height: 1.4;
}