/* Panel 'shop' — NPC store. Owned by ui-npc.
   Built on the shared theme (style.css §7.5): .tabs/.tab, .list/.list-item, .slot[data-rarity], .gold-amount,
   .panel-inset, .list-empty. Only layout and shop-specific touches live here. */

.panel-shop { position: relative; display: flex; flex-direction: column; gap: 8px; color: var(--c-text); }

/* ---------------------------------------------------------------- header */
.panel-shop .shop-head { display: flex; align-items: center; gap: 10px; padding: 0 2px; }
.panel-shop .shop-emblem { width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: radial-gradient(circle at 45% 35%, #8a2a1c, #4a120b 70%);
  box-shadow: 0 0 0 2px var(--c-gold-dark), 0 0 0 3px var(--c-ink), 0 0 10px rgba(232, 196, 106, 0.25), inset 0 -4px 8px rgba(0, 0, 0, 0.45); }
.panel-shop .shop-emblem-img { width: 28px; height: 28px; filter: drop-shadow(0 1px 1px #000); }
.panel-shop .shop-titles { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.panel-shop .shop-name { font-size: 18px; font-weight: 600; line-height: 1.2; color: var(--c-gold);
  text-shadow: 0 1px 0 #000, 0 0 10px rgba(232, 196, 106, 0.3); }
.panel-shop .shop-npc { font-size: 12px; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- tabs (theme .tabs/.tab) */
.panel-shop .shop-tabs { margin-bottom: 0; }
.panel-shop .shop-tabs .tab { flex: 1 1 0; text-align: center; font-size: 14px; padding: 6px 12px; }

/* ---------------------------------------------------------------- panes */
.panel-shop .shop-pane { display: none; padding: 4px; }
.panel-shop[data-tab="buy"] .shop-pane-buy, .panel-shop[data-tab="sell"] .shop-pane-sell { display: block; }

.panel-shop .shop-buy { max-height: 344px; padding-right: 2px; }
.panel-shop .shop-row { gap: 10px; padding: 4px 10px 4px 4px; min-height: 50px; outline: none; }
.panel-shop .shop-row:nth-child(even) { background: rgba(0, 0, 0, 0.16); }
.panel-shop .shop-row:hover, .panel-shop .shop-row:focus-visible { background: linear-gradient(90deg, rgba(232, 196, 106, 0.14), rgba(232, 196, 106, 0.03)); border-color: rgba(232, 196, 106, 0.35); }
.panel-shop .shop-row:active { transform: translateY(1px); }
.panel-shop .shop-icon { --slot: 42px; }
.panel-shop .shop-icon .shop-icon-img { width: 36px; height: 36px; }
.panel-shop .shop-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.panel-shop .shop-iname { font-size: 14.5px; font-weight: 500; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 0 #000; }
.panel-shop .shop-row.is-poor .shop-iname { opacity: 0.72; }
.panel-shop .shop-meta { display: flex; flex-wrap: wrap; gap: 3px 6px; font-size: 11.5px; line-height: 1.25; color: var(--c-muted); }
.panel-shop .shop-type { color: #bfae90; }
.panel-shop .shop-req { padding: 0 5px; border-radius: 2px; color: #cfe8bf; background: rgba(95, 191, 143, 0.12); }
.panel-shop .shop-req.is-bad { color: #ffd9d3; background: rgba(179, 38, 30, 0.55); font-weight: 500; }
.panel-shop .shop-stack { color: #8f8069; }
.panel-shop .shop-price { flex: none; min-width: 78px; display: flex; justify-content: flex-end; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.panel-shop .shop-price.is-bad .gold-amount { color: var(--c-bad); }
.panel-shop .shop-empty { padding: 30px 8px; }

/* ---------------------------------------------------------------- sell */
.panel-shop .shop-sell-hint { font-size: 12px; color: var(--c-muted); padding: 2px 4px 8px; text-align: center; }
.panel-shop .shop-sell-grid { grid-template-columns: repeat(8, var(--slot)); --slot: 40px; justify-content: center; }
.panel-shop .shop-sslot.empty, .panel-shop .shop-sslot.is-empty { cursor: default; opacity: 0.55; }
.panel-shop .shop-sslot.is-empty:hover { border-color: #5c3e23; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.85), inset 0 2px 7px rgba(0, 0, 0, 0.85); }
.panel-shop .shop-sicon { width: 34px; height: 34px; }
.panel-shop .shop-sell-total { text-align: center; font-size: 12px; padding: 8px 4px 2px; }

/* ---------------------------------------------------------------- footer */
.panel-shop .shop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; }
.panel-shop .shop-gold { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 3px;
  background: rgba(0, 0, 0, 0.4); border: 1px solid var(--c-gold-dark); box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.7); }
.panel-shop .shop-gold-label { font-size: 12px; color: var(--c-muted); }
.panel-shop .shop-gold-num { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.panel-shop .shop-gold-word { font-size: 12px; color: var(--c-muted); }
.panel-shop .shop-gold.is-flash { animation: shop-flash 0.7s ease-out; }
@keyframes shop-flash { 0% { box-shadow: 0 0 0 0 rgba(255, 215, 106, 0.9), inset 0 0 12px rgba(255, 215, 106, 0.6); } 100% { box-shadow: 0 0 0 10px rgba(255, 215, 106, 0), inset 0 1px 4px rgba(0, 0, 0, 0.7); } }
.panel-shop .shop-foot-hint { font-size: 11.5px; }

/* ---------------------------------------------------------------- drag & drop (ui.js marks the target .drop-ok / .drop-bad) */
.panel-shop .shop-drop { position: absolute; inset: -4px; z-index: 4; display: none; align-items: center; justify-content: center; border-radius: 3px;
  pointer-events: none; background: rgba(20, 12, 7, 0.78); border: 2px dashed var(--c-good); }
.panel-shop .shop-drop span { font-size: 17px; font-weight: 600; color: var(--c-gold-light); text-shadow: var(--text-outline); }
.panel-shop.drop-ok .shop-drop { display: flex; }
.panel-shop.drop-bad { box-shadow: 0 0 0 2px rgba(255, 107, 91, 0.55); border-radius: 3px; }
