/**
 * artScene3d.css
 * Pratinjau 3D Art Editor: lapisan kanvas + langit, tombol navigasi di
 * atas kanvas, dan bilah kontrol di bawah panggung.
 *
 * ⚠️ Kanvas WebGL transparan; langit adalah latar CSS di belakangnya.
 * Latar malam berakhir di `--canvas-fog` supaya kabut penggambar (warna
 * tetap, sama dengan token itu) menyatu dengan langit, bukan membentuk halo.
 */

.ae-3d {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(118, 170, 235, 1) 0%, rgba(170, 206, 245, 1) 62%, rgba(214, 230, 246, 1) 100%);
}
.ae-3d[data-sky="night"] {
  background: linear-gradient(180deg, rgba(10, 14, 32, 1) 0%, rgba(14, 20, 42, 1) 55%, var(--canvas-fog) 100%);
}
.ae-3d[hidden], .ae-3d-slot[hidden], .ae-3d__overlay[hidden], .ae-3d__fallback[hidden], .ae-3d__nav[hidden] { display: none !important; }
.ae-preview__stage .ae-preview__overlay { z-index: 3; }

.ae-3d__canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.ae-3d__canvas:active { cursor: grabbing; }

.ae-3d__overlay {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--wb-panel-raised);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  color: var(--text-primary);
  pointer-events: none;
  white-space: nowrap;
}

.ae-3d__nav {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.ae-3d__btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--wb-rule);
  background: var(--wb-panel-raised);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.ae-3d__btn:hover { border-color: var(--border-strong); }
.ae-3d__btn.is-active { border-color: var(--accent); color: var(--accent); }
.ae-3d__btn:focus-visible { outline: 2px solid var(--focus-outline); outline-offset: 2px; }

.ae-3d__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: var(--wb-panel);
  color: var(--text-secondary);
  font-size: 13px;
}
.ae-3d__fallback p { margin: 0; max-width: 40ch; }

/* ── Bilah kontrol di bawah panggung ─────────────────────────────── */
.ae-3d-slot { display: block; }
.ae-3d-controls { display: flex; flex-direction: column; gap: 10px; }
.ae-3d-controls__row { display: flex; flex-wrap: wrap; gap: 6px; }
.ae-3d-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--wb-rule);
  background: var(--bg-inset);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ae-3d-chip:hover { border-color: var(--border-strong); }
.ae-3d-chip.is-active { border-color: var(--accent); background: var(--bg-active); color: var(--accent); }
.ae-3d-chip:focus-visible, .ae-3d-slice__step:focus-visible { outline: 2px solid var(--focus-outline); outline-offset: 2px; }

.ae-3d-slice { display: flex; align-items: center; gap: 8px; }
.ae-3d-slice__label { font-size: 12px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.ae-3d-slice__range { flex: 1 1 auto; min-width: 0; }
.ae-3d-slice__step {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--wb-rule);
  background: var(--bg-inset);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.ae-3d-slice__step:disabled { opacity: 0.4; cursor: default; }
.ae-3d-slice__value { min-width: 84px; white-space: nowrap; text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

.ae-3d-controls__info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 22px; font-size: 13px; }
.ae-3d__picked { font-weight: 700; }

@media (max-width: 680px) {
  .ae-3d-slice__label { display: none; }
  .ae-3d-chip { padding: 6px 10px; font-size: 12px; gap: 4px; }
  .ae-3d-controls__row { gap: 5px; }
}
