/* Stil für Tabellen */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

table, th, td {
  border: 1px solid #ccc;
}

th, td {
  padding: 10px;
  text-align: left;
}

/* Stil für Codeblöcke */
pre {
  padding: 10px;
  /*overflow: auto;*/
  margin-top: 20px;
}

/* Stil für Code innerhalb von Codeblöcken */
code {
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  font-family: Monaco, monospace;
  color: #333;
}

#search-results-container {
  z-index: 2;

  position: absolute;
  width: 60%;
  display: none;
  visibility: hidden;
  background-color: #eee;

  list-style-type: none;
}

#search-results-container:has(> *) {
  display: block;
  visibility: visible;
}

center p img {
  width: 100%;
}

main {
  line-height: 1.6em;
}

main h1 {
  border-bottom-color: rgba(0, 0, 0, 0.54);
  border-bottom-style: solid;
  border-bottom-width: 0.888889px;
  box-sizing: border-box;
  line-height: 1.3;
  margin: 0 0 1.25em;
}

main h2 {
  border-bottom-color: rgba(0, 0, 0, 0.54);
  border-bottom-style: solid;
  border-bottom-width: 0.888889px;
  box-sizing: border-box;
  line-height: 1.3;
  /*margin: 0 0 1.25em;*/

  /* font-size: calc(16px + 0.4vw);
   margin: 15px 0px 15px 0px;
  font-weight: normal;*/
}


main h3 {
  border-bottom-color: rgba(0, 0, 0, 0.54);
  border-bottom-style: solid;
  border-bottom-width: 0.888889px;
  box-sizing: border-box;
  line-height: 1.3;
  /*margin: 0 0 1.25em;*/

  font-size: calc(16px + 0.4vw);
  /*   margin: 15px 0px 15px 0px;
  font-weight: normal;*/
}

main h4 {
  border-bottom-color: rgba(0, 0, 0, 0.54);
  border-bottom-style: solid;
  border-bottom-width: 0.888889px;
}

/* Basis-Styles (Mobile First): auf kleinen Bildschirmen nicht sticky */
#toc,
#sidebar {
  position: static;       /* Standard-Position */
  top: auto;              /* top wird nur bei sticky relevant */
  max-height: none;       /* volle Höhe */
  overflow-y: visible;    /* kein eigener Scroll */
  background: white;
  padding: 10px;
  border: 1px solid #ddd;
  display: none;
}

/* Ab Tablet/Notebook (z.B. ab 768px Breite): Sticky aktivieren */
@media (min-width: 768px) {
  #toc,
  #sidebar {
    position: sticky;     /* jetzt klebt es */
    top: 80px;            /* Abstand zum oberen Viewport-Rand */
    max-height: 85vh;     /* höchstens 90% der Viewport-Höhe */
    overflow-y: auto;     /* eigener Scroll, falls Inhalt zu lang */
    display: block;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  scroll-margin-top: 80px;
  /* Puffer von 80px über der Überschrift */
}

.nav-toc-item {
  padding: 5px 10px;
  border-left: 3px solid transparent;
  transition: all 0.3s ease-in-out;
}

/* Grundlegendes Styling für Links */
.nav-toc-item a {
  text-decoration: none;
  color: #333;
  /*font-weight: bold;*/
  display: block;
  padding: 5px;
  transition: color 0.3s ease-in-out;
}

/* Hover-Effekt */
.nav-toc-item:hover {
  border-left-color: #4cc2f1;
  /* Blaue Markierung links */
}

.nav-toc-item a:hover {
  color: #4cc2f1;
}

/* Unterschiedliche Einrückung und Schriftgröße für Ebenen */
.nav-toc-item[data-level="1"] {
  margin-left: 0px;
  font-size: 1.2em;
}

.nav-toc-item[data-level="2"] {
  margin-left: 10px;
  font-size: 1.1em;
}

.nav-toc-item[data-level="3"] {
  margin-left: 20px;
  font-size: 1em;
}

.nav-toc-item[data-level="4"] {
  margin-left: 30px;
  font-size: 0.9em;
}

.nav-toc-item[data-level="5"] {
  margin-left: 40px;
  font-size: 0.8em;
}

.nav-toc-item[data-level="6"] {
  margin-left: 50px;
  font-size: 0.7em;
}

h2.title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* Ensures proper vertical alignment */
  gap: 8px;
  /* Adds space between the title and version */
  line-height: 1;
  /* Ensures enough spacing between lines */
  max-width: 100%;
  /* Prevents unnecessary text wrapping */
  word-break: break-word;
  /* Ensures long words wrap properly */
}

h2.title span {
  display: flex;
  align-items: center;
}

h2.title .version {
  margin-left: 10px;
  /* Pushes version away from title */
  position: relative;
  top: 0.1em;
  /* Adjusts vertical position */
}

pre.version {
  display: inline-block;
  vertical-align: middle;
  margin-top: 0 !important;
}

small.version-stamp, small .version {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}


.opblock-tag {
  display: block; /* Ensures it's a block-level element */
  scroll-margin-top: 80px; /* Adds space above when scrolling */
}

.code-wrapper {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: rgba(0,0,0,0.1);
  border: none;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-radius: 0.2rem;
}

.copy-btn:hover {
  background: rgba(0,0,0,0.2);
}


/* expanders.css */

/* Container für eine Gruppe von Expandern */
.expander-group {
  margin: 1em 0;
}

/* Ausklappbarer Block */
.expander {
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 0.75em;
  overflow: hidden;
}

/* Überschrift */
.expander summary {
  list-style: none;
  padding: 0.75em 1em;
  cursor: pointer;
  background: #f5f5f5;
  font-weight: bold;
  position: relative;
}

/* Entfernt den default-Pfeil in WebKit */
.expander summary::-webkit-details-marker {
  display: none;
}

/* Eigenes Pfeil-Icon (▶) */
.expander summary::after {
  content: '\25BA';
  position: absolute;
  right: 1em;
  transition: transform 0.2s ease;
}

/* Pfeil kippen, wenn geöffnet */
.expander[open] summary::after {
  transform: rotate(90deg);
}

/* Hover-Effekt für die Überschrift */
.expander > summary:hover {
  background: #e0e0e0;
}

/* Inhalt */
.expander > *:not(summary) {
  padding: 1em;
  background: white;
}
.custom-nav {
  background-color: #fff;
  padding: 10px 20px;
  position: relative;
  z-index: 1000;
  border-bottom: 1px solid #ddd;
  font-family: sans-serif;
}

/* Burger button */
.burger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
}

.burger span {
  height: 3px;
  width: 100%;
  background: #333;
  display: block;
  border-radius: 2px;
}

/* Menu list base */
.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.menu-list.collapsed {
  display: none;
  flex-direction: column;
  margin-top: 10px;
  gap: 5px;
}

.custom-nav .menu-list > li {
  position: relative;
  margin-right: 25px;
}
/*
.custom-nav .menu-list a {
  text-decoration: none;
  padding: 10px 15px;
  display: block;
  color: #333;
  white-space: nowrap;
}
*/
.custom-nav .menu-list a:not(:has(img)) {
  text-decoration: none;
  padding: 10px 15px;
  display: block;
  color: #333;
  white-space: nowrap;
}

.custom-nav .menu-list > li:hover > a {
  background-color: #f0f0f0;
}

.custom-nav .has-children .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  list-style: none;
  margin: 0;
  padding: 5px 0;
  background: #fff;
  min-width: 180px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 999;
}

/* Prevent hover globally first */
.custom-nav .has-children:hover > .submenu {
  display: none;
}

.custom-nav .submenu li {
  position: relative;
}

.custom-nav .submenu li a {
  padding: 8px 16px;
  color: #333;
  display: block;
}

.custom-nav .submenu li a:hover {
  background-color: #f5f5f5;
}

/* Desktop hover activation */
@media (min-width: 769px) {
  .custom-nav .has-children:hover > .submenu {
    display: block;
  }

  .custom-nav .submenu .has-children:hover > .submenu {
    display: block;
    top: 0;
    left: 100%;
  }
}

@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .menu-list {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .menu-list.show {
    display: flex;
  }

  .custom-nav .menu-list > li {
    margin-right: 0;
  }

  .custom-nav .has-children.open > .submenu {
    display: block;
    position: static;
    box-shadow: none;
    padding-left: 20px;
  }

  .custom-nav .submenu .has-children.open > .submenu {
    display: block;
    padding-left: 20px;
  }
}
.nav-side-item ul li {
  background-color: #f5f5f5; /* heller Grauton */
}

/* Verschachtelungen einrücken */
.nav-side-item ul ul {
  margin-left: 10px;       /* rückt eine verschachtelte Liste nach rechts */
}

.nav-side-item ul ul li {
  background-color: #efefef;  /* optional: etwas anderer Grauton für visuelle Tiefe */
}