:root {
  --docs-max: 900px; /* pas aan naar wens */
}

/* Basis layout voor docs; kolom staat in het midden */
body.docs {
  margin: 0;
  color: #e6e6e6; /* forceer lichte tekst op dark theme */
}

/* Links in docs */
body.docs a:hover {
  text-decoration-line: underline #fff 2px;
}

/* Alle directe secties binnen de body centreren en gelijk uitlijnen */
body.docs > header,
body.docs > main,
body.docs > section,
body.docs > article,
body.docs > div,
body.docs > footer {
  width: min(100%, var(--docs-max));
  margin-left: auto;
  margin-right: auto;
  padding-left: 14px;
  padding-right: 14px;
  box-sizing: border-box;
}

/* Exempt header-controls from the centered column so it can sit top-right */
body.docs > .header-controls {
  width: auto;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 10;
}

/* NIEUW: ook geneste wrappers centreren (geen padding toevoegen) */
body.docs
  :is(
    header,
    main,
    section,
    article,
    div,
    footer,
    .container,
    .content,
    .wrapper,
    .wrap
  ) {
  max-width: var(--docs-max);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Typografie */
body.docs h1,
body.docs h2,
body.docs h3 {
  line-height: 1.25;
  margin: 14px 0 10px;
}

/* Lichaamstekst/lijsten */
body.docs p,
body.docs li {
  line-height: 1.6;
}

/* Media en code veilig schalen en centreren */
body.docs img,
body.docs video,
body.docs canvas,
body.docs svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}
body.docs pre {
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  background: #1b1b1b;
  max-width: 100%;
  box-sizing: border-box;
}
body.docs pre,
body.docs code {
  white-space: pre-wrap;
  word-break: break-word;
}

.language-selector {
  width: auto !important;
}

/* Knoppen/kaarten volgen kolombreedte */
body.docs .button,
body.docs .card,
body.docs .panel {
  width: 100%;
  max-width: 50%;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

body.docs #styleBuilderButton,
body.docs #configureButton {
  max-width: 25% !important;
}

body.docs #themeButtons {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Mobiel finetuning */
@media (max-width: 600px) {
  body.docs > header,
  body.docs > main,
  body.docs > section,
  body.docs > article,
  body.docs > div,
  body.docs > footer {
    padding-left: 10px;
    padding-right: 10px;
  }
  body.docs > .header-controls {
    position: static;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 10px 0 20px 0;
  }
  body.docs h1 {
    font-size: 24px;
  }
  body.docs h2 {
    font-size: 18px;
  }
  body.docs .button {
    width: 100%;
    max-width: 75%;
  }
  body.docs #styleBuilderButton,
  body.docs #configureButton {
    max-width: 50% !important;
  }
}

/* Safeguards tegen horizontale scroll */
html,
body.docs {
  overflow-x: hidden;
}

ol,
ul {
  text-align: left;
  margin: 0 !important;
  list-style: none;
  padding-left: 0;
}
