/* Seitenspezifische Stile fuer /funktionen/dokumentation/ -- nur diese Seite. */

/* Abstand zwischen zwei aufeinanderfolgenden Text+Bild-Bloecken. */
.dok-gap { margin-top: clamp(36px, 5vw, 56px); }

/* --- Mock: Editor + Textbausteine-Schnellauswahl ----------------------- */
.dok-snip { overflow: visible; }
.dok-snip .mock__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dok-snip__toolbar {
  display: flex; align-items: center; gap: 2px;
  margin: 14px 16px 0; padding: 4px;
  border: 1px solid var(--border); border-bottom: 0; border-radius: 6px 6px 0 0; background: #f9fafb;
  color: var(--text-strong);
}
.dok-snip__toolbar span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 26px; border-radius: 5px; }
.dok-snip__toolbar i { width: 1px; height: 18px; margin: 0 4px; background: var(--border); }
.dok-snip__editor {
  margin: 0 16px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 0 0 6px 6px; background: #fff;
  font-size: 13px; line-height: 1.6; color: var(--text-strong);
}
.dok-snip__editor p { margin: 0; }
.dok-snip__editor p + p { margin-top: 6px; }
.dok-snip__editor b { font-weight: 600; color: var(--text-heading); }
.dok-snip__caret {
  display: inline-block; width: 1.5px; height: 1.1em; vertical-align: text-bottom;
  background: var(--accent); animation: dok-blink 1.1s steps(1) infinite;
}
@keyframes dok-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dok-snip__caret { animation: none; } }

.dok-snip__chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 10px 16px 16px; margin-top: 2px;
}
.dok-snip__label { font-size: 12px; color: var(--text-muted); margin-right: 2px; }
.dok-snip__chip {
  position: relative; display: inline-flex; align-items: center;
  padding: 3px 9px; font-size: 12px; line-height: 1.4; color: var(--text-strong);
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
}
.dok-snip__chip--hover { border-color: var(--accent-border); background: var(--accent-fill-soft); color: var(--accent-deep); }
.dok-snip__tip {
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 1;
  width: max-content; max-width: 230px; padding: 7px 10px;
  font-size: 11.5px; line-height: 1.45; color: #fff; background: #374151; border-radius: 6px;
  box-shadow: 0 8px 20px -10px rgba(17, 24, 39, .5);
}
.dok-snip__tip::after {
  content: ""; position: absolute; left: 18px; top: 100%;
  border: 5px solid transparent; border-top-color: #374151;
}
.dok-snip__link { font-size: 12px; color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }

/* --- Mock: Aenderungshistorie ------------------------------------------ */
.dok-hist__badge {
  display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 5px;
  font-size: 11px; font-weight: 500; color: var(--text-muted); background: var(--border-light);
}
.dok-hist__list { border-left: 2px solid var(--border); padding-left: 12px; display: flex; flex-direction: column; gap: 6px; }
.dok-hist__prev { padding: 7px 9px; border: 1px solid var(--border-light); border-radius: 5px; background: #f9fafb; }
.dok-hist__prev p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text); }
.dok-hist__prev .dok-hist__cap { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px; }
.mock__field b { font-weight: 600; color: var(--text-heading); }

/* --- Diagramm: breit / schmal ------------------------------------------ */
.dok-flow__wide { display: none; }
.dok-flow__narrow { display: block; max-width: 420px; margin: 0 auto; }

@media (min-width: 720px) {
  .dok-flow__wide { display: block; }
  .dok-flow__narrow { display: none; }
  .steps--4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .steps--4 { grid-template-columns: repeat(4, 1fr); }
}

.dok-nowrap { white-space: nowrap; }

/* Schmal: Vorschau-Baustein nach vorn, damit die Vorschau keine Bausteine verdeckt. */
@media (max-width: 559px) {
  .dok-snip .mock__meta { display: none; }
  .dok-snip__label { order: -2; }
  .dok-snip__chip--hover { order: -1; }
  .dok-snip__tip { left: auto; right: 0; }
  .dok-snip__tip::after { left: auto; right: 18px; }
  .dok-snip__editor { padding-bottom: 36px; }
}

/* Gespiegeltes duo mit breiterem Bild (Bild links): duo--wide-figure
   wuerde bei duo--flip die schmale Spalte dem Bild geben. */
@media (min-width: 1024px) {
  .dok-duo-flipwide { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
}
