/* The Store's own parts. Its shape (sides, grid, bottom box, Back) is side-screen.css. */
.store__nav {
  display: grid;
  align-content: start;
}

.store__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store__dots {
  margin-left: auto;
  display: flex;
  gap: 3px;
}

/* A color dot. Elite and Commander colors show their body inside a bright rim. */
.store__dot {
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
  border-radius: 50%;
  background: var(--body, var(--swatch));
  box-shadow:
    inset 0 0 0 2px var(--swatch),
    0 0 6px var(--swatch);
}

.store__tag {
  min-width: 3.25rem;
  text-align: right;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--accent);
}

.store__item[data-owned='true'] .store__tag {
  color: var(--ok);
}

/* ---- The right side: the look in motion, the box under it ---- */
.store__art {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6) var(--space-5);
}

/* The box sits in the flow here, under the stage, and holds one height. */
.store__art .store__panel {
  position: relative;
  inset: auto;
}

.store-stage {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--space-2);
}

.store-stage__tabs {
  display: flex;
  gap: var(--space-1);
}

.store-stage__tab {
  min-height: 2.25rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(5 7 11 / 0.7);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color var(--dur-quick) var(--ease-standard),
    border-color var(--dur-quick) var(--ease-standard);
}

.store-stage__tab:hover {
  color: var(--text);
}

.store-stage__tab[aria-pressed='true'] {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* The scene fills the view and never sizes it: a canvas sized by its own
   drawing grew each frame and spread over the tabs. */
.store-stage__view {
  position: relative;
  min-height: 0;
  display: grid;
  align-content: center;
  overflow: hidden;
}

.store-stage__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.store-stage__tabs {
  position: relative;
  z-index: 1;
}

.preview__canvas {
  display: block;
  width: 100%;
  height: 150px;
}

.preview__labels {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  text-align: center;
  font: var(--text-xs) / 1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: -1.1rem;
}

/* ---- The bottom box ---- */
.store__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.store__blurb {
  font-size: var(--text-sm);
  min-height: 2.6em;
}

/* What is in it: the same height for every pack, so the Buy buttons never move. */
.store__what {
  height: 7.25rem;
  display: grid;
  align-content: start;
  gap: var(--space-2);
  overflow: hidden;
}

.store__gives {
  margin: 0;
  padding: 0 0 0 var(--space-4);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-5);
  font-size: var(--text-sm);
}

.store__gives li::marker {
  color: var(--accent);
}

.store__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.store__chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.25rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
}

.store__chip:hover {
  border-color: var(--swatch);
}

.store__chip[aria-pressed='true'] {
  border-color: var(--swatch);
  box-shadow: 0 0 10px color-mix(in srgb, var(--swatch) 40%, transparent);
}

.store__chip-price {
  color: var(--text-dim);
  font-size: var(--text-xs);
}

.store__hint {
  font-size: var(--text-xs);
}

.store__checkout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.store__buy {
  min-height: 3rem;
  font-size: var(--text-md);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store__note {
  font-size: var(--text-xs);
  min-height: 1.5em;
}

/* The phone's way back to the packs; phone-store.css shows it. */
.store__to-list {
  display: none;
}
