/* Export Report wizard — see components/report_wizard.py */

.rw-modal {
    position: fixed; inset: 0; z-index: 1200;
    background: rgba(20, 22, 28, 0.55);
    display: flex; align-items: center; justify-content: center; padding: 32px;
}
.rw-modal--hidden { display: none; }

.rw-dialog {
    background: var(--color-bg-surface); color: inherit;
    border-radius: 12px; width: min(1040px, 100%); height: min(760px, 100%);
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.rw-header {
    display: flex; align-items: center; gap: 24px;
    padding: 14px 20px; border-bottom: 1px solid var(--color-border);
}
.rw-title { font-weight: 700; font-size: 16px; }
.rw-rail { display: flex; gap: 8px; margin-left: auto; margin-right: auto; }
.rw-rail-step {
    font-size: 12px; padding: 4px 12px; border-radius: 999px; border: 0;
    font-family: inherit; cursor: pointer;
    background: var(--color-bg-page); color: var(--color-text-muted);
}
.rw-rail-step:hover { color: var(--color-accent); }
.rw-rail-step--active, .rw-rail-step--active:hover { background: var(--color-accent); color: #fff; }
.rw-rail-step--done { color: var(--color-accent); }
.rw-close {
    border: 0; background: none; font-size: 22px; line-height: 1;
    cursor: pointer; color: var(--color-text-muted);
}

.rw-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.rw-step { display: block; }
.rw-hidden { display: none !important; }
.rw-lead { font-size: 14px; margin: 0 0 14px; }
.rw-note { color: var(--color-text-muted); font-size: 13px; margin-top: 10px; }

.rw-chips { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }

.rw-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.rw-picker {
    border: 1px solid var(--color-border); border-radius: 10px;
    padding: 12px; display: flex; flex-direction: column; min-height: 0;
}
.rw-picker-head { display: flex; justify-content: space-between; align-items: baseline; }
.rw-picker-title { font-weight: 600; }
.rw-picker-count { font-size: 12px; color: var(--color-text-muted); }
.rw-filter-row { display: flex; gap: 6px; align-items: center; margin: 10px 0 0; }
.rw-search { flex: 1; min-width: 0; }
.rw-btn {
    border: 1px solid var(--color-border); background: none; color: inherit;
    border-radius: 6px; padding: 3px 9px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.rw-btn:hover { background: var(--color-bg-page); }
.rw-filters { display: none; gap: 8px; margin-top: 8px; }
.rw-filters--open { display: grid; grid-template-columns: 1fr 1fr; }
.rw-checklist {
    margin-top: 10px; max-height: 260px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 2px; font-size: 13px;
}

.rw-visual-groups { display: flex; flex-direction: column; gap: 20px; }
.rw-visual-group-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em;
    color: var(--color-text-muted); margin: 0 0 8px; }
.rw-visual {
    display: grid; grid-template-columns: 240px 1fr; gap: 12px;
    align-items: center; padding: 7px 0;
    border-top: 1px solid var(--color-border);
}
.rw-visual-settings { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; }
.rw-visual-mode { display: flex; gap: 12px; font-size: 12px; white-space: nowrap; }

.rw-toggles { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 20px; }
.rw-toggle { display: flex; align-items: center; gap: 8px; }
.rw-order-controls { display: grid; grid-template-columns: 1fr 1fr 220px; gap: 22px; }
.rw-field-label { font-weight: 600; font-size: 13px; display: block; margin-bottom: 8px; }

.rw-order-list { display: flex; flex-direction: column; gap: 6px; }
.rw-order-item {
    display: flex; align-items: center; gap: 8px; cursor: grab;
    border: 1px solid var(--color-border); border-radius: 8px;
    padding: 8px 10px; background: var(--color-bg-page); font-size: 13px;
}
.rw-order-item--dragging { opacity: .4; }
.rw-order-item--over { border-color: var(--color-accent); }
.rw-grip { color: var(--color-text-muted); }

.rw-estimate { margin: 16px 0; font-size: 13px; color: var(--color-text-muted); }
.rw-generate-btn {
    border: 0; border-radius: 8px; padding: 9px 18px; cursor: pointer;
    background: var(--color-accent); color: #fff; font-size: 14px;
}
.rw-generate-btn:disabled { opacity: .55; cursor: default; }
.rw-status { margin-top: 12px; font-size: 13px; }

.rw-footer {
    display: flex; align-items: center; gap: 16px;
    padding: 12px 20px; border-top: 1px solid var(--color-border);
}
.rw-hint { flex: 1; font-size: 12px; color: var(--color-text-muted); }
.rw-nav-btn {
    border: 1px solid var(--color-border); background: none; color: inherit;
    border-radius: 999px; padding: 6px 22px; cursor: pointer;
}
.rw-nav-btn--primary { background: var(--color-accent); color: #fff; border-color: transparent; }
.rw-nav-btn:disabled { opacity: .45; cursor: default; }

/* Info-bar trigger, sitting right of the Dropouts stat. */
.pe-infobar-export {
    border: 1px solid var(--color-border); background: none; color: inherit;
    border-radius: 999px; padding: 4px 14px; font-size: 12px;
    cursor: pointer; margin-left: 14px; white-space: nowrap;
}
.pe-infobar-export:hover { background: var(--color-bg-page); }

/* ── Checklist / radio selection ───────────────────────────────────────
   No checkbox: selection reads as a highlighted row, the same language
   dcc.Dropdown's own options already use in assets/01_forms.css. Dash 4
   still renders a real <input> inside .dash-options-list-option-wrapper,
   and that file's global rule keeps it absolutely positioned at opacity 0
   — clicking the label still toggles it, which is exactly how the Dropdown
   works today, so nothing here needs to un-hide it. */
.rw-modal .dash-options-list-option {
    display: flex; align-items: center; cursor: pointer;
    padding: 5px 10px; border-radius: 6px;
    transition: background-color 0.15s, color 0.15s;
}
.rw-modal .dash-options-list-option:hover {
    background-color: rgba(var(--color-accent-rgb), 0.08);
}
.rw-modal .dash-options-list-option.selected {
    background-color: rgba(var(--color-accent-rgb), 0.12);
    color: var(--color-accent);
    font-weight: 600;
}
.rw-modal .dash-options-list-option[aria-disabled="true"] {
    color: var(--color-text-muted); cursor: not-allowed;
}

/* The Types chips and each visual's on/off switch are single standing
   choices rather than rows in a list, so they take the sidebar card's
   tint-plus-accent-border state (assets/06_project_evaluation.css) instead
   of the flat row highlight. */
.rw-chips .dash-options-list-option,
.rw-visual-check .dash-options-list-option {
    border: 1px solid var(--color-border); border-radius: 999px;
    padding: 6px 16px; background-color: var(--color-bg-page);
    transition: border-color 0.15s, background-color 0.15s;
}
.rw-chips .dash-options-list-option:hover,
.rw-visual-check .dash-options-list-option:hover {
    border-color: var(--color-accent-light);
}
.rw-chips .dash-options-list-option.selected,
.rw-visual-check .dash-options-list-option.selected {
    background-color: rgba(var(--color-accent-rgb), 0.1);
    border-color: var(--color-accent);
}
/* A type the chosen receiver can't use: grey whether ticked or not */
.rw-chips .dash-options-list-option:has(input[disabled]),
.rw-chips .dash-options-list-option.selected:has(input[disabled]) {
    background-color: var(--color-bg-page);
    border-color: var(--color-border);
    color: var(--color-text-muted);
    opacity: 0.6;
    cursor: not-allowed;
}

.rw-radio .dash-options-list-option { font-size: 13px; margin-bottom: 2px; }
.rw-visual-mode .dash-options-list-option { padding: 4px 10px; }

/* ── Progress ──────────────────────────────────────────────────────────
   Written to directly by assets/report_download.js: no Dash callback can
   report its own progress part-way, and the build's is polled from a
   server route while it runs. */
.rw-progress { margin-top: 14px; max-width: 520px; }
.rw-progress-track {
    position: relative; height: 8px; border-radius: 999px; overflow: hidden;
    background-color: rgba(var(--color-shadow-rgb), 0.12);
}
.rw-progress-fill {
    position: absolute; inset: 0 auto 0 0; width: 0;
    border-radius: 999px; transition: width 0.2s linear;
}
.rw-progress-fill--gen { background-color: var(--color-accent-light); }
.rw-progress-fill--dl { background-color: var(--color-accent); }

.rw-progress-row {
    display: flex; align-items: center; gap: 12px; margin-top: 8px;
}
.rw-progress-text { font-size: 12px; color: var(--color-text-muted); flex: 1; }
.rw-progress-legend { display: flex; gap: 10px; }
.rw-key { font-size: 11px; color: var(--color-text-muted); display: flex;
          align-items: center; gap: 4px; }
.rw-key::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
}
.rw-key--gen::before { background-color: var(--color-accent-light); }
.rw-key--dl::before { background-color: var(--color-accent); }

/* Finished: both fills full and green, so a completed save reads as done
   at a glance rather than as a bar that merely stopped moving. */
.rw-progress--done .rw-progress-fill { background-color: var(--color-success); }
.rw-progress--done .rw-progress-text { color: var(--color-success); font-weight: 600; }
.rw-progress--failed .rw-progress-text { color: var(--color-error); font-weight: 600; }
