/* ==========================================================================
   Help Center & User Manual
   Self-contained styles so the manual renders cleanly in BOTH:
   - Authenticated app layout (Bootstrap)
   - Public SEO landing layout (landing.css, no Bootstrap)
   ========================================================================== */

.help-manual-page {
  max-width: 1320px;
}

.help-manual-shell {
  font-family: inherit;
}

/* Search Bar */
.help-search-card {
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.help-search-bar {
  display: flex;
  align-items: stretch;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.help-search-bar:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.help-search-icon {
  display: inline-flex;
  align-items: center;
  padding: 0 0.85rem;
  color: #64748b;
  font-size: 1rem;
  background: #ffffff;
}

.help-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0.65rem 0.5rem 0.65rem 0;
  font-size: 0.95rem;
  color: #0f172a;
  background: transparent;
}

.help-search-clear {
  border: 0;
  border-left: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  padding: 0 0.95rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.help-search-clear:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.help-search-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.help-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.help-quick-chip {
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.help-quick-chip:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.help-search-status {
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
}

/* Mobile Jump Pills */
.help-mobile-toc {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.help-mobile-toc::-webkit-scrollbar {
  display: none;
}

.help-mobile-toc .help-toc-pill {
  white-space: nowrap;
  border-radius: 999px;
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.help-mobile-toc .help-toc-pill > i {
  color: #2563eb;
}

/* Main 2-Column Documentation Grid */
.help-layout-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.help-toc-card {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 0.65rem;
}

.help-toc-heading {
  padding: 0.25rem 0.6rem 0.45rem;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.help-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.help-toc-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  color: #334155;
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.help-toc-link:hover {
  background-color: #eff6ff;
  color: #1d4ed8;
}

.help-toc-link > i {
  color: #2563eb;
  font-size: 0.95rem;
  width: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

.help-sections-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

/* Empty Search State */
.help-empty-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  text-align: center;
  padding: 3rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.help-empty-icon {
  font-size: 2.25rem;
  color: #94a3b8;
  display: block;
  margin-bottom: 0.5rem;
}

/* Section Cards & Topics */
.help-section {
  scroll-margin-top: 5.25rem;
}

.help-section-card {
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.help-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.help-section-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: #0f172a;
}

.help-section-title > i {
  color: #2563eb;
}

.help-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 0.45rem;
  border: 1px solid #2563eb;
  color: #2563eb;
  background: #ffffff;
  text-decoration: none;
}

.help-action-btn:hover {
  background: #2563eb;
  color: #ffffff;
}

.help-action-btn-danger {
  border-color: #dc2626;
  color: #dc2626;
}

.help-action-btn-danger:hover {
  background: #dc2626;
  color: #ffffff;
}

.help-topic {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.help-topic:last-child {
  border-bottom: none;
}

.help-topic-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.help-topic p {
  margin: 0 0 0.6rem;
  color: #334155;
  font-size: 0.93rem;
  line-height: 1.6;
}

.help-topic p:last-child {
  margin-bottom: 0;
}

.help-topic li {
  color: #334155;
  font-size: 0.93rem;
  line-height: 1.6;
}

.help-topic code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84em;
  background: #f1f5f9;
  color: #be185d;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}

.help-steps {
  padding-left: 1.25rem;
  margin: 0 0 0.65rem;
}

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

.help-steps li {
  margin-bottom: 0.35rem;
}

.help-badge-ai {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 0.35rem;
  background: #dbeafe;
  color: #1e40af;
}

.help-badge-admin {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 0.35rem;
  background: #fef3c7;
  color: #92400e;
}

.help-callout {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  margin-top: 0.7rem;
}

.help-callout-tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.help-callout-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
}

.help-kbd {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #1e293b;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 0.3rem;
}

.help-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.help-shortcuts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

.help-shortcuts-table th,
.help-shortcuts-table td {
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0.7rem;
  text-align: left;
  color: #334155;
}

.help-shortcuts-table th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 600;
}

/* Responsive Breakpoint */
@media (min-width: 992px) {
  .help-mobile-toc {
    display: none;
  }
}

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

  .help-toc-col {
    display: none;
  }
}

@media print {
  .help-toc-col,
  .help-search-card,
  .help-mobile-toc,
  .help-action-link {
    display: none !important;
  }

  .help-layout-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .help-section-card {
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
}
