/* ==========================================
   Campaign creation wizard
   The progress rail itself is css/stepper.css.
   ========================================== */

.wizard-step-title {
    margin-bottom: 18px;
}

.wizard-step-title h2 {
    margin: 0 0 6px;
    font-size: 1.25rem;
}

.wizard-step-title p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-muted);
}

/* ------- Navigation ------- */

.wizard-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wizard-nav-spacer {
    flex: 1;
}

/* ------- Reach panel (targeting step) ------- */

.wizard-reach {
    padding: 14px 18px;
    margin-top: 14px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 0.9rem;
}

.wizard-reach strong {
    color: var(--success-color);
}

.wizard-reach--empty {
    background: rgba(245, 158, 11, 0.07);
    border-color: rgba(245, 158, 11, 0.25);
}

.wizard-reach--empty strong {
    color: var(--warning-color, #f59e0b);
}

/* ------- Content step ------- */

.wizard-content-versions {
    margin-bottom: 18px;
}

.wizard-version {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.wizard-version-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.wizard-version-spacer {
    flex: 1;
}

/* What was uploaded: file kind, screen slot, screen shape. */
.wizard-version-chip {
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-family: var(--font-mono);
    white-space: nowrap;
}

.wizard-version-chip--format {
    border-color: rgba(34, 199, 224, 0.35);
    color: var(--primary-color);
}

/* Inline preview, so looking at the creative never leaves the flow. */
.wizard-version-preview {
    margin: -4px 0 14px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.wizard-empty {
    padding: 22px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

/* The upload form, mounted inline rather than linked to. Collapsible so a long form does
   not push the version list and the stepper off screen once content exists. */
.wizard-upload {
    margin: 18px 0;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.wizard-upload-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.wizard-upload-summary::-webkit-details-marker {
    display: none;
}

.wizard-upload-summary:hover {
    background: var(--hover-color);
}

.wizard-upload-title {
    flex: 1;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
}

.wizard-upload-chevron {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.wizard-upload[open] .wizard-upload-chevron {
    transform: rotate(90deg);
}

.wizard-upload-body {
    padding: 4px 18px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Inside the wizard the form's own section chrome would nest a box in a box. */
.wizard-upload-body .form-section {
    padding-left: 0;
    padding-right: 0;
    border-left: none;
    border-right: none;
    background: transparent;
}

/* ------- Review step ------- */

.wizard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.wizard-summary-card {
    position: relative;   /* anchors .wizard-summary-edit in the corner */
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* The pencil on a summary card. Quiet on purpose: the card is not a form, so a loud button
   would compete with Continue for attention — but it is a real control, so it brightens on
   hover and takes a visible focus ring rather than only changing colour. */
.wizard-summary-edit {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    opacity: 0.55;
    cursor: pointer;
    transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.wizard-summary-edit:hover {
    opacity: 1;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.wizard-summary-edit:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    opacity: 1;
}

/* Says what the form below is doing and how to get out of it, because "Continue" alone does
   not distinguish saving an edit from creating something new. */
.wizard-edit-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--primary-color);
    font-size: 0.86rem;
    color: var(--text-muted);
}

.wizard-edit-banner-text strong {
    color: var(--text-color);
}

.wizard-edit-banner-actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.wizard-edit-banner-link {
    color: var(--primary-color);
    white-space: nowrap;
}

.wizard-summary-card h4 {
    margin: 0 0 10px;
    font-size: 0.78rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.wizard-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    font-size: 0.86rem;
}

.wizard-summary-row .label {
    color: var(--text-muted);
}

.wizard-summary-row .value {
    text-align: right;
    color: var(--text-color);
}

/* .wizard-blocker is gone: the review step's hand-computed blocker list was replaced by the
   server's readiness checklist (js/readiness-panel.js, .readiness* in portal-common.css). */

@media (max-width: 640px) {
    .wizard-nav {
        flex-wrap: wrap;
    }
    .wizard-nav-spacer {
        display: none;
    }
}
