/* ANYVA Geführte Maßnahmenprüfung (Prüfassistent).
   Globale Datei mit gcu-Präfix. Nutzt die ANYVA-Design-Tokens (--anyva-*, Theme "ANYVA Hell") mit Fallback-Werten und die
   Status-Tokens aus anyva-status.css. Keine zusätzliche CSS-Bibliothek. Wird im Host (_Host.cshtml) wie anyva-dashboard.css
   eingebunden; CSS-Isolation (.razor.css) wird im Projekt nicht eingebunden und deshalb nicht verwendet. */

.gcu-wizard {
    --gcu-text: var(--anyva-text, #1a2433);
    --gcu-muted: var(--anyva-text-muted, #5b6b82);
    --gcu-border: var(--anyva-border, #e3e8f1);
    --gcu-border-strong: var(--anyva-border-strong, #cbd5e1);
    --gcu-surface: var(--anyva-surface, #fff);
    --gcu-surface-2: var(--anyva-surface-2, #f7f9fc);
    --gcu-accent: var(--anyva-blue-600, #1d4fd8);
    --gcu-accent-strong: var(--anyva-blue-700, #1e40af);
    --gcu-accent-soft: var(--anyva-blue-50, #eff4ff);
    --gcu-accent-line: var(--anyva-blue-300, #93b4f8);
    --gcu-navy: var(--anyva-navy-900, #0f1f35);
    --gcu-radius: var(--anyva-radius, 10px);
    --gcu-radius-lg: var(--anyva-radius-lg, 16px);
    --gcu-radius-ctrl: var(--anyva-radius-ctrl, 8px);
    --gcu-ring: var(--anyva-focus-ring, 0 0 0 3px rgba(37, 99, 235, .28));

    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 4px;
    font-family: var(--anyva-font, inherit);
    font-size: var(--anyva-text-md, .9375rem);
    line-height: 1.5;
    color: var(--gcu-text);
}
.gcu-wizard *, .gcu-wizard *::before, .gcu-wizard *::after { box-sizing: border-box; }

/* ---- Kopfbereich ---------------------------------------------------------------------------- */
.gcu-head {
    display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px;
    padding: 16px 20px;
    background: var(--gcu-surface-2);
    border: 1px solid var(--gcu-border);
    border-radius: var(--gcu-radius-lg);
}
.gcu-head-main { min-width: 0; flex: 1 1 320px; }
.gcu-eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: var(--gcu-accent); }
.gcu-tom-title { margin: 2px 0 0; font-size: 1.3rem; line-height: 1.25; font-weight: 650; color: var(--gcu-navy); overflow-wrap: anywhere; }
.gcu-context { margin-top: 2px; font-size: .85rem; color: var(--gcu-muted); }
.gcu-head-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gcu-chip {
    display: inline-flex; flex-direction: column; gap: 1px; min-width: 120px;
    padding: 6px 12px; background: var(--gcu-surface); border: 1px solid var(--gcu-border); border-radius: var(--gcu-radius-ctrl);
}
.gcu-chip-label { font-size: .72rem; font-weight: 600; color: var(--gcu-muted); }
.gcu-chip-value { font-weight: 600; font-size: .875rem; color: var(--gcu-navy); }
.gcu-chip--progress { background: var(--anyva-st-info-bg, #eff8ff); border-color: var(--anyva-st-info-bd, #84caff); }
.gcu-chip--progress .gcu-chip-value { color: var(--anyva-st-info-fg, #175cd3); }
.gcu-chip--ready { background: var(--anyva-st-infosoft-bg, #f5faff); border-color: var(--anyva-st-infosoft-bd, #b2ddff); }
.gcu-chip--busy { background: var(--anyva-st-warning-bg, #fffaeb); border-color: var(--anyva-st-warning-bd, #fec84b); }
.gcu-chip--busy .gcu-chip-value { color: var(--anyva-st-warning-fg, #b54708); }
.gcu-chip--done { background: var(--anyva-st-success-bg, #ecfdf3); border-color: var(--anyva-st-success-bd, #75e0a7); }
.gcu-chip--done .gcu-chip-value { color: var(--anyva-st-success-fg, #067647); }

/* ---- Schritte -------------------------------------------------------------------------------- */
.gcu-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.gcu-stepper-item {
    display: flex; align-items: center; gap: 10px; min-width: 0;
    padding-top: 10px; border-top: 3px solid var(--gcu-border);
    color: var(--gcu-muted);
}
.gcu-stepper-dot {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    border: 1.5px solid var(--gcu-border-strong); background: var(--gcu-surface);
    font-size: .8rem; font-weight: 700;
}
.gcu-stepper-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.gcu-stepper-name { font-weight: 650; font-size: .9rem; }
.gcu-stepper-sub { font-size: .75rem; }
.gcu-stepper-item.is-current { border-top-color: var(--gcu-accent); color: var(--gcu-navy); }
.gcu-stepper-item.is-current .gcu-stepper-dot { background: var(--gcu-accent); border-color: var(--gcu-accent); color: #fff; }
.gcu-stepper-item.is-done { border-top-color: var(--gcu-accent-line); color: var(--gcu-navy); }
.gcu-stepper-item.is-done .gcu-stepper-dot { background: var(--gcu-accent-soft); border-color: var(--gcu-accent-line); color: var(--gcu-accent-strong); }

/* ---- Karte / Typografie ------------------------------------------------------------------------ */
.gcu-card {
    padding: 24px;
    background: var(--gcu-surface);
    border: 1px solid var(--gcu-border);
    border-radius: var(--gcu-radius-lg);
    box-shadow: var(--anyva-shadow-card, 0 1px 2px rgba(15, 31, 53, .05), 0 2px 8px rgba(15, 31, 53, .04));
}
.gcu-card-title { margin: 0 0 6px; font-size: 1.15rem; font-weight: 650; color: var(--gcu-navy); }
.gcu-lead { margin: 0 0 16px; color: var(--gcu-muted); max-width: 70ch; }
.gcu-hint { margin: 10px 0 0; font-size: .85rem; color: var(--gcu-muted); }
.gcu-field-label { display: block; margin: 20px 0 8px; font-weight: 600; font-size: .875rem; color: var(--gcu-navy); }

/* ---- Auswahlkarten (Prüftiefe, Ergebnis) --------------------------------------------------------- */
.gcu-depth-group { margin-bottom: 16px; }
.gcu-depth-group-label { margin-bottom: 8px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gcu-muted); }
.gcu-depth-grid, .gcu-result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.gcu-result-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.gcu-choice {
    display: flex; align-items: flex-start; gap: 12px;
    min-height: 64px; padding: 14px 16px;
    background: var(--gcu-surface); border: 1.5px solid var(--gcu-border); border-radius: var(--gcu-radius);
    cursor: pointer; transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.gcu-choice:hover { border-color: var(--gcu-accent-line); background: var(--gcu-surface-2); }
.gcu-choice input[type="radio"], .gcu-doc-check input[type="checkbox"] { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gcu-accent); cursor: pointer; }
.gcu-choice-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gcu-choice-title { font-weight: 650; color: var(--gcu-navy); }
.gcu-choice-desc { font-size: .82rem; color: var(--gcu-muted); line-height: 1.4; }
.gcu-choice.is-selected { border-color: var(--gcu-accent); background: var(--gcu-accent-soft); box-shadow: 0 0 0 1px var(--gcu-accent); }
.gcu-choice:has(input:focus-visible) { box-shadow: var(--gcu-ring); }
.gcu-choice--effective.is-selected { border-color: var(--anyva-st-success-fg, #067647); background: var(--anyva-st-success-bg, #ecfdf3); box-shadow: 0 0 0 1px var(--anyva-st-success-fg, #067647); }
.gcu-choice--noteffective.is-selected { border-color: var(--anyva-st-critical-fg, #b42318); background: var(--anyva-st-critical-bg, #fef3f2); box-shadow: 0 0 0 1px var(--anyva-st-critical-fg, #b42318); }
.gcu-choice--unknown.is-selected { border-color: var(--anyva-st-neutral-fg, #475467); background: var(--anyva-st-neutral-bg, #f2f4f7); box-shadow: 0 0 0 1px var(--anyva-st-neutral-fg, #475467); }
.gcu-choice--effective input { accent-color: var(--anyva-st-success-fg, #067647); }
.gcu-choice--noteffective input { accent-color: var(--anyva-st-critical-fg, #b42318); }
.gcu-choice--unknown input { accent-color: var(--anyva-st-neutral-fg, #475467); }

/* ---- Hinweisflächen ---------------------------------------------------------------------------- */
.gcu-callout { margin: 16px 0 0; padding: 12px 14px; border: 1px solid var(--gcu-border); border-left-width: 4px; border-radius: var(--gcu-radius); font-size: .875rem; }
.gcu-callout--info { background: var(--anyva-st-infosoft-bg, #f5faff); border-color: var(--anyva-st-infosoft-bd, #b2ddff); border-left-color: var(--gcu-accent); }
.gcu-callout--warn { background: var(--anyva-st-warning-bg, #fffaeb); border-color: var(--anyva-st-warning-bd, #fec84b); border-left-color: var(--anyva-st-warning-fg, #b54708); color: var(--anyva-st-warning-fg, #93370d); }
.gcu-callout--error { background: var(--anyva-st-critical-bg, #fef3f2); border-color: var(--anyva-st-critical-bd, #fda29b); border-left-color: var(--anyva-st-critical-fg, #b42318); color: var(--anyva-st-critical-fg, #b42318); }
.gcu-callout--human { margin: 0 0 16px; background: var(--gcu-surface-2); border-color: var(--gcu-border); border-left-color: var(--gcu-accent); }

/* ---- Fragenbereich ------------------------------------------------------------------------------ */
.gcu-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.gcu-progress-text { flex: none; font-size: .8rem; font-weight: 600; color: var(--gcu-muted); font-variant-numeric: tabular-nums; }
.gcu-progressbar { position: relative; flex: 1; height: 6px; overflow: hidden; border-radius: 999px; background: var(--anyva-neutral-bg, #e9eef7); }
.gcu-progressbar > span { display: block; height: 100%; border-radius: 999px; background: var(--gcu-accent); transition: width .25s ease; }
.gcu-progressbar--indeterminate { margin: 18px auto 10px; max-width: 420px; }
.gcu-progressbar--indeterminate > span { width: 38%; animation: gcu-slide 1.4s ease-in-out infinite; transition: none; }

.gcu-question { padding: 18px 20px; background: var(--gcu-surface-2); border: 1px solid var(--gcu-border); border-radius: var(--gcu-radius); }
.gcu-ai-badge { display: inline-block; padding: 1px 10px; border-radius: 999px; background: var(--gcu-accent-soft); border: 1px solid var(--gcu-accent-line); color: var(--gcu-accent-strong); font-size: .72rem; font-weight: 700; letter-spacing: .03em; }
.gcu-ai-badge--sm { padding: 0 8px; font-size: .68rem; margin-right: 6px; }
.gcu-question-text { margin: 10px 0 6px; font-size: 1.25rem; line-height: 1.35; font-weight: 650; color: var(--gcu-navy); }
.gcu-question-explain { margin: 0; color: var(--gcu-muted); }
.gcu-evidence-hint { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; padding: 10px 14px; background: var(--gcu-surface); border-left: 3px solid var(--gcu-accent-line); border-radius: 0 var(--gcu-radius-ctrl) var(--gcu-radius-ctrl) 0; font-size: .875rem; }
.gcu-evidence-hint-label { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gcu-muted); }

.gcu-textarea {
    display: block; width: 100%; padding: 12px 14px;
    font: inherit; line-height: 1.5; color: var(--gcu-text);
    background: var(--gcu-surface); border: 1px solid var(--gcu-border-strong); border-radius: var(--gcu-radius-ctrl);
    resize: vertical;
}
.gcu-textarea--lg { min-height: 150px; }
.gcu-textarea:focus { outline: none; border-color: var(--gcu-accent); box-shadow: var(--gcu-ring); }
.gcu-textarea:disabled { background: var(--gcu-surface-2); color: var(--gcu-muted); }

.gcu-doc-picker { display: flex; flex-direction: column; gap: 6px; }
.gcu-doc-check { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 14px; background: var(--gcu-surface); border: 1px solid var(--gcu-border); border-radius: var(--gcu-radius-ctrl); cursor: pointer; }
.gcu-doc-check:hover { background: var(--gcu-surface-2); }
.gcu-doc-check.is-selected { border-color: var(--gcu-accent); background: var(--gcu-accent-soft); }
.gcu-doc-list { margin: 0; padding-left: 20px; color: var(--gcu-muted); font-size: .875rem; }

/* ---- Ladezustand -------------------------------------------------------------------------------- */
.gcu-loading { text-align: center; }
.gcu-loading .gcu-lead { margin-left: auto; margin-right: auto; }
.gcu-loading .gcu-actions { text-align: left; }
.gcu-loading-time { font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--gcu-muted); }
.gcu-spinner { width: 44px; height: 44px; margin: 4px auto 14px; border: 4px solid var(--anyva-neutral-bg, #e9eef7); border-top-color: var(--gcu-accent); border-radius: 50%; animation: gcu-spin .9s linear infinite; }
.gcu-btn-spinner { display: inline-block; width: 14px; height: 14px; margin-right: 8px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; vertical-align: -2px; animation: gcu-spin .8s linear infinite; }

/* ---- Abschluss ---------------------------------------------------------------------------------- */
.gcu-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0 0 4px; }
.gcu-summary-grid > div { padding: 10px 14px; background: var(--gcu-surface-2); border: 1px solid var(--gcu-border); border-radius: var(--gcu-radius); }
.gcu-summary-grid dt { margin: 0; font-size: .75rem; font-weight: 600; color: var(--gcu-muted); }
.gcu-summary-grid dd { margin: 2px 0 0; font-weight: 600; color: var(--gcu-navy); overflow-wrap: anywhere; }
.gcu-overview-list { display: flex; flex-direction: column; gap: 10px; }
.gcu-overview-item { padding: 10px 14px; background: var(--gcu-surface-2); border: 1px solid var(--gcu-border); border-left: 3px solid var(--gcu-accent-line); border-radius: var(--gcu-radius-ctrl); }
.gcu-overview-q { font-size: .82rem; font-weight: 600; color: var(--gcu-muted); }
.gcu-overview-a { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.gcu-overview-a.is-empty { color: var(--gcu-muted); font-style: italic; }
.gcu-overview-docs { margin-top: 4px; font-size: .8rem; color: var(--gcu-muted); }

.gcu-result-pill { display: inline-block; padding: 1px 12px; border: 1px solid var(--anyva-st-neutral-bd, #d0d5dd); border-radius: 999px; font-weight: 700; background: var(--anyva-st-neutral-bg, #f2f4f7); color: var(--anyva-st-neutral-fg, #475467); }
.gcu-result-pill--effective { background: var(--anyva-st-success-bg, #ecfdf3); border-color: var(--anyva-st-success-bd, #75e0a7); color: var(--anyva-st-success-fg, #067647); }
.gcu-result-pill--noteffective { background: var(--anyva-st-critical-bg, #fef3f2); border-color: var(--anyva-st-critical-bd, #fda29b); color: var(--anyva-st-critical-fg, #b42318); }

.gcu-success { text-align: center; }
.gcu-success .gcu-lead { margin-left: auto; margin-right: auto; }
.gcu-success .gcu-summary-grid { text-align: left; }
.gcu-success-icon { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin-bottom: 10px; border-radius: 50%; background: var(--anyva-st-success-bg, #ecfdf3); border: 2px solid var(--anyva-st-success-bd, #75e0a7); color: var(--anyva-st-success-fg, #067647); font-size: 1.9rem; font-weight: 700; }

/* ---- Aktionen / Buttons -------------------------------------------------------------------------- */
.gcu-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--gcu-border); }
.gcu-actions--end { justify-content: center; }
.gcu-actions-spacer { flex: 1 1 auto; }
.gcu-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 42px; padding: 0 20px;
    font: inherit; font-weight: 600; line-height: 1.2; cursor: pointer;
    border: 1px solid transparent; border-radius: var(--gcu-radius-ctrl);
    transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.gcu-btn:focus-visible { outline: none; box-shadow: var(--gcu-ring); }
.gcu-btn--primary { background: var(--gcu-accent); color: #fff; }
.gcu-btn--primary:hover:not(:disabled) { background: var(--gcu-accent-strong); }
.gcu-btn--secondary { background: var(--gcu-surface); border-color: var(--gcu-border-strong); color: var(--gcu-navy); }
.gcu-btn--secondary:hover:not(:disabled) { background: var(--gcu-surface-2); border-color: var(--gcu-accent-line); }
.gcu-btn--ghost { background: transparent; color: var(--gcu-muted); }
.gcu-btn--ghost:hover:not(:disabled) { background: var(--gcu-surface-2); color: var(--gcu-navy); }
.gcu-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---- Popup: genug Platz für den Assistenten (DevExpress-Dialog, der den Assistenten enthält) ------------ */
dxbl-modal-dialog.xafPopup:has(.gcu-wizard) { width: min(1040px, 96vw) !important; max-width: none !important; }
dxbl-modal-dialog.xafPopup:has(.gcu-wizard) .dxbl-modal-body { padding: 12px 16px; }
dxbl-modal-dialog.xafPopup:has(.gcu-wizard) .dxbl-modal-footer { display: none !important; }   /* der Assistent bringt seine eigene Navigation mit */

@keyframes gcu-spin { to { transform: rotate(360deg); } }
@keyframes gcu-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(290%); } }

/* ---- Responsive --------------------------------------------------------------------------------- */
@media (max-width: 760px) {
    .gcu-card { padding: 16px; }
    .gcu-steps { gap: 6px; }
    .gcu-stepper-sub { display: none; }
    .gcu-stepper-item { gap: 6px; }
    .gcu-actions .gcu-btn { flex: 1 1 100%; }
    .gcu-actions-spacer { display: none; }
    .gcu-head-chips { width: 100%; }
    .gcu-chip { flex: 1 1 140px; }
    .gcu-question-text { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .gcu-spinner, .gcu-btn-spinner, .gcu-progressbar--indeterminate > span { animation-duration: 3s; }
    .gcu-progressbar > span, .gcu-choice, .gcu-btn { transition: none; }
}

.gcu-default-chip { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--gcu-accent-soft, #e6f0fb); color: var(--gcu-accent, #0b5cab); vertical-align: middle; }
