/* The Item Shop (pages/shop.html). The name styles and themes themselves are in styles/stylesheet.css, since
   every page shows them. */

.shop-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: start; }
@media (max-width: 820px) {
  .shop-top { grid-template-columns: 1fr; }
}

.shop-wallet-row { display: flex; flex-wrap: wrap; gap: 16px 40px; }
.shop-wallet-label { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pencil); }
.shop-wallet-clicks { margin: 0; font-family: var(--font-marker); font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
/* Holds a line's height while it waits for the API. */
.shop-wallet-name { min-height: 2.6rem; margin: 0; display: flex; align-items: center; font-weight: 750; font-size: 1.5rem; }
.shop-wallet-note { margin: 14px 0 0; color: var(--ink-soft); }
.shop-how { font-size: .98rem; }

.shop-grid:empty { min-height: 340px; }

.shop-card .card-body { gap: 6px; }
.shop-card .card-body p { flex: 1; font-size: .95rem; }
.shop-card.is-on { box-shadow: 0 0 0 3px var(--highlight), var(--shadow-ink); }
.shop-card-art {
  display: grid;
  place-items: center;
  min-height: 116px;
  padding: 14px;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  overflow: hidden;
}
.shop-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.shop-card-buttons { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.shop-price { font-family: var(--font-marker); font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.tag-legendary { background: var(--ink); color: var(--gold); border-color: var(--ink); }

/* An item that has to be earned first: what it takes, and how far along you are */
.shop-need { display: grid; gap: 6px; padding: 8px 10px; border: 1.5px dashed var(--pencil); border-radius: 8px; font-size: .9rem; color: var(--ink-soft); }
.shop-need.is-done { border-style: solid; border-color: var(--green); }
.shop-need-bar { height: 8px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; }
.shop-need-bar > span { display: block; height: 100%; width: var(--done, 0%); background: var(--green); }

/* A name with one item on */
.shop-sample { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; font-size: 1.7rem; line-height: 1.4; }

/* A theme: its page, a couple of lines in its ink and a card on top */
.shop-swatch {
  position: relative;
  width: 100%;
  max-width: 200px;
  height: 88px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--sw-page);
  box-shadow: 2px 2px 0 var(--ink);
  overflow: hidden;
}
.shop-swatch-line { position: absolute; left: 12px; top: 16px; width: 60%; height: 6px; border-radius: 3px; background: var(--sw-ink); }
.shop-swatch-line.short { top: 30px; width: 38%; opacity: .7; }
.shop-swatch-card { position: absolute; right: 12px; bottom: 10px; width: 42%; height: 38px; border: 1.5px solid #1b1b1f; border-radius: 6px; background: #fffdf7; box-shadow: 2px 2px 0 var(--sw-ink); }

/* Previewing a theme: a bar along the bottom of the screen to stop it */
.shop-preview-bar {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 16px;
  translate: -50% 0;
  border: 2px solid #1b1b1f;
  border-radius: 999px;
  background: #fff1a1;
  color: #1b1b1f;
  font-weight: 700;
  box-shadow: 3px 3px 0 #1b1b1f;
}
.shop-preview-bar .btn { --btn-bg: #1b1b1f; --btn-fg: #fff; --btn-border: #1b1b1f; }
