/* ═══════════════════════════════════════════════════════════════════
   sf-docmode.css  —  Buzz Gitea skin (buzz.xyz palette)
   Gitea 1.24.5 Navbar-Struktur:
     <nav id="navbar">
       <div class="navbar-left">  ← Logo + Explore/Help links
       <div class="navbar-right"> ← Sign In
═══════════════════════════════════════════════════════════════════ */

/* ─── 0a. Schrift: Geist (lokal, kein CDN) ──────────────────────── */
@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --fonts-proportional: "Geist", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --fonts-monospace: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}
body {
  font-family: "Geist", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif !important;
}

/* ─── 0. Brand-Farben erzwingen (Bedienfarbe: Tinte #24292e) ────── */
:root {
  --color-primary:          #24292e;
  --color-primary-dark-1:   #3a4148;
  --color-primary-dark-2:   #1b1f24;
  --color-primary-light-1:  #3a4148;
  --color-primary-light-6:  #f7f7d5;
  --color-primary-alpha-10: rgba(36,41,46,.10);
  --color-link:             #24292e;
  --color-link-hover:       #3a4148;
}

/* ─── 1. Navbar: Tinte, Wortmarke in Markengelb ─────────────────── */
#navbar {
  background: #24292e !important;
  border-bottom: none !important;
  position: sticky !important;
  top: 0;
  z-index: 1000;
}
#navbar * { color: #fff !important; }
#navbar .navbar-right .item:hover,
#navbar .navbar-left  .item:hover { background: rgba(255,255,255,.12) !important; border-radius: 8px !important; }
/* Dropdowns bleiben lesbar */
#navbar .ui.dropdown .menu,
#navbar .ui.dropdown .menu * { color: #1b1f24 !important; background: #fff !important; }

/* ─── 2. Logo: Gitea-logo.svg → workplace.digital Wortmarke ─────── */
/* Gitea rendert:  <a id="navbar-logo" ...><img src="logo.svg"></a>  */
/* Wir tauschen das Bild per JS aus; CSS-Fallback: content-Bild.
   2026-08-14: Fallback von buzz-logo-yellow.svg auf
   workplace-logo-yellow.png umgestellt (gelbe Marke auf Tinte-Navbar),
   sonst überschreibt content: das per JS gesetzte src. */
#navbar-logo {
  display: inline-flex !important;
  align-items: center;
  padding: 0 8px !important;
  min-width: 44px;
}
#navbar-logo img {
  /* JS setzt .src; Fallback: content-Bild */
  content: url("../img/workplace-logo-yellow.png?v=2");
  height: 22px !important;
  width: auto !important;
}

/* ─── 3. Icons ───────────────────────────────────────────────────── */
/* Alle git-entry-icons: erzwinge currentColor (schlägt hardcoded path-fill-Attribute) */
svg.git-entry-icon {
  color: #24292e !important;
  fill:  #24292e !important;
}
/* Pfade INNERHALB der Icons: inline fill="..." überschreiben */
svg.git-entry-icon path,
svg.git-entry-icon polygon,
svg.git-entry-icon circle {
  fill: currentColor !important;
}
/* Datei-Icons etwas ruhiger */
svg.git-entry-icon.octicon-file path,
svg.git-entry-icon.octicon-file-code path {
  fill: #98a0ac !important;
}
svg.git-entry-icon.octicon-file,
svg.git-entry-icon.octicon-file-code {
  color: #98a0ac !important;
  fill:  #98a0ac !important;
}
/* Weitere Repo-/Nav-Icons */
svg.octicon-repo,
svg.octicon-git-branch,
svg.octicon-git-commit { fill: #24292e !important; color: #24292e !important; }
/* Navbar-Icons bleiben weiß */
#navbar svg { fill: #fff !important; color: #fff !important; }

/* ─── 4. DOC/GIT Segmented-Pill ────────────────────────────────── */
#sf-mode-switch {
  display: inline-flex !important;
  align-items: center;
  border: 1.5px solid rgba(255,255,255,.5);
  border-radius: 20px;
  overflow: hidden;
  margin: 0 8px 0 0;
  flex-shrink: 0;
}
#sf-mode-switch .sf-seg {
  display: inline-flex !important;
  align-items: center;
  padding: 5px 13px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
  color: rgba(255,255,255,.65) !important;
  background: transparent !important;
  transition: background .14s, color .14s;
  line-height: 1;
  user-select: none;
  white-space: nowrap;
  border: none;
  text-decoration: none !important;
}
#sf-mode-switch .sf-seg.sf-active {
  background: #fff !important;
  color: #24292e !important;
  border-radius: 18px;
}

/* ─── 5. DOC-Mode (Markdown): Git-Chrome ausblenden ──────────────── */

/* Help-Link in JEDEM Modus ausblenden; Explore bleibt immer sichtbar */
#navbar a[href*="docs.gitea.com"] { display: none !important; }

/* Integrations-Dropdown im Hauptmenü */
#sf-nav-integrations { position: relative; cursor: pointer; }
#sf-nav-integrations .sf-int-toggle { color: #fff !important; }
#sf-nav-integrations .sf-int-menu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 1200;
  background: #fff; border-radius: 12px; min-width: 190px; padding: 8px 0;
  box-shadow: 0 14px 40px rgba(27,31,36,.22);
}
#sf-nav-integrations:hover .sf-int-menu { display: block; }
#sf-nav-integrations .sf-int-menu a {
  display: block; padding: 9px 18px; font-size: 14px;
  color: #1b1f24 !important; text-decoration: none;
}
#sf-nav-integrations .sf-int-menu a:hover { background: #f7f7d5; color: #1b1f24 !important; }

/* Repo-Tabs (Code · Issues · Pull Requests · Actions · …) */
body.sf-doc-mode .ui.tabular.menu,
body.sf-doc-mode .repository .ui.pointing.secondary.menu,
body.sf-doc-mode nav.ui.secondary.pointing.menu { display: none !important; }

/* Repository-Header: Sterne, Fork, Watch, Clone-URL */
body.sf-doc-mode .repository-summary { display: none !important; }
body.sf-doc-mode .clone-buttons-combo,
body.sf-doc-mode #repo-clone-https,
body.sf-doc-mode #repo-clone-ssh { display: none !important; }

/* RSS + Watch + Star + Fork Buttons */
body.sf-doc-mode .flex-text-block.tw-flex-wrap { display: none !important; }
body.sf-doc-mode a[href$=".rss"] { display: none !important; }

/* Branch-Dropdown + Compare-Button (gesamte Toolbar-Zeile) */
body.sf-doc-mode .repo-button-row { display: none !important; }
body.sf-doc-mode .branch-dropdown-wrapper { display: none !important; }
body.sf-doc-mode #git-stats { display: none !important; }

/* Letzter-Commit-Info-Block oberhalb der Dateiliste */
body.sf-doc-mode .repo-file-last-commit { display: none !important; }

/* Datei-Ansicht: Commit-Box, Größen-/Header-Zeile, Frontmatter-Tabelle */
body.sf-doc-mode #repo-file-commit-box { display: none !important; }
body.sf-doc-mode h4.file-header { display: none !important; }
body.sf-doc-mode details.frontmatter-content { display: none !important; }

/* JSON-Dateien verbergen (Dateiliste via :has, Tree/Sonstiges via JS-Klasse) */
body.sf-doc-mode .repo-file-item:has(a[href$=".json"]) { display: none !important; }
body.sf-doc-mode .sf-hide-json { display: none !important; }

/* Repo-Größe (KiB-Anzeige) */
body.sf-doc-mode .flex-text-block.muted { display: none !important; }

/* Sprachen-Leiste (Language stats + "Languages"-Titel) */
body.sf-doc-mode .repo-home-sidebar-bottom,
body.sf-doc-mode .language-stats,
body.sf-doc-mode .repository-lang-stats,
body.sf-doc-mode .code-stats { display: none !important; }

/* Datei-Aktions-Buttons (Bearbeiten, Raw, Blame…) */
body.sf-doc-mode .file-actions,
body.sf-doc-mode .repository.file.content .button-group { display: none !important; }

/* Dateilisten-Info (Commit-Message pro Zeile) */
body.sf-doc-mode .repository .file-list tbody td:last-child,
body.sf-doc-mode .repository .file-list tbody td:nth-last-child(2) { display: none !important; }

/* Sidebar rechts (Beschreibung, Topics, Teilnehmer) */
body.sf-doc-mode .ui.four.wide.column.repository-sidebar,
body.sf-doc-mode .repository-sidebar { display: none !important; }
body.sf-doc-mode .ui.twelve.wide.column.repository-content {
  width: 100% !important;
}

/* Non-diff-Datei-Info (Encoding, Zeilenzahl) */
body.sf-doc-mode .non-diff-file-info { display: none !important; }

/* Repo-Topics */
body.sf-doc-mode .repo-topic { display: none !important; }

/* Lesbarkeit im Doc-Mode */
body.sf-doc-mode .ui.container.fluid,
body.sf-doc-mode .ui.container { max-width: 960px !important; margin: 0 auto !important; }
body.sf-doc-mode .markup.markdown { font-size: 15px; line-height: 1.78; }

/* ─── 6. Footer bereinigen ───────────────────────────────────────── */
.page-footer .left-links,
.page-footer a[href*="gitea.io"],
.page-footer a[href*="about.gitea"],
footer a[href*="gitea"] { display: none !important; }

/* ─── 7. Sonstige grüne Gitea-Elemente → Tinte ──────────────────── */
.ui.green.label,
.ui.green.button { background-color: #24292e !important; }
a.green, .green { color: #24292e !important; }

/* ─── 8. Org-Seite: Abstände komprimieren ────────────────────────
   Standard-Gitea hat ~28px padding oben und ~24px zwischen Org-
   Header und Suchfeld. Wir reduzieren beides auf ~10px (wie der
   Abstand zwischen Suchfeld und erstem Repo-Eintrag).               */
.page-content.organization.profile {
  padding-top: 10px !important;
}
.page-content.organization.profile > .ui.container.tw-flex {
  margin-bottom: 10px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
/* Org-Avatar: kein extra Außenabstand */
.page-content.organization.profile .org-avatar {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
/* Org-Titel-Block: kein Extra-Top-Margin */
.page-content.organization.profile #org-info .ui.header {
  margin-top: 0 !important;
}
