/* GL404 Casual Builder — guide.css (Worker C: UX overhaul)
   Pemandu tutorial, bottom bar baru, Shop hub, Settings, panel Bangun
   berkategori. Dimuat setelah style.css / economy.css / social.css. */

/* ---------- menu bar lama disembunyikan ----------
   Elemen #menu-bar tetap ada di DOM (economy.js & wallet.js memeriksa
   keberadaannya), tapi tidak lagi menampilkan belasan tombol. Item menu
   kini dirute-kan lewat bottom bar + Shop hub (guide.js). */
#menu-bar { display: none !important; }

/* ---------- bottom bar baru: 5 ikon besar ala CoC ---------- */
#bottomnav {
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  gap: 6px;
}
#bottomnav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
  min-width: 0; flex: 1 1 0;
  min-height: 56px;
  padding: 6px 2px 5px;
  font-size: 11px;
  border-radius: 12px;
}
#bottomnav .nav-ic { font-size: 24px; line-height: 1.1; }
#bottomnav .nav-lb { font-size: 11px; line-height: 1.2; }

/* ---------- tombol wallet di HUD atas (dipindah dari #menu-bar) ---------- */
#hud .gl404-wallet-btn {
  font-size: 11px; font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  border-color: #e7d8b8;
  background: #fff;
}
#hud .gl404-wallet-btn.gl404-wallet-connected {
  background: #dcfce7; border-color: #22c55e; color: #166534;
}

/* ---------- pemandu tutorial ---------- */
#guide-layer {
  position: fixed; inset: 0;
  z-index: 35; /* di atas panel (31), di bawah toast (40) */
  pointer-events: none;
}
.guide-dim {
  position: absolute;
  display: none;
  background: rgba(0, 0, 0, 0.5);
}
.guide-ring {
  position: absolute;
  display: none;
  border: 3px solid #facc15;
  border-radius: 12px;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.35), 0 0 18px rgba(250, 204, 21, 0.85);
  animation: guide-pulse 1s ease-in-out infinite;
}
@keyframes guide-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.35), 0 0 10px rgba(250, 204, 21, 0.7); }
  50% { box-shadow: 0 0 0 7px rgba(250, 204, 21, 0.18), 0 0 22px rgba(250, 204, 21, 0.95); }
}
.guide-char {
  position: absolute;
  left: 10px; bottom: 76px;
  display: flex; flex-direction: column; align-items: flex-start;
  max-width: min(300px, 82vw);
}
.guide-sprite {
  width: 64px; height: 64px;
  object-fit: contain;
  margin-top: 2px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45));
}
.guide-bubble {
  pointer-events: auto;
  cursor: pointer;
  background: #fffbeb;
  border: 2px solid #b45309;
  border-radius: 14px;
  padding: 9px 11px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  position: relative;
}
.guide-bubble::after {
  content: '';
  position: absolute; left: 26px; bottom: -9px;
  width: 14px; height: 14px;
  background: #fffbeb;
  border-right: 2px solid #b45309;
  border-bottom: 2px solid #b45309;
  transform: rotate(45deg);
}
.guide-bubble-head {
  display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline;
  color: #92400e;
  margin-bottom: 3px;
}
.guide-bubble-head b { font-size: 13px; }
.guide-reward { font-size: 11px; color: #92400e; }
.guide-bubble-text { margin: 2px 0; }
.guide-bubble-hint { color: #44403c; font-size: 12.5px; margin-top: 3px; }
.guide-bubble-foot {
  margin-top: 6px; padding-top: 5px;
  border-top: 1px dashed #e7d8b8;
  font-size: 11px; color: #6b7280; font-style: italic;
}

/* ---------- panel Bangun berkategori ---------- */
.build-tabs {
  display: flex; gap: 6px;
  margin: 8px 0;
}
.build-tab {
  flex: 1 1 0; min-width: 0;
  padding: 10px 4px;
  font-size: 12.5px; font-weight: 700; color: #78350f;
  background: #fff; border: 1px solid #d6c9a8; border-radius: 10px;
  cursor: pointer; white-space: nowrap;
}
.build-tab.active {
  background: #f59e0b; color: #fff; border-color: #b45309;
}
.build-search {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #d6c9a8; border-radius: 10px;
  background: #fff;
  margin-bottom: 6px;
}
/* Tombol kartu Bangun lebih besar & mudah ditekan di HP. */
#panel-build .card .btn {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 14px;
}

/* ---------- Shop hub ---------- */
.shop-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  text-align: left;
  background: #fff; border: 1px solid #e7d8b8; border-radius: 10px;
  padding: 12px;
  margin: 8px 0;
  cursor: pointer;
  min-height: 58px;
  font-family: inherit; color: inherit;
}
.shop-row:active { background: #fef3c7; }
.shop-ic { font-size: 26px; line-height: 1; flex: none; }
.shop-tx { flex: 1; min-width: 0; }
.shop-tx b { font-size: 14px; }
.shop-tx small { display: block; color: #6b7280; font-size: 12px; margin-top: 1px; }
.shop-go { font-size: 24px; color: #b45309; flex: none; }

/* ---------- Settings ---------- */
.settings-grid {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 6px 0;
}
.settings-grid .btn {
  flex: 1 1 0; min-width: 100px;
  min-height: 44px;
  font-size: 13px;
  white-space: normal;
  line-height: 1.25;
  padding: 8px 6px;
}

@media (max-width: 480px) {
  .guide-sprite { width: 56px; height: 56px; }
  .guide-char { bottom: 72px; }
  .build-tab { font-size: 11.5px; padding: 9px 2px; }
}
