/**
 * ItemEditorPage.css
 * Tata letak halaman Item Editor.
 *
 * Berkas ini sengaja TIPIS. Seluruh kolom penyuntingnya adalah section
 * yang sama yang dipakai ItemConfigDialog, jadi gaya kolom, petak warna,
 * kartu trim, baris enchantment, dan sebagainya sudah datang dari
 * `ui/dialogs/ItemConfigDialog.css` — menyalinnya ke sini akan membuat
 * dua definisi yang bercabang begitu salah satu diubah.
 *
 * Yang didefinisikan di sini hanya yang memang milik halaman: kerangka
 * dua kolom, kartu `.ie-card`, pemilih wadah, ringkasan NBT, dan catatan
 * /give.
 *
 * Awalan `.ie-` mengikuti `.ee-` milik Entity Editor supaya kartu antar
 * tool terlihat sekeluarga tanpa saling menimpa.
 */

.item-editor {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px;
}

/* ── Header ──────────────────────────────────────────────────────────── */

.item-editor__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.item-editor__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.item-editor__subtitle {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
  max-width: 62ch;
}

.ie-chip {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  padding: 7px 14px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ie-chip:hover {
  background: var(--bg-surface-3);
}

.ie-chip--on {
  border-color: var(--tag-int, var(--border-strong));
  background: var(--bg-surface-3);
}

/* ── Kerangka isi ────────────────────────────────────────────────────── */

.item-editor__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.item-editor__main {
  min-width: 0;
}

.item-editor__side {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Kolom penyunting: dua kolom sejajar, lalu satu blok lebar penuh untuk
   Advanced NBT — meniru susunan dialog supaya pengguna yang berpindah
   dari Container Editor menemukan hal yang sama di tempat yang sama. */
.item-editor__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.item-editor__col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.item-editor__full {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Kartu ───────────────────────────────────────────────────────────── */

.ie-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg, 10px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ie-card__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Ringkasan NBT ───────────────────────────────────────────────────── */

.item-editor__summary-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.item-editor__summary-empty {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.item-editor__summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.item-editor__summary-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-subtle);
}

.item-editor__summary-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.item-editor__summary-key {
  color: var(--text-muted);
}

.item-editor__summary-value {
  color: var(--text-primary);
  text-align: right;
  word-break: break-word;
}

/* ── Pemilih wadah ───────────────────────────────────────────────────── */

.item-editor__wrappers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.item-editor__wrapper {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 8px);
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  padding: 8px 12px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.item-editor__wrapper:hover {
  background: var(--bg-surface-3);
}

.item-editor__wrapper--active {
  border-color: var(--tag-int, var(--border-strong));
  background: var(--bg-surface-3);
}

/* Titik kecil untuk wadah yang belum diverifikasi in-game. Sengaja tidak
   mencolok: statusnya catatan, bukan larangan. */
.item-editor__wrapper-mark {
  color: var(--tag-short, #c9a227);
  font-size: 15px;
  line-height: 1;
}

/* ── Catatan /give ───────────────────────────────────────────────────── */

.item-editor__give-note {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--tag-string, #6a9955);
  border-radius: var(--radius-md, 8px);
  padding: 12px 14px;
  font-size: 11.5px;
  line-height: 1.6;
}

.item-editor__give-note strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
}

.item-editor__give-note p {
  margin: 0;
  color: var(--text-muted);
}

.item-editor__give-note-how {
  margin-top: 7px !important;
}

/* ── Layar sempit ────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .item-editor__body {
    grid-template-columns: 1fr;
  }

  .item-editor__side {
    position: static;
  }
}

@media (max-width: 640px) {
  .item-editor__form {
    grid-template-columns: 1fr;
  }
}
