/* Aura Studio — Accessory Background workspace */
.ab-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  padding: 24px;
  background: rgba(8, 9, 12, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ab-overlay.is-open { display: grid; place-items: center; animation: abFade 0.2s ease both; }
@keyframes abFade { from { opacity: 0; } to { opacity: 1; } }

.ab-panel {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(760px, 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 22px;
  color: var(--ink);
  background: rgba(18, 18, 20, 0.92);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 60px rgba(197, 160, 89, 0.08);
}
.ab-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.ab-panel__title { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 800; }
.ab-panel__sub { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.ab-panel__close {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--ink);
  font-size: 23px; cursor: pointer;
}
.ab-panel__close:hover { border-color: var(--brand-2); color: var(--brand-2); }
.ab-panel__body { overflow: auto; padding: 24px; }
.ab-layout { display: grid; grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr); gap: 20px; direction: ltr; }
.ab-card { direction: rtl; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,0.025); padding: 20px; }
.ab-card--preview { min-height: 500px; display: grid; place-items: center; text-align: center; }
.ab-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.ab-card__title { margin: 0; font-size: 16px; font-weight: 800; }
.ab-count { color: var(--brand-2); font-size: 12px; }
.ab-category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 22px; }
.ab-category {
  min-width: 0; aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  padding: 8px; border: 1px solid var(--line); border-radius: 50%;
  background: rgba(255,255,255,0.025); color: var(--ink); cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.ab-category:hover, .ab-category.is-active { border-color: var(--brand-2); background: rgba(197,160,89,0.12); transform: translateY(-2px); }
.ab-category__icon { font-size: 24px; line-height: 1; }
.ab-category__label { font-size: 10px; line-height: 1.2; text-align: center; }
.ab-files { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; max-height: 190px; overflow: auto; margin-bottom: 18px; }
.ab-empty { grid-column: 1 / -1; min-height: 120px; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; }
.ab-thumb { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #0d0d10; }
.ab-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.ab-thumb__remove { position: absolute; top: 5px; inset-inline-end: 5px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(217,83,79,0.9); color: #fff; cursor: pointer; }
.ab-background { padding: 14px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.025); }
.ab-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.ab-select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #111216; color: var(--ink); font: inherit; }
.ab-action { width: 100%; padding: 12px 16px; border: 0; border-radius: 11px; background: linear-gradient(135deg, #b08d45, #e7c878); color: #201708; font: inherit; font-weight: 800; cursor: pointer; }
.ab-action:disabled { opacity: 0.45; cursor: not-allowed; }
.ab-cost { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 12px; }
.ab-cost strong { color: var(--brand-2); }
.ab-preview__icon { margin-bottom: 12px; font-size: 48px; opacity: 0.65; }
.ab-preview__title { margin: 0 0 6px; font-size: 17px; }
.ab-preview__text { max-width: 300px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.ab-status { margin-top: 14px; color: var(--brand-2); font-size: 12px; }
.ab-status[hidden] { display: none; }
.ab-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 420px; margin: 18px auto 0; }
.ab-results[hidden] { display: none; }
.ab-result { display: block; overflow: hidden; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; background: #0d0d10; }
.ab-result img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 0.2s ease; }
.ab-result:hover img { transform: scale(1.04); }
.ab-finish {
  position: absolute;
  left: 22px;
  bottom: 20px;
  z-index: 4;
  padding: 10px 24px;
  border: 1px solid rgba(197, 160, 89, 0.55);
  border-radius: 11px;
  background: rgba(18, 18, 20, 0.86);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.ab-finish:hover { background: #C5A059; color: #201708; }
.ab-finish[hidden] { display: none; }

@media (max-width: 760px) {
  .ab-overlay { padding: 10px; }
  .ab-panel { max-height: 100%; }
  .ab-panel__body { padding: 14px; }
  .ab-layout { grid-template-columns: 1fr; }
  .ab-card--preview { min-height: 240px; }
  .ab-category-grid { gap: 6px; }
  .ab-category__label { font-size: 9px; }
}
