/* ===================================================
   MathJax Help Page - component styles
   These styles are scoped to the help page content and
   rely on the shared theme variables in css/style.css.
   =================================================== */

.help-content {
  margin-top: 1rem;
}

.help-hero {
  margin-bottom: 1.5rem;
}

.help-hero-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.help-hero-icon {
  font-size: 2.4rem;
  color: var(--primary);
}

.help-hero-title {
  margin: 0;
  font-size: 1.5rem;
}

.help-hero-subtitle {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.intro-section {
  margin-bottom: 2rem;
}

.section-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.section-icon {
  font-size: 1.25rem;
  color: var(--primary);
}

.intro-text {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0 0 1rem;
  padding: 0;
}

.step-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem;
}

.step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
}

.step-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.step-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}

.callout {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

.callout-info {
  background: #e8f1ff;
  border-left: 3px solid var(--primary);
  color: var(--text);
}

.callout-warn {
  background: var(--danger-bg);
  border-left: 3px solid #c81e1e;
  color: var(--danger-text);
}

.callout-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.tabs-container {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.tablist-wrapper {
  background: var(--muted-surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.tablist {
  list-style: none;
  display: flex;
  gap: 0;
  min-width: max-content;
  margin: 0;
  padding: 0;
}

.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.tab:hover {
  color: var(--text);
  background-color: #e4ecf7;
}

.tab[aria-selected="true"] {
  color: var(--primary);
  font-weight: 700;
  background-color: var(--surface);
}

.tab-icon {
  font-size: 1.1rem;
}

.panels-wrapper {
  padding: 1.5rem;
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.panel:focus {
  outline: none;
}

.panel-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.panel-intro {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1rem;
  max-width: 68ch;
}

.options-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0 0 1rem;
  padding: 0;
}

.option-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  background: var(--surface);
  transition: border-color 150ms ease;
}

.option-item:hover {
  border-color: #b7c6d8;
}

.option-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.option-icon {
  font-size: 1.15rem;
  color: var(--primary);
  flex-shrink: 0;
}

.option-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.option-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 0.35rem;
}

.option-desc + .option-desc {
  margin-top: 0.35rem;
}

.sub-list {
  list-style: none;
  margin: 0.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sub-list li {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.keyboard-section {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.kbd-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.kbd-intro {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.kbd-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.kbd-row {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.kbd-row:last-child {
  border-bottom: none;
}

.kbd-row:nth-child(even) {
  background: #f5f8fd;
}

.kbd-row dt {
  flex-shrink: 0;
  min-width: 120px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.kbd-row dd {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

kbd {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
  padding: 1px 6px;
  background: var(--surface);
  border: 1px solid #a9b7c6;
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--text);
  white-space: nowrap;
  line-height: 1.6;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.85em;
  background: #edf2fa;
  padding: 1px 5px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--primary-hover);
}

@media (max-width: 640px) {
  .help-hero-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .panels-wrapper {
    padding: 1rem;
  }

  .tab-label {
    display: none;
  }

  .kbd-row dt {
    min-width: auto;
  }
}
