/* Shared export surfaces. The visual language mirrors ChatExportDialog. */
.app-export-backdrop {
  position: fixed;
  z-index: 12000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(25, 25, 25, 0.48);
  backdrop-filter: blur(2px);
}

.app-export-backdrop__hit-area {
  position: absolute;
  inset: 0;
}

.app-export-modal,
.app-export-embedded {
  --export-accent-soft: #edf9f2;
  --export-accent-border: #bce7cc;
  --export-accent-text: #087a41;
  --export-warning-soft: #fff8e8;
  --export-warning-border: #f2d79a;
  --export-warning-text: #8a5a00;
  --export-danger-soft: #fff2f1;
  --export-danger-border: #f1c0bc;
  --export-danger-text: #b42318;
  color: var(--app-text-primary);
  letter-spacing: 0;
}

.app-export-modal {
  position: relative;
  display: flex;
  width: min(1180px, calc(100vw - 32px));
  height: min(760px, calc(100dvh - 32px));
  min-height: min(620px, calc(100dvh - 32px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-surface-bg);
  box-shadow: 0 28px 70px rgba(25, 25, 25, 0.26);
}

.app-export-modal--compact {
  width: min(700px, calc(100vw - 32px));
  height: auto;
  min-height: 0;
  max-height: min(760px, calc(100dvh - 32px));
}

.app-export-modal--medium {
  width: min(760px, calc(100vw - 32px));
  height: auto;
  min-height: 0;
  max-height: min(780px, calc(100dvh - 32px));
}

.app-export-modal :is(button, input, select, a):focus-visible,
.app-export-embedded :is(button, input, select, a):focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}

.app-export-header {
  display: flex;
  min-height: 64px;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface-bg);
}

.app-export-header__icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--export-accent-border);
  border-radius: 7px;
  background: var(--export-accent-soft);
  color: var(--app-accent);
}

.app-export-header__icon svg {
  width: 21px;
  height: 21px;
}

.app-export-header__copy {
  min-width: 0;
  flex: 1;
}

.app-export-header__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.app-export-header h2 {
  margin: 0;
  color: var(--app-text-primary);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
}

.app-export-header p {
  margin: 3px 0 0;
  color: var(--app-text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.app-export-icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--app-text-muted);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.app-export-icon-button:hover {
  background: var(--app-neutral-btn-hover);
  color: var(--app-text-primary);
}

.app-export-icon-button--danger:hover {
  background: var(--export-danger-soft);
  color: var(--export-danger-text);
}

.app-export-icon-button svg {
  width: 17px;
  height: 17px;
}

.app-export-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.app-export-alert {
  display: flex;
  min-height: 40px;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 9px 20px;
  border-bottom: 1px solid;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.app-export-alert svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.app-export-alert--error {
  border-color: var(--export-danger-border);
  background: var(--export-danger-soft);
  color: var(--export-danger-text);
}

.app-export-alert--warning {
  border-color: var(--export-warning-border);
  background: var(--export-warning-soft);
  color: var(--export-warning-text);
}

.app-export-alert--success {
  border-color: var(--export-accent-border);
  background: var(--export-accent-soft);
  color: var(--export-accent-text);
}

.app-export-workspace {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
}

.app-export-layout {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(390px, 0.78fr) minmax(560px, 1.22fr);
  overflow: hidden;
  background: var(--app-surface-bg);
}

.app-export-scope {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: 18px 20px 20px;
  background: var(--app-surface-bg);
}

.app-export-settings {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  border-left: 1px solid var(--app-border);
  background: var(--app-surface-soft);
  scrollbar-color: var(--scrollbar-thumb) transparent;
  scrollbar-width: thin;
}

.app-export-settings--single {
  width: 100%;
  max-height: min(650px, calc(100dvh - 164px));
  border-left: 0;
}

.app-export-panel {
  width: 100%;
  padding: 16px 18px 18px;
  border-bottom: 1px solid var(--app-border);
}

.app-export-panel:last-child {
  border-bottom: 0;
}

.app-export-panel__header {
  display: flex;
  min-height: 36px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.app-export-panel__header h3,
.app-export-panel__header p,
.app-export-field h4,
.app-export-field p {
  margin: 0;
}

.app-export-panel__header h3 {
  color: var(--app-text-primary);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
}

.app-export-panel__header p {
  margin-top: 2px;
  color: var(--app-text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.app-export-badge,
.app-export-status {
  display: inline-flex;
  min-height: 27px;
  flex: 0 0 auto;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--export-accent-border);
  border-radius: 5px;
  background: var(--export-accent-soft);
  color: var(--export-accent-text);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.app-export-badge--warning,
.app-export-status[data-status='queued'],
.app-export-status[data-status='running'] {
  border-color: var(--export-warning-border);
  background: var(--export-warning-soft);
  color: var(--export-warning-text);
}

.app-export-status[data-status='error'] {
  border-color: var(--export-danger-border);
  background: var(--export-danger-soft);
  color: var(--export-danger-text);
}

.app-export-status[data-status='cancelled'] {
  border-color: var(--app-border);
  background: var(--app-surface-muted);
  color: var(--app-text-secondary);
}

.app-export-format-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.app-export-format-option {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-content: center;
  align-items: center;
  gap: 1px 8px;
  padding: 8px 9px 8px 11px;
  border: 1px solid var(--app-border);
  border-radius: 6px;
  background: var(--app-surface-bg);
  color: var(--app-text-primary);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.app-export-format-option:hover {
  background: var(--app-neutral-btn-hover);
}

.app-export-format-option:active {
  transform: scale(0.99);
}

.app-export-format-option.is-active,
.app-export-format-option.is-active:hover {
  border-color: var(--export-accent-border);
  background: var(--export-accent-soft);
}

.app-export-format-option__code {
  min-width: 0;
  color: var(--app-text-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.app-export-format-option.is-active .app-export-format-option__code {
  color: var(--export-accent-text);
}

.app-export-format-option__meta {
  grid-column: 1;
  overflow: hidden;
  color: var(--app-text-muted);
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-export-radio-check {
  display: grid;
  width: 18px;
  height: 18px;
  grid-column: 2;
  grid-row: 1 / span 2;
  place-items: center;
  border: 1px solid var(--app-border);
  border-radius: 50%;
  color: transparent;
}

.app-export-radio-check svg {
  width: 12px;
  height: 12px;
}

.app-export-format-option.is-active .app-export-radio-check {
  border-color: var(--app-accent);
  background: var(--app-accent);
  color: #fff;
}

.app-export-field {
  padding: 11px 0 0;
  border-top: 1px solid var(--app-border);
}

.app-export-panel__header + .app-export-field,
.app-export-panel__header + .app-export-format-grid {
  padding-top: 0;
  border-top: 0;
}

.app-export-field + .app-export-field {
  margin-top: 11px;
}

.app-export-field__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.app-export-field__label h4,
.app-export-field__label > label {
  color: var(--app-text-primary);
  font-size: 12px;
  font-weight: 650;
}

.app-export-field__label > span {
  overflow: hidden;
  color: var(--app-text-muted);
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-export-field__label > .app-export-required {
  color: var(--export-warning-text);
  font-weight: 600;
}

.app-export-input,
.app-export-search input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--app-input-border);
  border-radius: 6px;
  outline: 0;
  background: var(--app-input-bg);
  color: var(--app-text-primary);
  font-size: 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.app-export-input:hover,
.app-export-search input:hover {
  background: var(--app-input-hover);
}

.app-export-input:focus,
.app-export-search input:focus {
  border-color: var(--app-accent);
  background: var(--app-input-bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent) 15%, transparent);
}

.app-export-search {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.app-export-search > svg {
  position: absolute;
  z-index: 1;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--app-text-muted);
  pointer-events: none;
}

.app-export-search input {
  padding-left: 34px;
}

.app-export-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.app-export-text-button {
  flex: 0 0 auto;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--export-accent-text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.app-export-text-button:hover {
  color: var(--app-accent-hover);
}

.app-export-secondary-button,
.app-export-primary-button,
.app-export-danger-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.app-export-secondary-button {
  border-color: var(--app-border);
  background: var(--app-neutral-btn-bg);
  color: var(--app-text-secondary);
}

.app-export-secondary-button:hover {
  background: var(--app-neutral-btn-hover);
  color: var(--app-text-primary);
}

.app-export-primary-button {
  min-width: 104px;
  border-color: var(--app-accent);
  background: var(--app-accent);
  color: #fff;
}

.app-export-primary-button:hover {
  border-color: var(--app-accent-hover);
  background: var(--app-accent-hover);
}

.app-export-danger-button {
  border-color: var(--export-danger-border);
  background: var(--export-danger-soft);
  color: var(--export-danger-text);
}

.app-export-secondary-button:disabled,
.app-export-primary-button:disabled,
.app-export-danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.app-export-icon-button:active,
.app-export-secondary-button:active,
.app-export-primary-button:active,
.app-export-danger-button:active {
  transform: translateY(1px);
}

.app-export-type-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--app-border);
}

.app-export-type-heading h4 {
  margin: 0;
  color: var(--app-text-primary);
  font-size: 12px;
  font-weight: 650;
}

.app-export-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.app-export-type-option {
  display: flex;
  min-width: 0;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid var(--app-border);
  border-radius: 6px;
  background: var(--app-surface-bg);
  color: var(--app-text-secondary);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.app-export-type-option:hover {
  background: var(--app-neutral-btn-hover);
}

.app-export-type-option.is-active,
.app-export-type-option.is-active:hover {
  border-color: var(--export-accent-border);
  background: var(--export-accent-soft);
  color: var(--export-accent-text);
}

.app-export-checkbox {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--app-border);
  border-radius: 4px;
  background: var(--app-surface-bg);
  color: transparent;
}

.app-export-checkbox svg,
.app-export-checkbox i {
  width: 12px;
  height: 12px;
  font-size: 9px;
}

.app-export-type-option.is-active .app-export-checkbox,
.app-export-contact.is-active .app-export-checkbox {
  border-color: var(--app-accent);
  background: var(--app-accent);
  color: #fff;
}

.app-export-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.app-export-choice {
  display: grid;
  min-width: 0;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: start;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--app-border);
  border-radius: 7px;
  background: var(--app-surface-bg);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.app-export-choice:hover {
  background: var(--app-neutral-btn-hover);
}

.app-export-choice.is-active {
  border-color: var(--export-accent-border);
  background: var(--export-accent-soft);
}

.app-export-choice__icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--app-border);
  border-radius: 6px;
  background: var(--app-surface-bg);
  color: var(--app-text-muted);
}

.app-export-choice.is-active .app-export-choice__icon {
  border-color: var(--export-accent-border);
  color: var(--export-accent-text);
}

.app-export-choice__icon svg {
  width: 17px;
  height: 17px;
}

.app-export-choice__copy {
  min-width: 0;
}

.app-export-choice__copy strong {
  display: block;
  color: var(--app-text-primary);
  font-size: 12px;
  font-weight: 650;
}

.app-export-choice__copy p {
  margin: 3px 0 0;
  color: var(--app-text-muted);
  font-size: 10px;
  line-height: 1.45;
}

.app-export-choice .app-export-radio-check {
  grid-column: 3;
  grid-row: 1;
}

.app-export-choice.is-active .app-export-radio-check {
  border-color: var(--app-accent);
  background: var(--app-accent);
  color: #fff;
}

.app-export-destination {
  display: grid;
  min-height: 58px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px dashed var(--export-warning-border);
  border-radius: 7px;
  background: var(--export-warning-soft);
  color: var(--export-warning-text);
}

.app-export-destination.has-value {
  grid-template-columns: 28px minmax(0, 1fr) auto 34px;
  border-style: solid;
  border-color: var(--export-accent-border);
  background: var(--export-accent-soft);
  color: var(--export-accent-text);
}

.app-export-destination > svg {
  width: 20px;
  height: 20px;
  justify-self: center;
}

.app-export-destination__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.app-export-destination__copy strong,
.app-export-destination__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-export-destination__copy strong {
  color: var(--app-text-primary);
  font-size: 12px;
  font-weight: 600;
}

.app-export-destination__copy small {
  color: var(--app-text-muted);
  font-size: 10px;
}

.app-export-load-state {
  min-height: 26px;
  padding: 7px 2px 5px;
  color: var(--app-text-muted);
  font-size: 11px;
}

.app-export-contact-list {
  min-height: 220px;
  flex: 1 1 auto;
  overflow-y: auto;
  border: 1px solid var(--app-border);
  border-radius: 7px;
  background: var(--app-surface-bg);
  scrollbar-color: var(--scrollbar-thumb) transparent;
  scrollbar-width: thin;
}

.app-export-contact {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 18px 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--app-border-subtle);
  background: var(--app-surface-bg);
  color: var(--app-text-primary);
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.app-export-contact:last-child {
  border-bottom: 0;
}

.app-export-contact:hover {
  background: var(--app-neutral-btn-hover);
}

.app-export-contact.is-active {
  background: var(--export-accent-soft);
}

.app-export-contact__avatar {
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--app-surface-muted);
}

.app-export-contact__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-export-contact__avatar > span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: var(--app-text-secondary);
  color: var(--app-surface-bg);
  font-size: 11px;
  font-weight: 700;
}

.app-export-contact__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.app-export-contact__copy strong,
.app-export-contact__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-export-contact__copy strong {
  color: var(--app-text-primary);
  font-size: 12px;
  font-weight: 600;
}

.app-export-contact__copy small {
  color: var(--app-text-muted);
  font-size: 10px;
}

.app-export-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 24px;
  color: var(--app-text-muted);
  font-size: 12px;
  text-align: center;
}

.app-export-task-id {
  max-width: 520px;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-export-task-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  border-top: 1px solid var(--app-border);
  border-bottom: 1px solid var(--app-border);
}

.app-export-task-stats > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
  border-right: 1px solid var(--app-border);
}

.app-export-task-stats > div:last-child {
  border-right: 0;
}

.app-export-task-stats span {
  overflow: hidden;
  color: var(--app-text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-export-task-stats strong {
  color: var(--app-text-primary);
  font-size: 17px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.app-export-progress-block + .app-export-progress-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--app-border);
}

.app-export-progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--app-text-secondary);
  font-size: 11px;
}

.app-export-progress-heading > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-export-progress-heading strong {
  color: var(--app-text-primary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.app-export-progress {
  position: relative;
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--app-surface-muted);
}

.app-export-progress > span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--app-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 260ms ease;
}

.app-export-progress > .app-export-progress__indeterminate {
  right: auto;
  width: 32%;
  transform: translateX(-110%);
  animation: app-export-progress-slide 1.2s ease-in-out infinite;
}

.app-export-progress-note {
  margin: 7px 0 0;
  color: var(--app-text-muted);
  font-size: 10px;
  line-height: 1.45;
}

@keyframes app-export-progress-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(420%); }
}

.app-export-result {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  margin-top: 14px;
  padding: 11px;
  border: 1px solid;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.app-export-result > svg {
  width: 18px;
  height: 18px;
}

.app-export-result--success {
  border-color: var(--export-accent-border);
  background: var(--export-accent-soft);
  color: var(--export-accent-text);
}

.app-export-result--error {
  grid-template-columns: 20px minmax(0, 1fr);
  border-color: var(--export-danger-border);
  background: var(--export-danger-soft);
  color: var(--export-danger-text);
}

.app-export-result--warning {
  grid-template-columns: 20px minmax(0, 1fr);
  border-color: var(--export-warning-border);
  background: var(--export-warning-soft);
  color: var(--export-warning-text);
}

.app-export-footer {
  display: flex;
  min-height: 66px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 18px;
  border-top: 1px solid var(--app-border);
  background: var(--app-surface-bg);
}

.app-export-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: var(--app-text-muted);
  font-size: 11px;
  line-height: 1.3;
}

.app-export-summary strong {
  color: var(--app-text-primary);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.app-export-summary__separator {
  width: 1px;
  height: 14px;
  flex: 0 0 auto;
  background: var(--app-border);
}

.app-export-summary__path {
  max-width: 260px;
  overflow: hidden;
  color: var(--export-accent-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-export-summary__path.is-missing {
  color: var(--export-warning-text);
}

.app-export-footer__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.app-export-embedded {
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-surface-soft);
}

.app-export-embedded .app-export-panel {
  padding: 16px;
}

html[data-theme='dark'] .app-export-modal,
html[data-theme='dark'] .app-export-embedded {
  --export-accent-soft: rgba(62, 181, 117, 0.14);
  --export-accent-border: rgba(82, 201, 136, 0.34);
  --export-accent-text: #7bd8a2;
  --export-warning-soft: rgba(214, 153, 30, 0.13);
  --export-warning-border: rgba(225, 170, 58, 0.32);
  --export-warning-text: #e9c46c;
  --export-danger-soft: rgba(218, 76, 67, 0.13);
  --export-danger-border: rgba(235, 103, 94, 0.32);
  --export-danger-text: #ff9189;
}

html[data-theme='dark'] .app-export-modal :is(input, select),
html[data-theme='dark'] .app-export-embedded :is(input, select) {
  color-scheme: dark;
}

@media (max-width: 980px) {
  .app-export-layout {
    display: block;
    overflow-y: auto;
  }

  .app-export-scope {
    min-height: 500px;
  }

  .app-export-contact-list {
    height: 330px;
    flex: 0 0 auto;
  }

  .app-export-settings {
    overflow: visible;
    border-top: 1px solid var(--app-border);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .app-export-backdrop {
    padding: 0;
  }

  .app-export-modal,
  .app-export-modal--compact,
  .app-export-modal--medium {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .app-export-header {
    min-height: 60px;
    padding: 10px 14px;
  }

  .app-export-header__icon {
    width: 36px;
    height: 36px;
  }

  .app-export-header p {
    display: none;
  }

  .app-export-scope,
  .app-export-panel {
    padding: 16px;
  }

  .app-export-settings--single {
    max-height: none;
  }

  .app-export-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .app-export-search {
    grid-column: 1 / -1;
  }

  .app-export-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-export-destination,
  .app-export-destination.has-value {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .app-export-destination.has-value .app-export-icon-button {
    grid-column: 3;
  }

  .app-export-destination.has-value .app-export-secondary-button {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }

  .app-export-footer {
    min-height: 70px;
    padding: 10px 12px;
  }

  .app-export-summary__path,
  .app-export-summary__separator:last-of-type {
    display: none;
  }
}

@media (max-width: 520px) {
  .app-export-format-grid,
  .app-export-choice-grid,
  .app-export-task-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-export-task-stats > div:nth-child(2n) {
    border-right: 0;
  }

  .app-export-footer__actions .app-export-secondary-button {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-export-modal *,
  .app-export-modal *::before,
  .app-export-modal *::after,
  .app-export-embedded *,
  .app-export-embedded *::before,
  .app-export-embedded *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
