.export-wizard {
    width: 100%;
    max-width: 760px;
    min-width: 0;
    margin-inline: auto;
}

@media (min-width: 992px) {
    .export-wizard {
        max-width: 960px;
    }
}

.export-wizard [hidden] {
    display: none !important;
}

.export-wizard-card,
.export-step,
.export-mode-card,
.export-check-card,
.export-option-section,
.export-field-mode {
    min-width: 0;
}

.export-beta-banner {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-height: 2.5rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 0.4rem 0 0.65rem;
    border: 1px solid #dbeafe;
    border-radius: var(--ds-radius-md);
    background: #f1f7ff;
    color: #1e3a8a;
    font-size: 0.875rem;
    line-height: 1.25;
}

.export-option-with-info {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.25rem;
}

.export-option-with-info .export-check-card {
    flex: 1 1 auto;
}

.export-option-with-info .person-info-trigger {
    flex: 0 0 2.75rem;
}

.export-beta-popover {
    width: min(20rem, calc(100vw - 1.5rem));
    max-width: calc(100vw - 1.5rem);
    max-height: min(70vh, 30rem);
}

.export-option-popover {
    width: min(20rem, calc(100vw - 1.5rem));
    max-width: calc(100vw - 1.5rem);
}

.export-option-popover .popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
}

.export-option-popover .popover-body {
    padding: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.45;
}

.export-beta-popover .popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
}

.export-beta-popover .popover-body {
    max-height: min(60vh, 25rem);
    overflow-y: auto;
    padding: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.45;
}

.export-beta-popover .popover-body p + p {
    margin-top: 0.75rem;
}

.export-beta-popover-close {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    border-radius: var(--ds-radius-sm);
    background: transparent;
    color: var(--ds-color-text-secondary);
    font-size: 1.5rem;
    line-height: 1;
}

.export-beta-popover-close:focus-visible {
    outline: 2px solid var(--ds-color-brand-600);
    outline-offset: -2px;
}

.export-mode-card:has(input:focus-visible) {
    outline: 3px solid var(--ds-color-brand-600);
    outline-offset: 2px;
}

.export-progress {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.export-progress-item {
    position: relative;
    display: flex;
    flex: 1 1 0;
    justify-content: center;
}

.export-progress-item::before {
    position: absolute;
    z-index: 0;
    top: 1rem;
    right: -50%;
    left: 50%;
    height: 2px;
    background: var(--ds-color-border-default);
    content: "";
}

.export-progress-item:last-child::before {
    display: none;
}

.export-progress-item.is-last::before {
    display: none;
}

.export-progress-number {
    position: relative;
    z-index: 1;
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border: 1px solid var(--ds-color-border-strong);
    border-radius: 50%;
    background: var(--ds-color-surface);
    color: var(--ds-color-text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
}

.export-progress-item.is-current .export-progress-number,
.export-progress-item.is-complete .export-progress-number {
    border-color: var(--ds-color-brand-600);
    background: var(--ds-color-brand-600);
    color: #fff;
}

.export-progress-item.is-complete::before {
    background: var(--ds-color-brand-600);
}

.export-mode-card,
.export-check-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: var(--ds-touch-target-min);
    margin: 0;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--ds-color-border-default);
    border-radius: var(--ds-radius-md);
    background: var(--ds-color-surface);
    cursor: pointer;
    overflow-wrap: anywhere;
}

.export-mode-card {
    align-items: flex-start;
    gap: 0;
    padding: 0.55rem 0.7rem;
}

.export-mode-list {
    gap: 0.35rem;
}

.export-mode-card:has(input:checked),
.export-check-card:has(input:checked) {
    border-color: var(--ds-color-brand-600);
    background: #eff6ff;
}

.export-mode-card .form-check-input,
.export-check-card .form-check-input {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.1rem 0 0;
}

.export-mode-copy {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 0.1rem;
}

.export-required-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0.45rem 0.6rem;
    border-radius: var(--ds-radius-md);
    background: var(--ds-color-bg-subtle);
    font-size: 0.875rem;
}

.export-option-section {
    padding: 0.85rem;
    border: 1px solid var(--ds-color-border-default);
    border-radius: var(--ds-radius-md);
    background: var(--ds-color-bg-subtle);
}

.export-check-list,
.export-options-stack {
    display: grid;
    gap: 0.5rem;
}

.export-field-group {
    margin-bottom: 0.35rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--ds-color-border-default);
    border-radius: var(--ds-radius-md);
    background: var(--ds-color-surface);
}

.export-field-group > summary {
    display: flex;
    min-height: 2.5rem;
    align-items: center;
    color: var(--ds-color-text-primary);
    font-weight: 600;
    cursor: pointer;
}

.export-field-mode .export-check-list {
    gap: 0.25rem;
}

.export-field-mode .export-check-card {
    min-height: 2.5rem;
    padding: 0.4rem 0.55rem;
    gap: 0.55rem;
}

.export-field-actions .btn {
    min-height: 2.5rem;
    padding: 0.35rem 0.6rem;
}

.export-wizard-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.export-wizard-actions .btn {
    min-width: 7rem;
    min-height: var(--ds-touch-target-min);
}

.export-summary {
    display: grid;
    gap: 0;
    padding: 0.25rem 0.85rem;
    border: 1px solid var(--ds-color-border-default);
    border-radius: var(--ds-radius-md);
    background: var(--ds-color-surface);
}

.export-summary > div {
    display: grid;
    grid-template-columns: minmax(6.5rem, 0.7fr) minmax(0, 1.3fr);
    gap: 0.5rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--ds-color-divider);
}

.export-summary > div:last-child {
    border-bottom: 0;
}

.export-summary dt {
    color: var(--ds-color-text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
}

.export-summary dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    .export-wizard-actions .btn {
        flex: 1 1 0;
    }

    .export-summary > div {
        grid-template-columns: minmax(5.75rem, 0.75fr) minmax(0, 1.25fr);
        gap: 0.4rem;
    }
}

@media (max-width: 767.98px) {
    .export-wizard .export-touch-control {
        height: 32px;
        min-height: 32px;
        padding: 0.25rem 0.5rem;
        line-height: 1.2;
    }

    .export-field-actions .btn {
        min-height: 32px;
        padding: 0.25rem 0.5rem;
    }

    .export-option-section .export-check-list,
    .export-options-stack {
        gap: 0.25rem;
    }

    .export-option-section [data-export-wizard-target="categoryMode"] .export-check-card {
        min-height: 32px;
        padding-block: 0.25rem;
        line-height: 1.2;
    }

    .export-option-section [data-export-wizard-target="categoryMode"] .export-check-card > span {
        min-width: 0;
    }
}
