/*
 * WfCommons documentation — light-only design.
 *
 * The furo color palettes are pinned to identical light values in conf.py
 * (light_css_variables == dark_css_variables), so the page never renders
 * dark. This stylesheet enforces a light color scheme at the browser level,
 * hides the theme toggle, and applies layout/typography polish.
 */

:root,
html[data-theme="light"],
html[data-theme="dark"],
html[data-theme="auto"] {
  color-scheme: light;
}

:root {
  --content-max-width: 54em;
  --sidebar-width: 17em;
}

/* Furo hardcodes a white code foreground for dark mode; since the code
 * background is always light here, pin the foreground to dark as well. */
body {
  --color-code-foreground: black !important;
}

/* Hide the light/dark toggle: the docs are light-only by design. */
.theme-toggle,
.theme-toggle-container {
  display: none !important;
}

/* Never show dark-only elements. */
.only-dark {
  display: none !important;
}

/* ---- Typography ---------------------------------------------------------- */

article h1 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

article h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 0.4rem;
  border-radius: 999px;
  background: var(--color-brand-primary);
}

article h2 {
  font-weight: 650;
  letter-spacing: -0.005em;
  border-bottom: 1px solid var(--color-background-border);
  padding-bottom: 0.3rem;
}

/* The index logo uses :align: left; keep it in the flow instead of floating. */
article .align-left {
  float: none !important;
}

/* ---- Code blocks and inline code ---------------------------------------- */

pre {
  border: 1px solid var(--color-background-border);
  border-radius: 8px;
}

code.literal {
  border: 1px solid var(--color-background-border);
  border-radius: 4px;
  padding: 0.1em 0.3em;
}

/* ---- Tables -------------------------------------------------------------- */

article table.docutils {
  border: 1px solid var(--color-background-border);
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  width: 100%;
}

article table.docutils th {
  background: var(--color-background-secondary);
  text-align: left;
}

article table.docutils th,
article table.docutils td {
  border: none;
  border-bottom: 1px solid var(--color-background-border);
  padding: 0.5em 0.75em;
}

article table.docutils tr:last-child td {
  border-bottom: none;
}

/* ---- Landing-page cards (sphinx-design) ---------------------------------- */

.sd-card {
  border: 1px solid var(--color-background-border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(26, 34, 51, 0.06);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  height: 100%;
}

.sd-card:hover {
  box-shadow: 0 4px 12px rgba(26, 34, 51, 0.12);
  transform: translateY(-2px);
}

.sd-card .sd-card-title {
  color: var(--color-brand-primary);
  font-weight: 650;
}

/* ---- Sidebar and navigation ---------------------------------------------- */

.sidebar-tree .current-page > .reference {
  font-weight: 650;
}

.sidebar-tree .reference:hover,
.toc-tree .reference:hover {
  background: var(--color-background-hover);
  border-radius: 6px;
}

/* ---- Admonitions ---------------------------------------------------------- */

.admonition {
  border-radius: 8px;
  box-shadow: none;
  border: 1px solid var(--color-background-border);
}
