/* Kartu Ekspor Fireworks Generator (F3). Warna lewat token tema
   (themeContrast); Chromium 88: tanpa :has, nesting, color-mix, dvh. */

.fw-export .kit-card__body { display: flex; flex-direction: column; gap: 12px; }
.fw-export__panel { display: flex; flex-direction: column; gap: 10px; }
[hidden].fw-export__panel, [hidden].fw-give__count, [hidden].fw-give__star { display: none; }
/* Segmented & kisi harus muat di kartu sempit: bungkus, jangan meluber. */
.fw-export .kit-seg { flex-wrap: wrap; }
.fw-export .kit-seg__btn { min-width: 72px; }
.fw-export__summary { margin: 0; font-size: 12px; color: var(--text-secondary); }
.fw-export__label { margin: 4px 0 0; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.fw-export__send { display: flex; flex-wrap: wrap; gap: 8px; }
.fw-export__send .btn { flex-shrink: 0; }
.fw-export__quick { display: flex; flex-wrap: wrap; gap: 8px; }
.fw-export__quick .btn { flex-shrink: 0; }
.fw-export__notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.fw-export__notes .fw-note { flex-shrink: 0; }

.fw-note { margin: 0; font-size: 12px; color: var(--text-muted); }
.fw-note--warn { color: var(--text-primary); }

/* ── Wadah: kisi slot ── */
/* 9 kolom × 30px tidak selalu muat di kartu sempit (kolom kanan desktop,
   ponsel) — grid otomatis menyusutkan slotnya, tekan-seret tetap bekerja. */
.fw-chest__grid {
  --fw-slot: 30px;
  display: grid;
  grid-template-columns: repeat(var(--fw-cols, 9), minmax(0, var(--fw-slot)));
  gap: 4px;
  justify-content: center;
  max-width: 100%;
  padding: 10px;
  border: 1px solid var(--wb-rule);
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
}
.fw-chest__slot {
  position: relative;
  width: var(--fw-slot);
  height: var(--fw-slot);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wb-rule);
  border-radius: 3px;
  background: var(--bg-surface-2);
  cursor: pointer;
}
.fw-chest__slot.is-filled { border-color: var(--accent); }
.fw-chest__slot.is-selected { box-shadow: inset 0 0 0 2px var(--accent); }
.fw-chest__slot.is-lifted { opacity: 0.45; }
.fw-chest__slot.is-drop { border-style: dashed; border-width: 2px; }
.fw-chest__icon { display: flex; align-items: center; justify-content: center; line-height: 0; }
.fw-chest__count {
  position: absolute;
  right: 2px;
  bottom: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 1px 1px 0 rgb(0 0 0 / 0.6);
  pointer-events: none;
}

/* Hantu seret (chestDrag.js — ghostClass: fw-chest-ghost). */
.fw-chest-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 999;
  pointer-events: none;
  padding: 6px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.35);
}
.fw-chest-ghost__inner {
  display: flex;
  align-items: center;
  gap: 3px;
  line-height: 0;
}
.fw-chest-ghost__inner .fw-chest__count {
  position: static;
  text-shadow: none;
}

/* ── Panel slot terpilih ── */
.fw-slotpanel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--wb-rule);
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
}
.fw-slotpanel[hidden] { display: none; }
.fw-slotpanel__title { margin: 0; font-size: 12px; font-weight: 700; color: var(--text-primary); }
.fw-slotpanel__qtyrow { display: flex; align-items: center; gap: 6px; }
.fw-slotpanel__label { font-size: 12px; color: var(--text-secondary); }
.fw-slotpanel__qty { width: 64px; flex-shrink: 0; text-align: center; }
.fw-slotpanel__step { flex-shrink: 0; min-width: 34px; padding-left: 8px; padding-right: 8px; }
.fw-slotpanel__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fw-slotpanel__actions .btn { flex-shrink: 0; }
.fw-slotpanel__danger { border-color: var(--border-strong, var(--wb-rule)); }
.fw-slotpanel__star { max-width: 220px; }
.fw-slotpanel .btn.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* ── Tab Java ── */
.fw-give__count { display: flex; align-items: center; gap: 10px; }
.fw-give__qty { width: 76px; flex-shrink: 0; text-align: center; }
.fw-give__star { display: flex; align-items: center; gap: 10px; }
.fw-give__star .select-input { max-width: 220px; }
.fw-give__cmd {
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 12px;
  min-height: 72px;
  word-break: break-all;
}

/* ── Tab Crafting ── */
.fw-craft { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fw-craft__step { flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; }
.fw-craft__title { margin: 0; font-size: 13px; font-weight: 700; color: var(--text-primary); }
.fw-craft__note { margin: 0; font-size: 12px; color: var(--text-muted); }
.fw-craft__grid {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 4px;
  width: max-content;
  padding: 8px;
  border: 1px solid var(--wb-rule);
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
}
.fw-craft__cell {
  position: relative;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wb-rule);
  border-radius: 3px;
  background: var(--bg-surface-2);
}
.fw-craft__cell.is-filled { border-color: var(--accent); }
.fw-craft__count {
  position: absolute;
  right: 1px;
  bottom: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 1px 1px 0 rgb(0 0 0 / 0.6);
  pointer-events: none;
}
.fw-craft__shop {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fw-craft__need {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--wb-rule);
  border-radius: 999px;
  background: var(--bg-inset);
  font-size: 12px;
  color: var(--text-primary);
}
