/* esphome.cloud brand override for the stock mdBook theme.
 * Single source of truth: edit here, build-manual.sh copies into each book.
 *
 * mdBook ships its own light + dark themes. We override only the accent color,
 * link color, and font stack so the manual feels at home alongside the SPA.
 */

:root {
  --sidebar-width: 280px;
  --page-padding: 18px;
  --content-max-width: 820px;
  --menu-bar-height: 50px;
}

/* Match the SPA's font stack (system UI fonts, no web font dependency). */
html,
body,
.content,
.menu-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue',
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.content code,
.content pre,
.content pre code {
  font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', Menlo, Consolas,
    'Liberation Mono', monospace;
  font-size: 0.92em;
}

/* Esphome.cloud accent (teal/cyan family) for links + the active sidebar item. */
.light {
  --links: #0d7488;
  --sidebar-active: #0d7488;
  --inline-code-color: #c0392b;
}

.navy,
.coal,
.ayu {
  --links: #5fd0e8;
  --sidebar-active: #5fd0e8;
}

.rust {
  --links: #b85c00;
  --sidebar-active: #b85c00;
}

/* Make the page header banner a touch taller and stickier. */
.menu-bar {
  border-bottom: 1px solid var(--sidebar-non-existant);
}

/* Locale-toggle button injected by locale-switch.js. */
.icon-button.locale-toggle {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0 10px !important;
  width: auto !important;
  text-decoration: none;
}

.icon-button.locale-toggle:hover {
  text-decoration: underline;
}
