/* ==========================================================================
   export.css — Export modal (resolution/format/quality picker, progress,
   and download step). Built and appended to <body> by ExportManager.js.
   ========================================================================== */

.export-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.export-modal[hidden] {
  display: none;
}

.export-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 10, 0.6);
  backdrop-filter: blur(2px);
}

.export-modal__dialog {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated), 0 0 0 1px var(--border-subtle);
}

@media (prefers-reduced-motion: no-preference) {
  .export-modal__dialog {
    animation: export-modal-in 0.15s ease;
  }
}
@keyframes export-modal-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.export-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.export-modal__header h2 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.export-modal__body {
  padding: 16px;
}

.export-field {
  margin-bottom: 18px;
}
.export-field h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.export-option-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
}

.export-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}
.export-option:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.export-option.is-active {
  background: var(--accent-primary-soft);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}
.export-option__title {
  font-size: 12.5px;
  font-weight: 600;
}
.export-option__sub {
  font-size: 10.5px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.export-modal__hint {
  font-size: 11.5px;
  color: var(--text-tertiary);
  line-height: 1.5;
  margin: 4px 0 16px;
}

.export-modal__notice {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 8px 0 4px;
}

.export-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.export-modal__actions .btn {
  text-decoration: none;
}

/* ---- Progress state ---------------------------------------------------- */
.export-progress__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-elevated-2);
  overflow: hidden;
  margin-bottom: 8px;
}
.export-progress__fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 999px;
  transition: width 0.2s linear;
}
.export-progress__meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* ---- Done state ---------------------------------------------------------- */
.export-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 12px 0 4px;
}
.export-done__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary-soft);
  color: var(--accent-success);
}
.export-done p {
  font-size: 12.5px;
  color: var(--text-secondary);
}
.export-done .export-modal__actions {
  justify-content: center;
  margin-top: 4px;
}
