/* Prompt-Generator – Styling der Generator-Seite. Tokens und Grundstile stehen in site.css. */

.noscript { padding: 1rem; margin-top: 1rem; background: var(--warn-soft); border-radius: var(--radius); }

/* Grundlayout */
.layout { display: grid; gap: 1.5rem; padding-block: 1.5rem 4rem; }
.wizard { min-width: 0; }

/* Fortschritt */
.progress ol { list-style: none; margin: 0; padding: 0 0 0.5rem; display: flex; gap: 0.375rem; overflow-x: auto; scrollbar-width: thin; }
.progress__step { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 44px; padding: 0.375rem 0.75rem; white-space: nowrap; font: inherit; font-size: 0.85rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
/* Maus/Trackpad: niedrigere Pills (weiterhin über WCAG 2.5.8 mit 24 px) */
@media (pointer: fine) { .progress__step { min-height: 32px; padding-block: 0.2rem; } }
.progress__step:hover { border-color: var(--primary); }
.progress__step[aria-current="step"] { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.progress__step.is-done:not([aria-current])::after { content: "✓"; color: var(--success); font-weight: 700; }
.progress__bar { height: 4px; margin: 0.75rem 0 1.25rem; overflow: hidden; background: var(--surface-2); border-radius: 2px; }
.progress__bar span { display: block; width: 0; height: 100%; background: var(--primary); transition: width 0.25s ease; }

/* Schritte */
.step { padding: clamp(1rem, 0.5rem + 2vw, 2rem); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.step h2 { margin: 0 0 0.25rem; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); line-height: 1.25; }
.step h2:focus { outline: none; }
.step h2:focus-visible { outline: 3px solid var(--focus); }
.step__count { display: block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.step__intro { margin: 0 0 1.5rem; color: var(--muted); }

/* Felder */
.field { margin: 0 0 1.5rem; }
.field > label, .field__title { display: block; margin: 0 0 0.35rem; font-size: 1rem; font-weight: 600; }
.required { color: var(--danger); }
.help { margin: 0.1rem 0 0.5rem; font-size: 0.9rem; color: var(--muted); }
.error { margin: 0.35rem 0 0; font-size: 0.9rem; color: var(--danger); }
.error:empty { display: none; }
input[type="text"], textarea, select { width: 100%; min-height: 44px; padding: 0.6rem 0.75rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; }
textarea { resize: vertical; }
input[type="text"]:hover, textarea:hover, select:hover { border-color: var(--muted); }
[aria-invalid="true"] { border-color: var(--danger) !important; background: var(--danger-soft); }

.group { margin: 0; padding: 0; border: 0; min-width: 0; }
.group > legend { margin-bottom: 0.35rem; padding: 0; font-weight: 600; }
.options { display: grid; gap: 0.25rem 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.options--inline { display: flex; flex-wrap: wrap; }
.option { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; }
.option input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--primary); }
.option label { cursor: pointer; }
.other { margin-top: 0.5rem; }
.other label { display: block; margin-bottom: 0.25rem; font-size: 0.9rem; }
.subgroup { margin: 0 0 0.75rem; padding: 0.5rem 0.9rem 0.25rem; border: 1px solid var(--border); border-radius: 8px; }
.subgroup legend { padding: 0 0.25rem; font-weight: 600; }

/* Schalter */
.toggle { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; }
.toggle label { cursor: pointer; }
.toggle input { appearance: none; position: relative; flex: none; width: 2.6rem; height: 1.5rem; margin: 0; background: var(--border-strong); border-radius: 999px; cursor: pointer; transition: background 0.2s; }
.toggle input::before { content: ""; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.1rem; height: 1.1rem; background: #ffffff; border-radius: 50%; transition: transform 0.2s; }
.toggle input:checked { background: var(--primary); }
.toggle input:checked::before { transform: translateX(1.1rem); }

/* Farben */
.field--color { display: inline-block; width: min(100%, 15rem); margin-right: 1rem; vertical-align: top; }
.color-input { display: flex; align-items: center; gap: 0.5rem; }
.color-input input[type="color"] { flex: none; width: 3rem; height: 44px; padding: 0.2rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; cursor: pointer; }
.palettes { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); }
.palette { position: relative; }
.palette input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.palette label { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; padding: 0.6rem; background: var(--surface); border: 2px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; }
.palette input:checked + label { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.palette input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.palette__swatches { display: flex; height: 2rem; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; }
.palette__swatches span { flex: 1; }
.palette__name { font-size: 0.9rem; font-weight: 600; }
.palette__mood { font-size: 0.8rem; color: var(--muted); }

/* Kontrast */
.contrast__list { display: grid; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.contrast__item { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; }
.contrast__sample { display: inline-grid; place-items: center; width: 2.75rem; height: 2rem; font-weight: 700; border: 1px solid var(--border); border-radius: 6px; }
.contrast__label { flex: 1; min-width: 12rem; }
.contrast__ratio { font-weight: 600; font-variant-numeric: tabular-nums; }
.badge { padding: 0.15rem 0.5rem; font-size: 0.8rem; font-weight: 700; border-radius: 999px; }
.badge--AAA, .badge--AA { color: var(--success); background: var(--success-soft); }
.badge--fail { color: var(--danger); background: var(--danger-soft); }

/* Seiten und Kontakt */
.pages, .contacts { display: grid; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.page-row, .contact-row { display: grid; grid-template-columns: minmax(12rem, 16rem) 1fr auto; gap: 0.25rem 1rem; align-items: center; }
.page-row:not(.page-row--custom):not(:has(input[type="checkbox"]:checked)) .page-row__note { display: none; }
.contact-row:not(:has(input[type="checkbox"]:checked)) .contact-row__value { display: none; }
.page-row__label { padding-left: 1.75rem; font-weight: 500; }
.page-add { margin-top: 0.75rem; }
.page-add label { display: block; margin-bottom: 0.35rem; font-weight: 600; }
.page-add__row { display: flex; gap: 0.5rem; }
.page-add__row input { flex: 1; }
@media (max-width: 600px) {
  .page-row, .contact-row { grid-template-columns: 1fr auto; }
  .page-row__note, .contact-row__value { grid-column: 1 / -1; }
}

.step-nav { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 1rem; }
.preview-toggle { width: 100%; margin-top: 1rem; }

/* Ergebnis */
.result-text { min-height: 24rem; font-family: var(--mono); font-size: 0.85rem; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.status { margin: 0.75rem 0 0; font-weight: 600; color: var(--success); }
.status:empty { display: none; }
.status--error { color: var(--danger); }
.notice { margin-bottom: 1rem; padding: 0.75rem 1rem; background: var(--warn-soft); border-radius: 8px; }
.notice p { margin: 0; }
.notice--error { background: var(--danger-soft); }
.preview__hint { margin-right: auto; font-size: 0.8rem; color: var(--muted); }
.hint { font-size: 0.9rem; color: var(--muted); }
.agency-note { margin-top: 1.5rem; }

/* Vorschau */
.preview { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.preview__head { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.preview__head h2 { margin: 0; font-size: 1.05rem; }
.preview__stats { margin-left: auto; font-size: 0.8rem; color: var(--muted); }
.preview__body { flex: 1; margin: 0; padding: 1rem; overflow: auto; font-family: var(--mono); font-size: 0.8rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; background: var(--surface-2); }
.preview__foot { display: flex; align-items: center; gap: 0.75rem; justify-content: flex-end; padding: 0.75rem 1rem; border-top: 1px solid var(--border); }

@media (min-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr) minmax(360px, 42%); align-items: start; }
  .progress ol { flex-wrap: wrap; overflow: visible; }
  .preview { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); }
  .preview-toggle, .preview__close { display: none; }
}

@media (max-width: 1023.98px) {
  .preview { display: none; }
  .preview.is-open { display: flex; position: fixed; inset: 0; z-index: 50; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
