/* ============================================================
   AutoCast Pro Help — Main Stylesheet
   TuneTracker Systems LLC
   Palette: warm coral/salmon/rose — matching the AutoCast logo
   ============================================================ */

:root {
  /* Brand accent — warm coral/salmon from the AutoCast logo */
  --accent:         #C96442;   /* primary coral-orange */
  --accent-light:   #E07D58;   /* lighter coral for H2 headings */
  --accent-pale:    #FDF0EB;   /* very pale coral for callout fills */
  --accent-border:  #EDBBAA;   /* soft salmon border */
  --accent-code-bg: #F0E8E4;   /* code pill background */
  --accent-code-fg: #943320;   /* dark coral for code text */

  /* Sidebar — deep warm charcoal with rose undertone */
  --sidebar-bg:     #2A1F1C;
  --sidebar-text:   #EDD5CC;
  --sidebar-muted:  #9A7B74;
  --sidebar-active-bg: #3D2720;
  --sidebar-active-border: #C96442;
  --sidebar-hover:  #FFFFFF;

  /* Page backgrounds */
  --page-bg:        #F8F4F2;
  --content-bg:     #FFFFFF;

  /* Typography */
  --text-primary:   #2E2420;
  --text-secondary: #6B5C58;
  --text-h1-border: #EDBBAA;

  /* Callouts */
  --tip-bg:         #FDF0EB;
  --tip-border:     #C96442;
  --note-bg:        #FFF8F0;
  --note-border:    #D4901A;

  /* Tables */
  --table-header-bg:   #2E2420;
  --table-header-text: #FFFFFF;
  --table-row-alt:     #FBF7F5;
  --table-hover:       #FDF0EB;
  --table-border:      #E8D8D2;

  --sidebar-width: 225px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--page-bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ============================================================
   LAYOUT — SIDEBAR + CONTENT
   ============================================================ */

.help-shell {
  display: flex;
  min-height: 100vh;
}

/* ---- SIDEBAR ---- */

.help-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-product-name {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.sidebar-product-name span {
  color: var(--accent-light);
}

/* Nav sections */
.sidebar-nav {
  padding: 12px 0 24px;
  flex: 1;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px 5px;
  cursor: pointer;
  user-select: none;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--sidebar-muted);
}

.nav-section-arrow {
  font-size: 9px;
  color: var(--sidebar-muted);
  transition: transform 0.2s ease;
}

.nav-section.collapsed .nav-section-arrow {
  transform: rotate(-90deg);
}

.nav-section-links {
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.nav-section.collapsed .nav-section-links {
  max-height: 0 !important;
}

.nav-link {
  display: block;
  padding: 7px 18px 7px 20px;
  font-size: 14px;
  color: var(--sidebar-text);
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
  line-height: 1.3;
}

.nav-link:hover {
  color: var(--sidebar-hover);
  background: rgba(255,255,255,0.05);
  text-decoration: none;
}

.nav-link.active {
  color: #FFFFFF;
  background: var(--sidebar-active-bg);
  border-left-color: var(--sidebar-active-border);
  font-weight: 500;
}

/* ---- CONTENT AREA ---- */

.help-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 48px 48px 80px;
  max-width: calc(var(--sidebar-width) + 820px);
}

.content-inner {
  max-width: 760px;
}

/* ============================================================
   TYPOGRAPHY — HEADINGS
   ============================================================ */

h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  border-bottom: 2px solid var(--text-h1-border);
  padding-bottom: 12px;
  margin-bottom: 24px;
  line-height: 1.2;
}

h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin: 40px 0 14px;
  line-height: 1.3;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 10px;
}

p {
  margin-bottom: 16px;
  max-width: 680px;
}

ul, ol {
  margin: 0 0 16px 22px;
  max-width: 660px;
}

li {
  margin-bottom: 6px;
}

strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================================
   CODE / KEYBOARD STYLING
   ============================================================ */

code, .log-command {
  font-family: "SF Mono", Monaco, Menlo, "Courier New", monospace;
  font-size: 13.5px;
  background: var(--accent-code-bg);
  color: var(--accent-code-fg);
  padding: 2px 7px;
  border-radius: 4px;
}

/* ============================================================
   CALLOUT BOXES
   ============================================================ */

.callout {
  display: flex;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 8px;
  margin: 24px 0;
  max-width: 680px;
}

.callout-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.callout-body {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-primary);
}

.callout-body p:last-child {
  margin-bottom: 0;
}

.callout.tip {
  background: var(--tip-bg);
  border-left: 4px solid var(--tip-border);
}

.callout.note {
  background: var(--note-bg);
  border-left: 4px solid var(--note-border);
}

/* ============================================================
   FIELD / REFERENCE TABLES
   ============================================================ */

.field-table {
  width: 100%;
  max-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
  margin: 20px 0 32px;
  font-size: 15.5px;
}

.field-table thead tr {
  background: var(--table-header-bg);
}

.field-table thead th {
  color: var(--table-header-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 11px 16px;
  text-align: left;
}

.field-table tbody tr {
  background: var(--content-bg);
  border-bottom: 1px solid var(--table-border);
  transition: background 0.12s;
}

.field-table tbody tr:nth-child(even) {
  background: var(--table-row-alt);
}

.field-table tbody tr:hover {
  background: var(--table-hover);
}

.field-table tbody td {
  padding: 11px 16px;
  vertical-align: top;
  line-height: 1.5;
}

.field-table tbody td:first-child {
  font-weight: 600;
  width: 185px;
  color: var(--text-primary);
}

.field-table tbody td:last-child {
  color: var(--text-secondary);
}

/* ============================================================
   COMMAND REFERENCE TABLES (Program Log Commands)
   ============================================================ */

.command-table {
  width: 100%;
  max-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
  margin: 20px 0 32px;
  font-size: 15px;
}

.command-table thead tr {
  background: var(--table-header-bg);
}

.command-table thead th {
  color: var(--table-header-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 11px 16px;
  text-align: left;
}

.command-table tbody tr {
  background: var(--content-bg);
  border-bottom: 1px solid var(--table-border);
}

.command-table tbody tr:nth-child(even) {
  background: var(--table-row-alt);
}

.command-table tbody tr:hover {
  background: var(--table-hover);
}

.command-table tbody td {
  padding: 11px 16px;
  vertical-align: top;
  line-height: 1.5;
}

.command-table tbody td:first-child {
  font-family: "SF Mono", Monaco, Menlo, monospace;
  font-size: 12.5px;
  color: var(--accent-code-fg);
  background: var(--accent-code-bg);
  width: 220px;
  white-space: nowrap;
}

/* ============================================================
   TOPIC CARDS (Welcome Page)
   ============================================================ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 28px 0 40px;
  max-width: 720px;
}

.topic-card {
  background: var(--content-bg);
  border: 1.5px solid #E0D4CF;
  border-radius: 10px;
  padding: 20px 18px;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.12s;
  text-decoration: none;
  display: block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

.topic-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(201, 100, 66, 0.15);
  transform: translateY(-1px);
  text-decoration: none;
}

.card-icon {
  font-size: 26px;
  margin-bottom: 10px;
  display: block;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */

.breadcrumb {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  margin: 0 6px;
  opacity: 0.5;
}

/* ============================================================
   SCROLLBAR (WebKit)
   ============================================================ */

.help-sidebar::-webkit-scrollbar {
  width: 5px;
}
.help-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.help-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
}

/* ============================================================
   UTILITY
   ============================================================ */

.muted {
  color: var(--text-secondary);
  font-size: 15px;
}

hr.section-rule {
  border: none;
  border-top: 1px solid var(--table-border);
  margin: 40px 0;
}

/* ── Zoom controls ──────────────────────────────────────────────────────── */
.zoom-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 6px 14px;
    background: #F0EAE6;
    border-bottom: 1px solid var(--accent-border);
    margin: -48px -48px 32px -48px; /* bleed to content edges, preserve spacing below */
    flex-shrink: 0;
}

.zoom-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--accent-border);
    border-radius: 5px;
    background: #fff;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s, border-color 0.1s;
}
.zoom-btn:hover {
    background: var(--accent-pale);
    border-color: var(--accent);
}
.zoom-btn:active { background: var(--accent-border); }

.zoom-pct {
    font-size: 11px;
    color: var(--text-secondary);
    min-width: 34px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.zoom-reset {
    height: 26px;
    padding: 0 10px;
    border: 1px solid var(--accent-border);
    border-radius: 5px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
}
.zoom-reset:hover {
    background: var(--accent-pale);
    border-color: var(--accent);
    color: var(--text-primary);
}
.zoom-reset:active { background: var(--accent-border); }
