/* ─── Casting-Fragebogen ───────────────────────────────────
   Erscheinungsbild wird im Admin (admin/casting.php → Aussehen) über
   Klassen am <main> gesteuert:
   cs-width-*  cs-sec-*  cs-lbl-*  cs-sp-*  cs-btn-*
   ─────────────────────────────────────────────────────── */

.cs-page { --cs-w: 820px; --cs-gap: 1.15rem; --cs-pad: clamp(1.25rem, 3.5vw, 2.25rem); --cs-err: #e07070; }
.cs-width-narrow { --cs-w: 640px; }
.cs-width-wide   { --cs-w: 1040px; }
.cs-sp-compact { --cs-gap: .75rem;  --cs-pad: clamp(1rem, 3vw, 1.5rem); }
.cs-sp-airy    { --cs-gap: 1.65rem; --cs-pad: clamp(1.5rem, 4.5vw, 3rem); }

.cs-page section.cs-body { padding-top: 0; }
.cs-hero { padding: calc(var(--nav-height) + 4rem) 0 2.5rem; text-align: center; }
.cs-hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 200; letter-spacing: .03em; margin-bottom: 1rem; }
.cs-intro { max-width: 60ch; margin: 0 auto; color: var(--dim); line-height: 1.8; }
.cs-back { color: var(--dim); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; display: inline-block; margin-top: 2rem; }
.cs-back:hover { color: var(--gold); }
.cs-preview-banner { position: sticky; top: 0; z-index: 150; background: var(--gold); color: #000; text-align: center; font-size: .78rem; padding: .4rem 1rem; letter-spacing: .04em; }
.cs-wrap { max-width: calc(var(--cs-w) + 2 * clamp(1.25rem, 5vw, 3.5rem)); }
.cs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cs-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Fortschritt */
.cs-progress { margin-bottom: 1.5rem; }
.cs-bar { height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
.cs-bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .35s var(--ease); }
.cs-step-label { margin-top: .6rem; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* Abschnitte */
.cs-sec { margin-bottom: var(--cs-gap); }
.cs-sec[hidden] { display: none; }
.cs-sec-title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .35rem; }
.cs-sec-desc { color: var(--dim); font-size: .9rem; margin-bottom: 1.4rem; }
.cs-sec-card .cs-sec  { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--cs-pad); }
.cs-sec-lined .cs-sec { border-top: 1px solid var(--gold-line); padding-top: var(--cs-pad); }
.cs-sec-plain .cs-sec { padding: 0; }
.cs-sec-card .cs-sec .cs-fields > .cs-f input:not([type=checkbox]):not([type=radio]),
.cs-sec-card .cs-sec .cs-f select,
.cs-sec-card .cs-sec .cs-f textarea { background: var(--black); }

/* Raster */
.cs-fields { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--cs-gap) 1rem; }
.cs-w-full { grid-column: span 6; } .cs-w-half { grid-column: span 3; } .cs-w-third { grid-column: span 2; }
@media (max-width: 720px) { .cs-w-half, .cs-w-third { grid-column: span 6; } }

/* Felder */
.cs-f { display: flex; flex-direction: column; gap: .4rem; min-width: 0; border: 0; padding: 0; margin: 0; }
.cs-f > label, .cs-group > legend { font-size: .75rem; letter-spacing: .02em; color: var(--text); padding: 0; }
.cs-lbl-caps .cs-f > label, .cs-lbl-caps .cs-group > legend { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.cs-req { color: var(--gold); }
.cs-f input[type=text], .cs-f input[type=email], .cs-f input[type=tel], .cs-f input[type=number], .cs-f input[type=date],
.cs-f select, .cs-f textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font: inherit; font-size: .92rem; padding: .75rem 1rem; border-radius: var(--r); outline: none;
  transition: border-color var(--t); -webkit-appearance: none; appearance: none; color-scheme: dark;
}
.cs-f select { background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
.cs-f select option { background: var(--surface2); }
.cs-f textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.cs-f input:focus, .cs-f select:focus, .cs-f textarea:focus { border-color: var(--gold-line); }
.cs-f input::placeholder, .cs-f textarea::placeholder { color: var(--muted); }
.cs-help { font-size: .78rem; color: var(--muted); line-height: 1.5; }
.cs-err { font-size: .78rem; color: var(--cs-err); min-height: 0; }
.cs-err:empty { display: none; }
.cs-f.has-err input:not([type=checkbox]):not([type=radio]), .cs-f.has-err select, .cs-f.has-err textarea { border-color: var(--cs-err); }
.cs-unit { position: relative; }
.cs-unit input { padding-right: 3rem; }
.cs-unit span { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .8rem; pointer-events: none; }

/* Auswahl: Radio / Checkbox als Pills */
.cs-opts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .2rem; }
.cs-opt { position: relative; cursor: pointer; display: inline-flex; }
.cs-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cs-opt span { display: inline-block; padding: .5rem 1rem; border: 1px solid var(--border2); border-radius: 999px; font-size: .84rem; color: var(--text); transition: all var(--t); }
.cs-opt:hover span { border-color: var(--gold-line); }
.cs-opt input:checked + span { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }
.cs-opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.cs-consent { align-items: flex-start; gap: .75rem; }
.cs-consent input { position: static; width: 18px; height: 18px; flex: 0 0 18px; margin-top: .2rem; accent-color: var(--gold); opacity: 1; }
.cs-consent span { border: 0; border-radius: 0; padding: 0; font-size: .84rem; line-height: 1.6; color: var(--dim); }
.cs-consent input:checked + span { background: none; color: var(--dim); }
.cs-consent a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }

/* Upload */
.cs-file input[type=file] { width: 100%; padding: 1.1rem; background: var(--surface); border: 1px dashed var(--border2); border-radius: var(--r); color: var(--dim); font: inherit; font-size: .85rem; cursor: pointer; }
.cs-file input[type=file]::file-selector-button { background: var(--gold-dim); border: 1px solid var(--gold-line); color: var(--gold); border-radius: var(--r); padding: .45rem .9rem; margin-right: .9rem; font: inherit; font-size: .78rem; cursor: pointer; }
.cs-thumbs { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.cs-thumbs figure { width: 84px; }
.cs-thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--border2); }
.cs-thumbs figcaption { font-size: .62rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .2rem; }

/* Infoblock */
.cs-info h3 { font-size: 1.25rem; }
.cs-info p { color: var(--dim); font-size: .9rem; line-height: 1.7; }

/* Aktionen */
.cs-hint { font-size: .74rem; color: var(--muted); margin: .25rem 0 1rem; }
.cs-alert { padding: .8rem 1rem; background: rgba(220,70,70,.08); border: 1px solid rgba(220,70,70,.25); border-radius: var(--r); color: var(--cs-err); font-size: .85rem; margin-bottom: 1rem; }
.cs-alert[hidden] { display: none; }
.cs-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.cs-btn-left   .cs-actions { justify-content: flex-start; }
.cs-btn-center .cs-actions { justify-content: center; }
.cs-btn-right  .cs-actions { justify-content: flex-end; }
.cs-btn { padding: .9rem 2rem; background: var(--gold); color: var(--black); border: 1px solid var(--gold); border-radius: var(--r); font: inherit; font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transition: all var(--t); }
.cs-btn:hover { background: var(--gold-light); transform: translateY(-1px); }
.cs-btn[hidden] { display: none; }
.cs-btn:disabled { opacity: .55; cursor: progress; transform: none; }
.cs-btn-ghost { background: none; color: var(--dim); border-color: var(--border2); }
.cs-btn-ghost:hover { background: none; color: var(--text); border-color: var(--dim); }

/* Erfolg */
.cs-success { text-align: center; padding: clamp(2rem, 6vw, 4rem) 1rem; border: 1px solid var(--gold-line); border-radius: var(--r-lg); background: var(--gold-dim); outline: none; }
.cs-success[hidden] { display: none; }
.cs-success h2 { margin-bottom: .8rem; }
.cs-success p { color: var(--text); max-width: 52ch; margin: 0 auto; }
