/* Styleguide /design (B5.6): nur Rahmen für die Beispiele. Die Beispiele selbst nutzen die echten
   Klassen der App, damit der Styleguide nie vom Produkt abweicht. */

.styleguide-nav { display: flex; flex-wrap: wrap; gap: var(--s-space-2); margin-bottom: var(--s-space-5); }

.styleguide-section { display: grid; gap: var(--s-space-3); padding: var(--s-space-5) 0; border-top: 1px solid var(--s-border); scroll-margin-top: 16px; }
.styleguide-section__title { margin: 0; display: flex; align-items: center; gap: var(--s-space-2); font-family: var(--s-font-head); font-size: var(--s-text-xl); font-weight: 800; }
.styleguide-section__rule { margin: 0; max-width: 72ch; color: var(--s-text-2); }

.styleguide-demo { display: grid; gap: var(--s-space-3); padding: var(--s-space-5); border: 1px dashed var(--s-border-strong); border-radius: var(--s-radius-lg); background: var(--s-bg); min-width: 0; }
.styleguide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--s-space-4); }
.styleguide-form { display: grid; gap: var(--s-space-4); max-width: 480px; }
.styleguide-state { display: grid; gap: var(--s-space-3); align-content: start; }
.styleguide-state__label { margin: 0; font-weight: 700; }

/* Toasts sind in der App fest unten rechts – hier im Fluss zeigen */
.styleguide-toasts { display: grid; gap: var(--s-space-2); max-width: 380px; }
.styleguide-prices { display: grid; max-width: 360px; margin: var(--s-space-4) 0 0; padding: 0; list-style: none; }

.styleguide-code summary { display: inline-flex; align-items: center; gap: var(--s-space-2); cursor: pointer; color: var(--s-text-2); font-weight: 600; min-height: 44px; }
.styleguide-code__bar { display: flex; justify-content: flex-end; margin: var(--s-space-2) 0; }
.styleguide-code .code-block { margin: 0; max-height: 360px; font-family: var(--s-font-mono); white-space: pre; }

/* Tokens aus dem CSSOM (styleguide_tokens_controller.js) */
.styleguide-tokens { display: grid; gap: var(--s-space-3); }
.styleguide-tokens__title { margin: var(--s-space-2) 0 0; display: flex; align-items: center; gap: var(--s-space-2); font-size: var(--s-text-base); font-weight: 800; }
.styleguide-tokens__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: var(--s-space-3); margin: 0; padding: 0; list-style: none; }
.styleguide-token { display: grid; gap: var(--s-space-1); align-content: start; padding: var(--s-space-3); border: 1px solid var(--s-border); border-radius: var(--s-radius); background: var(--s-surface); min-width: 0; }
.styleguide-token code { font-family: var(--s-font-mono); font-size: var(--s-text-sm); overflow-wrap: anywhere; }
.styleguide-token__value, .styleguide-token__contrast { color: var(--s-text-2); font-size: var(--s-text-sm); overflow-wrap: anywhere; }
.styleguide-token__preview { display: block; height: 40px; max-width: 100%; border: 1px solid var(--s-border); border-radius: var(--s-radius-sm); background: var(--s-surface); overflow: hidden; }
.styleguide-token__preview[data-kind="sizes"] { height: auto; min-height: 16px; border: 0; background: var(--s-accent-soft); white-space: nowrap; text-overflow: ellipsis; line-height: 1.2; }
.styleguide-token__preview[data-kind="radii"] { width: 64px; background: var(--s-accent-soft); border-color: var(--s-accent-border); }
.styleguide-token__preview[data-kind="shadows"] { width: 96px; margin: var(--s-space-2); }
.styleguide-token__preview[data-kind="other"] { height: auto; border: 0; background: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* display: grid/flex würde das hidden-Attribut überstimmen (leere Gruppen, gefilterte Icons) */

/* Icon-Übersicht */
.styleguide-filter { max-width: 320px; }
.styleguide-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: var(--s-space-2); margin: 0; padding: 0; list-style: none; }
.styleguide-icons__item { display: flex; align-items: center; gap: var(--s-space-2); min-width: 0; padding: var(--s-space-2); border: 1px solid var(--s-border); border-radius: var(--s-radius); background: var(--s-surface); }
.styleguide-icons__item code { font-family: var(--s-font-mono); font-size: var(--s-text-xs); overflow-wrap: anywhere; }
