/* aeo-audit: aeo-export. Export dropdown, locked items, copied toast (D-121). */

.aeo-export { position: relative; display: inline-block; }

/* Deferred dropdowns (scan-url result pane) render hidden until the ad-hoc
   scan reports its job id and page id. Needed because .aeo-export sets an
   explicit display, which would otherwise beat the [hidden] attribute. */
.aeo-export[hidden] { display: none; }

.aeo-export__btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1rem; border-radius: .5rem;
  border: 1px solid var(--clr-primary, #7934eb);
  background: transparent; color: var(--clr-primary, #7934eb);
  font-size: .875rem; font-weight: 500; cursor: pointer; line-height: 1.2;
}
.aeo-export__btn:hover { background: rgba(121, 52, 235, .08); }
.aeo-export__btn--icon { padding: .4rem; border-radius: .4rem; gap: 0; }

.aeo-export__menu {
  position: absolute; top: calc(100% + .35rem); right: 0; z-index: 60;
  min-width: 15rem; padding: .35rem;
  background: #fff; border: 1px solid #e5e7eb; border-radius: .6rem;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .12);
  color: #111827;
  display: none;
}
.aeo-export__menu.is-open { display: block; }
.dark .aeo-export__menu {
  background: rgb(39, 49, 66); border-color: rgb(55, 65, 81); color: #e5e7eb;
}

.aeo-export__item {
  display: flex; align-items: center; gap: .55rem; width: 100%;
  padding: .55rem .65rem; border: 0; border-radius: .4rem;
  background: transparent; color: inherit;
  font-size: .85rem; text-align: left; cursor: pointer;
}
.aeo-export__item:hover { background: rgba(121, 52, 235, .08); }
.aeo-export__item--locked { color: #9ca3af; cursor: pointer; }
.aeo-export__item--locked:hover { background: rgba(156, 163, 175, .12); }
.aeo-export__lock { margin-left: auto; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }

.aeo-export__backdrop { display: none; }

.aeo-export__toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  z-index: 200; padding: .6rem 1.1rem; border-radius: .5rem;
  background: #111827; color: #fff; font-size: .85rem;
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.aeo-export__toast.is-open { opacity: 1; }

/* Upgrade prompt. Only layout is set inline by export-dropdown.js; the palette
   lives here so the dialog reads correctly in dark mode too. */
.aeo-export__upgrade { background: #fff; color: #111827; }
.dark .aeo-export__upgrade { background: rgb(39, 49, 66); color: #e5e7eb; }
.aeo-export__upgrade-note { color: #6b7280; }
.dark .aeo-export__upgrade-note { color: #9ca3af; }

/* Narrow viewports: bottom sheet, so a menu inside a scrolling table cannot clip. */
@media (max-width: 640px) {
  .aeo-export__menu {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0;
    min-width: 0; border-radius: .9rem .9rem 0 0; padding: .5rem .5rem 1.25rem;
    box-shadow: 0 -8px 28px rgba(16, 24, 40, .18);
  }
  .aeo-export__item { padding: .85rem .75rem; font-size: .95rem; }
  .aeo-export__backdrop.is-open {
    display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aeo-export__toast { transition: none; }
}
