/* ============================================================
   HELP CENTER STYLES
   beseenby.ai/help
   ============================================================ */

/* =============================
   Page wrapper
   ============================= */
.help-page-wrapper {
  min-height: calc(100vh - 64px - 240px);
}

/* =============================
   Two-column layout
   ============================= */
.help-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: start;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}

/* =============================
   Sidebar
   ============================= */
.help-sidebar {
  position: sticky;
  top: 64px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  border-right: 1px solid var(--border-subtle);
  background: white;
  scrollbar-width: thin;
  scrollbar-color: #d1d9e0 transparent;
}

.help-sidebar::-webkit-scrollbar { width: 4px; }
.help-sidebar::-webkit-scrollbar-track { background: transparent; }
.help-sidebar::-webkit-scrollbar-thumb { background: #d1d9e0; border-radius: 2px; }

.help-sidebar-inner {
  padding: 16px 0 32px;
}

/* =============================
   Sidebar search
   ============================= */
.help-search-wrap {
  padding: 12px 16px 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

/* Pagefind UI overrides for sidebar */
.help-search-wrap .pagefind-ui__search-input {
  font-size: 0.875rem !important;
}

.help-search-wrap .pagefind-ui__results-container {
  position: absolute;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 200;
  max-height: 400px;
  overflow-y: auto;
}

/* =============================
   Sidebar navigation
   ============================= */
.help-nav {
  padding: 4px 0 16px;
}

.help-nav-home {
  display: block;
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 8px;
}

.help-nav-home:hover {
  color: var(--brand-primary);
}

.help-nav-home.active {
  color: var(--brand-primary);
}

.help-nav-group {
  margin-top: 2px;
}

.help-nav-group-title {
  display: block;
  padding: 7px 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #718096;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-family: 'Montserrat', sans-serif;
}

.help-nav-group-title:hover,
.help-nav-group-title.current {
  color: var(--brand-primary);
}

/* Section pages list — hidden unless active */
.help-nav-group-pages {
  list-style: none;
  margin: 0;
  padding: 0 0 4px;
  display: none;
}

.help-nav-group.active .help-nav-group-pages {
  display: block;
}

.help-nav-group-pages li a {
  display: block;
  padding: 6px 20px 6px 28px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  line-height: 1.4;
}

.help-nav-group-pages li a:hover {
  color: var(--text-strong);
  background: var(--surface-muted);
}

.help-nav-group-pages li a.active {
  color: var(--brand-primary);
  border-left-color: var(--brand-primary);
  background: #f0faf5;
  font-weight: 700;
}

/* Direct pages (like Troubleshooting) */
.help-nav-direct {
  display: block;
  padding: 7px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 8px;
  border-left: 2px solid transparent;
  transition: color 0.12s;
}

.help-nav-direct:hover {
  color: var(--text-strong);
}

.help-nav-direct.active {
  color: var(--brand-primary);
  border-left-color: var(--brand-primary);
  font-weight: 700;
}

/* =============================
   Main content area
   ============================= */
.help-main {
  padding: 40px 52px 72px;
  min-width: 0;
  max-width: 800px;
}

/* =============================
   Article header
   ============================= */
.help-article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.help-article-header h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-strong);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.help-article-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* =============================
   Article content — Markdown
   ============================= */
.help-article-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--surface-muted);
  letter-spacing: -0.2px;
}

.help-article-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.help-article-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.help-article-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}

.help-article-content p {
  font-size: 1rem;
  line-height: 1.78;
  color: #2d3748;
  margin-bottom: 1rem;
}

.help-article-content ul,
.help-article-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.help-article-content li {
  font-size: 1rem;
  line-height: 1.75;
  color: #2d3748;
  margin-bottom: 0.4rem;
}

.help-article-content li p {
  margin-bottom: 0.25rem;
}

.help-article-content a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-decoration-color: rgba(43, 164, 115, 0.4);
  text-underline-offset: 2px;
}

.help-article-content a:hover {
  color: var(--brand-primary-hover);
  text-decoration-color: var(--brand-primary-hover);
}

.help-article-content strong {
  font-weight: 700;
  color: var(--text-strong);
}

.help-article-content em {
  font-style: italic;
}

.help-article-content code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88em;
  background: var(--surface-muted);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-strong);
}

.help-article-content pre {
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.help-article-content pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.help-article-content blockquote {
  border-left: 3px solid var(--brand-primary);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.help-article-content hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 2rem 0;
}

/* Tables */
.help-article-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.help-article-content th {
  background: var(--surface-muted);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-strong);
}

.help-article-content td {
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  vertical-align: top;
  line-height: 1.5;
}

.help-article-content tr:nth-child(even) td {
  background: var(--surface-bg);
}

/* =============================
   Section article list (list.html)
   ============================= */
.help-section-articles {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.help-section-articles li {
  border-bottom: 1px solid var(--border-subtle);
}

.help-section-articles li:first-child {
  border-top: 1px solid var(--border-subtle);
}

.help-section-articles li a {
  display: flex;
  flex-direction: column;
  padding: 18px 4px;
  text-decoration: none;
  color: var(--text-strong);
  font-weight: 700;
  font-size: 1rem;
  transition: color 0.12s;
}

.help-section-articles li a:hover {
  color: var(--brand-primary);
}

.help-section-desc {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.5;
}

/* =============================
   Help Center Landing Page
   ============================= */
.help-landing-hero {
  background: white;
  border-bottom: 1px solid var(--border-subtle);
  padding: 56px 0 44px;
  text-align: center;
  margin-bottom: 52px;
}

.help-landing-hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.help-landing-hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.help-landing-search {
  max-width: 580px;
  margin: 0 auto;
}

/* Category cards grid */
.help-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.help-category-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.18s;
}

.help-category-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.help-category-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-strong);
  margin-bottom: 8px;
}

.help-category-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 16px;
}

.help-category-count {
  font-size: 0.8rem;
  color: var(--brand-primary);
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
}

/* "Also:" direct page links */
.help-also-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 56px;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
}

.help-also-label {
  font-size: 0.85rem;
  color: #a0aec0;
  font-style: italic;
}

.help-also-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 2px 0;
  transition: color 0.12s;
}

.help-also-item:hover {
  color: var(--brand-primary);
}

.help-also-item + .help-also-item::before {
  content: '·';
  margin-right: 8px;
  color: #cbd5e0;
}

/* =============================
   Mobile sidebar toggle
   ============================= */
.help-mobile-bar {
  display: none;
  align-items: center;
  padding: 10px 20px;
  background: white;
  border-bottom: 1px solid var(--border-subtle);
}

.help-mobile-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: border-color 0.12s, color 0.12s;
}

.help-mobile-toggle:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Overlay */
.help-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 299;
}

.help-sidebar-overlay.open {
  display: block;
}

/* =============================
   Responsive
   ============================= */
@media (max-width: 1100px) {
  .help-layout {
    grid-template-columns: 240px 1fr;
  }

  .help-main {
    padding: 36px 36px 64px;
  }
}

@media (max-width: 900px) {
  .help-categories {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .help-layout {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .help-mobile-bar {
    display: flex;
  }

  .help-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    max-height: 100vh;
    z-index: 300;
    background: white;
    box-shadow: var(--shadow-md);
    transition: left 0.25s ease;
    border-right: 1px solid var(--border-subtle);
  }

  .help-sidebar.open {
    left: 0;
  }

  .help-main {
    padding: 28px 20px 52px;
  }

  .help-article-header h1 {
    font-size: 1.65rem;
  }

  .help-categories {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .help-landing-hero {
    padding: 36px 20px 30px;
  }

  .help-landing-hero h1 {
    font-size: 2rem;
  }
}

/* =============================
   Pagefind UI theming
   ============================= */
:root {
  --pagefind-ui-scale: 0.9;
  --pagefind-ui-primary: #2ba473;
  --pagefind-ui-text: #2d3748;
  --pagefind-ui-background: #ffffff;
  --pagefind-ui-border: #e2e8f0;
  --pagefind-ui-tag: #f0faf5;
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 8px;
  --pagefind-ui-font: 'Lato', sans-serif;
}
