/* Light-first, like the Apache Airflow docs (the explicit reference point)
   -- Furo's own light theme (white/near-white background) is left mostly
   alone; we only layer brand accent colors + typography on top, in BOTH
   light and dark modes. Earlier version of this file forced dark
   unconditionally regardless of the reader's OS/browser preference --
   removed. Furo's own light/dark toggle now works normally; light is
   what most readers land on, matching Airflow's docs. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap");

:root {
  --font-stack: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-stack--monospace: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sd-radius: 8px;
}

/* Furo sets its color variables on <body> (via a `data-theme` attribute),
   not on :root/html -- match that selector shape so these actually win
   (a :root-level override loses to furo's own body-level rule regardless
   of specificity, since body is the closer ancestor for every element
   that matters). */
body[data-theme="light"],
body:not([data-theme="dark"]) {
  --color-brand-primary: #b5651d;
  --color-brand-content: #0f766e;
}

body[data-theme="dark"] {
  --color-brand-primary: #f2a65a;
  --color-brand-content: #5eead4;
}

/* Headings + sidebar brand carry the display face, matching product-site's
   mono headline treatment -- independent of light/dark. */
h1, h2, h3, h4,
.sidebar-brand-text {
  font-family: var(--font-stack--monospace);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sidebar-brand-text::before {
  content: "▸ ";
  color: var(--color-brand-primary);
}

.highlight {
  border-radius: var(--sd-radius);
  border: 1px solid var(--color-background-border);
}

div.admonition {
  border-radius: var(--sd-radius);
  border-width: 1px;
}

dl.py > dt {
  border-radius: var(--sd-radius);
  border: 1px solid var(--color-background-border);
}

/* "A way home" -- a persistent link back to the product site, rendered
   above the docs' own brand/title by _templates/sidebar/brand.html
   (deliberately NOT Furo's built-in "announcement" banner: that has a
   dismiss button and, once dismissed, is gone for that browser via
   localStorage -- the opposite of an always-available way home). Its
   href is a plain "/<language>/" -- these docs are deployed nested under
   product-site at /<language>/docs/, so this is a same-origin relative
   link now, no runtime substitution needed (see brand.html's comment). */
.sidebar-home-link {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-stack--monospace);
  font-size: 0.78rem;
  color: var(--color-sidebar-link-text, var(--color-foreground-secondary));
  text-decoration: none;
  padding: 0.6rem var(--sidebar-item-spacing-horizontal, 1rem) 0;
}
.sidebar-home-link:hover {
  color: var(--color-brand-primary);
}

/* "Export to PDF" button, injected into Furo's per-article
   .content-icon-container (next to the theme toggle / toc icon) by
   /pdf-export.js -- styled to match Furo's own top-of-page buttons
   (components/view-this-page.html, edit-this-page.html) rather than
   introducing a new visual language. It drives window.print(), not a
   real PDF-build stage (see pdf-export.js's own comment) -- the
   `@media print` block below is what actually makes that print output
   readable, by stripping Furo's chrome down to just the article. */
.pdf-export-button {
  display: flex;
  align-items: center;
  gap: 0.35em;
  border: none;
  background: transparent;
  color: var(--color-foreground-secondary);
  font-family: var(--font-stack);
  font-size: 0.78rem;
  padding: 0.4em 0.6em;
  border-radius: var(--sd-radius);
  cursor: pointer;
}
.pdf-export-button:hover {
  color: var(--color-brand-content);
  background: var(--color-background-hover, var(--color-background-secondary));
}
.pdf-export-button__label {
  white-space: nowrap;
}
@media (max-width: 67em) {
  /* Mirrors Furo's own top-of-page buttons, which drop their text label
     at the same breakpoint and keep only the icon. */
  .pdf-export-button__label {
    display: none;
  }
}

@media print {
  .mobile-header,
  .sidebar-drawer,
  .toc-sticky,
  .related-pages,
  .content-icon-container,
  .back-to-top {
    display: none !important;
  }
}

/* Visible EN/NL switch in the sidebar, next to the "back to product
   site" link -- see _templates/sidebar/brand.html's own comment for why
   this needed adding (the docs previously had no manual language
   control at all). */
.sidebar-lang-switch {
  display: flex;
  align-items: center;
  gap: 0.35em;
  font-family: var(--font-stack--monospace);
  font-size: 0.78rem;
  padding: 0.3rem var(--sidebar-item-spacing-horizontal, 1rem) 0.6rem;
}
.sidebar-lang-switch__sep {
  color: var(--color-sidebar-link-text, var(--color-foreground-secondary));
  opacity: 0.5;
}
.sidebar-lang-switch__option {
  color: var(--color-sidebar-link-text, var(--color-foreground-secondary));
  text-decoration: none;
}
.sidebar-lang-switch__option:hover {
  color: var(--color-brand-primary);
}
.sidebar-lang-switch__option--current {
  color: var(--color-brand-primary);
  font-weight: 600;
  pointer-events: none;
}
