/* Export waiting modal (admin/js/export-progress.js). Colours come from the admin theme variables,
   so the light and dark themes both work. */
.gx-export {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  direction: rtl;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.gx-export[hidden] { display: none; }
.gx-export.is-open { opacity: 1; }

.gx-export__box {
  box-sizing: border-box;
  width: min(460px, 100%);
  padding: 22px 24px 18px;
  border: 1px solid var(--hairline-color, #e8e8e8);
  border-radius: 12px;
  background: var(--body-bg, #fff);
  color: var(--body-fg, #333);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s ease;
}
.gx-export.is-open .gx-export__box { transform: none; }

.gx-export__title {
  margin: 0 0 6px;
  padding: 0;
  background: none;
  color: var(--body-fg, #333);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.6;
}
.gx-export__meta {
  margin: 0;
  padding: 0;
  color: var(--body-quiet-color, #666);
  font-size: 0.9rem;
}

.gx-export__bar {
  height: 10px;
  margin: 18px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--darkened-bg, #f0f0f0);
  box-shadow: inset 0 0 0 1px var(--hairline-color, #e8e8e8);
}
.gx-export__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--link-fg, #417690);
  transform: scaleX(0);
  transform-origin: right center; /* fills from the right (RTL) */
  transition: transform 0.3s linear;
}
.gx-export__fill.no-anim { transition: none; }
.gx-export.is-done .gx-export__fill { transition: transform 0.35s ease-out; }
.gx-export.is-slow .gx-export__fill { opacity: 0.55; }

.gx-export__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
}
.gx-export__pct { color: var(--body-quiet-color, #666); font-variant-numeric: tabular-nums; }
.gx-export__close {
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--link-fg, #417690);
  font-weight: 600;
}
.gx-export__close:focus-visible { outline: 2px solid var(--link-fg, #417690); outline-offset: 2px; }

.gx-export__status {
  margin: 12px 0 0;
  padding: 0;
  color: var(--body-quiet-color, #666);
  font-size: 0.85rem;
  line-height: 1.8;
}
.gx-export.is-slow .gx-export__status { color: var(--error-fg, #ba2121); }

@media (max-width: 480px) {
  .gx-export__box { padding: 18px 16px 14px; }
  .gx-export__title { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gx-export, .gx-export__box, .gx-export__fill { transition: none; }
}
