/* ═══════════════════════════════════════════════════════
   LIFESYNC HELP CENTER
   Extends site.css tokens. Load site.css first, then this.
═══════════════════════════════════════════════════════ */

/* ── Help hero + search ── */
.help-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 40px;
  text-align: center;
}
.help-hero h1 {
  font-size: 34px;
  margin: 0 0 10px;
}
.help-hero p {
  color: var(--text-muted);
  font-size: 17px;
  margin: 0 auto 28px;
  max-width: 560px;
}
.help-search {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}
.help-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 18px 15px 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 16px;
  font-family: inherit;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--text);
}
.help-search input:focus {
  outline: none;
  border-color: var(--accent);
}
.help-search::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7480' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}

/* Search results dropdown */
.help-search-results {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
  z-index: 20;
  display: none;
}
.help-search-results a {
  display: block;
  padding: 12px 18px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.help-search-results a:last-child { border-bottom: none; }
.help-search-results a:hover { background: var(--accent-pale); }
.help-search-results .no-results {
  padding: 14px 18px;
  color: var(--text-faint);
  font-size: 14px;
}

/* ── Category cards ── */
.help-categories {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px 72px;
}
.help-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.help-cat-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.help-cat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.help-cat-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.help-cat-card p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 14px;
}
.help-cat-card .help-cat-count {
  font-size: 13px;
  color: var(--accent-dark);
  font-weight: 600;
}

/* ── Article layout ── */
.help-article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 72px;
}
.help-breadcrumb {
  font-size: 13px;
  color: var(--text-faint);
  padding: 20px 0 8px;
}
.help-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.help-breadcrumb a:hover { color: var(--accent-dark); }
.help-breadcrumb span { margin: 0 6px; }

.help-article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-faint);
  margin: 6px 0 24px;
}
.help-article h1 {
  font-size: 30px;
  margin: 6px 0 4px;
  line-height: 1.25;
}
.help-article h2 {
  font-size: 21px;
  margin: 34px 0 12px;
}
.help-article h3 {
  font-size: 17px;
  margin: 24px 0 8px;
}
.help-article p { color: var(--text); font-size: 16px; margin: 0 0 14px; }
.help-article ul, .help-article ol { padding-left: 22px; margin: 0 0 16px; }
.help-article li { margin: 7px 0; font-size: 16px; }
.help-article .help-lead {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

/* Callout boxes */
.help-tip, .help-warning {
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 20px 0;
  font-size: 15px;
}
.help-tip {
  background: var(--accent-pale);
  border: 1px solid var(--accent-soft);
}
.help-tip strong { color: var(--accent-dark); }
.help-warning {
  background: #FBF3EE;
  border: 1px solid #E8D5C8;
}
.help-warning strong { color: #B5764B; }

/* Step list */
.help-steps { counter-reset: step; list-style: none; padding-left: 0; }
.help-steps li {
  position: relative;
  padding-left: 40px;
  margin: 14px 0;
  min-height: 28px;
}
.help-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

/* Was this helpful */
.help-feedback {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  margin: 36px 0;
  text-align: center;
}
.help-feedback p { margin: 0 0 12px; font-weight: 600; }
.help-feedback-btns { display: flex; gap: 12px; justify-content: center; }
.help-feedback-btns button {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
}
.help-feedback-btns button:hover { border-color: var(--accent); background: var(--accent-pale); }
.help-feedback-thanks { color: var(--accent-dark); font-size: 14px; margin-top: 12px; display: none; }

/* Related articles */
.help-related {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin: 28px 0;
}
.help-related h3 { margin: 0 0 12px; font-size: 16px; }
.help-related ul { list-style: none; padding: 0; margin: 0; }
.help-related li { margin: 8px 0; }
.help-related a { color: var(--accent-dark); text-decoration: none; font-size: 15px; }
.help-related a:hover { text-decoration: underline; }

/* Prev / next */
.help-prevnext {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 32px 0;
}
.help-prevnext a {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
}
.help-prevnext a:hover { border-color: var(--accent); }
.help-prevnext .pn-label { font-size: 12px; color: var(--text-faint); display: block; }
.help-prevnext .pn-title { font-size: 15px; color: var(--accent-dark); font-weight: 600; }
.help-prevnext .pn-next { text-align: right; }

/* Contact support block */
.help-contact {
  background: var(--accent-pale);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  margin: 36px 0;
}
.help-contact h3 { margin: 0 0 8px; }
.help-contact p { color: var(--text-muted); margin: 0 0 16px; }

/* Category index page list */
.help-cat-articles { max-width: 760px; margin: 0 auto; padding: 8px 24px 72px; }
.help-cat-articles h2 { font-size: 24px; margin: 24px 0 16px; }
.help-article-list { list-style: none; padding: 0; margin: 0; }
.help-article-list li {
  border-bottom: 1px solid var(--border);
}
.help-article-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 4px;
  text-decoration: none;
  color: var(--text);
  font-size: 16px;
}
.help-article-list a:hover { color: var(--accent-dark); }
.help-article-list .badge-soon {
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
}

/* Feedback / report-missing form */
.help-report {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 72px;
}
.help-report-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.help-report-card h3 { margin: 0 0 8px; }
.help-report-card p { color: var(--text-muted); margin: 0 0 14px; font-size: 15px; }
.help-report-card textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 90px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
}

@media (max-width: 760px) {
  .help-cat-grid { grid-template-columns: 1fr; }
  .help-hero h1 { font-size: 27px; }
  .help-prevnext { flex-direction: column; }
}
