/* ==========================================================================
   armorTrims.css — Armor Trims Viewer (Knowledges → K1).
   Panggung 3D selalu gelap di semua tema (seperti pratinjau trim Item
   Editor), jadi teks di atasnya memakai token kanvas.
   ========================================================================== */

/* HP: panggung dulu, lalu slot — urutan eksplisit (kit-col = contents). */
.kt-trims__stage { order: 1; }
.kt-trims__slots { order: 2; }

/* ── Panggung ─────────────────────────────────────────────────────────── */
.kt-stage {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(45, 212, 191, 0.14), transparent 58%),
    radial-gradient(ellipse at 84% 88%, rgba(180, 140, 242, 0.1), transparent 52%),
    var(--canvas-bg);
}

.kt-stage__canvas {
  display: block;
  width: 100%;
  height: clamp(320px, 58vh, 560px);
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.kt-stage__canvas:active { cursor: grabbing; }

.kt-stage__status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(var(--canvas-star-rgb), 0.92);
  background: rgba(4, 6, 11, 0.55);
  pointer-events: none;
}

.kt-stage__status.is-busy {
  inset: 10px auto auto 10px;
  padding: 4px 9px;
  font-size: 10px;
  font-family: var(--font-mono);
  border-radius: 999px;
  background: rgba(4, 6, 11, 0.7);
}

.kt-stage__status[hidden] { display: none; }
/* Gagal memuat → status bisa diketuk untuk mencoba lagi (TrimStage). */
.kt-stage__status.is-error { pointer-events: auto; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.kt-stage__hint {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: rgba(var(--canvas-star-rgb), 0.62);
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.kt-stage__views {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(4, 6, 11, 0.55);
  border: 1px solid rgba(var(--canvas-star-rgb), 0.12);
}

.kt-stage__view {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(var(--canvas-star-rgb), 0.72);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.kt-stage__view:hover { color: rgba(var(--canvas-star-rgb), 1); }
.kt-stage__view.is-active { color: rgba(var(--canvas-star-rgb), 1); background: rgba(var(--canvas-star-rgb), 0.14); }
/* Layar sempit: pilihan sudut rata kiri dan berhenti sebelum kolom tombol
   kanan (36px + 10px) — kalau ditengahkan, "Belakang" tertutup tombol putar. */
@media (max-width: 480px) {
  .kt-stage__views { left: 10px; right: 56px; transform: none; justify-content: flex-start; width: max-content; max-width: calc(100% - 66px); }
  .kt-stage__view { padding: 0 8px; font-size: 11px; flex: 0 1 auto; min-width: 0; }
}

.kt-stage__tools {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kt-stage__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(var(--canvas-star-rgb), 0.14);
  background: rgba(4, 6, 11, 0.55);
  color: rgba(var(--canvas-star-rgb), 0.8);
  cursor: pointer;
}

.kt-stage__btn:hover { color: rgba(var(--canvas-star-rgb), 1); }
.kt-stage__btn.is-active { color: var(--accent); border-color: var(--accent); }
.kt-stage__view:focus-visible, .kt-stage__btn:focus-visible { outline: 2px solid var(--focus-outline); outline-offset: 2px; }

.kt-summary {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

/* ── Karakter ─────────────────────────────────────────────────────────── */
.kt-model { display: flex; flex-direction: column; gap: 10px; }
.kt-model__custom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kt-model__custom[hidden] { display: none; }
.kt-model__name {
  flex: 1 1 140px;
  min-width: 0;
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kt-model__btn { display: inline-flex; align-items: center; gap: 6px; width: auto; min-height: 36px; padding: 0 12px; font-size: 12.5px; }

/* ── Samakan ──────────────────────────────────────────────────────────── */
.kt-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kt-links__label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-right: 2px; }

.kt-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface-2);
  border: 1px solid var(--wb-rule);
  border-radius: 999px;
  cursor: pointer;
}

.kt-link__icon { display: inline-flex; }
.kt-link:hover { border-color: var(--border-strong); color: var(--text-primary); }
.kt-link.is-active { color: var(--text-primary); border-color: var(--accent); background: var(--bg-active); }
.kt-link.is-active .kt-link__icon { color: var(--accent); }
.kt-link:focus-visible { outline: 2px solid var(--focus-outline); outline-offset: 2px; }
