/* =============================================================================
   The Shop (pages/shop.html)
   Built on the site tokens in styles.css so light and dark both work. The one
   loud thing on the page is the hero's chat line: the member's own name drawn
   the way live chat draws it. Everything below it stays quiet.
   ============================================================================= */

/* ── Hero ────────────────────────────────────────────────────────────────── */

.shop-hero-inner { text-align: center; padding: 1rem 0 0.5rem; }
.shop-hero-inner h1 { font-size: 2.75rem; margin: 0 0 0.25rem; }
.shop-hero-sub { font-size: 1.125rem; margin: 0; opacity: 0.88; }

/* A chat row at display size, on the dark of the live page whatever the
   site theme, because that is where the name will actually be seen. */
.shop-chatline {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  max-width: 100%;
  margin: 1.75rem auto 1.25rem;
  padding: 1rem 1.5rem;
  background: #10151d;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-size: 1.6rem;
  line-height: 1.3;
}
.shop-chatline-name { font-weight: 600; }
.shop-chatline-name.is-bold { font-weight: 900; }
.shop-chatline-name.is-italic { font-style: italic; }
.shop-chatline-sigil { opacity: 0.9; }
/* Scoped by id on purpose. styles.css colours every span inside a page
   hero at (0,3,1) ([data-theme="dark"] .page-hero:is(...) span), which
   turned the name grey whatever hue was picked. An id outranks it without
   !important, and the hue shop.js writes inline still outranks the id. */
#shopChatline .shop-chatline-name {
  color: var(--gold-bright);
  transition: color 0.25s ease;
}
#shopChatline .shop-chatline-name span { color: inherit; }
#shopChatline .shop-chatline-msg { color: #d6dbe3; font-weight: 400; }

/* Same steady glow and breathing as live.css .cn-shimmer, so the preview
   matches what chat will draw. */
@keyframes shopEmberShimmer {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}
.shop-chatline-name.is-shimmer {
  text-shadow: 0 0 4px currentColor, 0 0 8px currentColor;
  animation: shopEmberShimmer 2.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .shop-chatline-name.is-shimmer { animation: none; }
}

.shop-purse {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.shop-purse-amount {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.shop-purse-link,
.shop-signin a {
  color: var(--cream);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.shop-signin { margin: 0; }

/* ── Layout ──────────────────────────────────────────────────────────────── */

.shop-container {
  max-width: 1100px;
  padding: 3rem 1rem;
  display: grid;
  gap: 3rem;
}

.shop-page .shop-heading {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 0.35rem;
}
.shop-heading i { margin-right: 0.5rem; }
.shop-page .shop-lede { color: var(--text-secondary); margin: 0 0 1.5rem; }

/* ── Cosmetics ───────────────────────────────────────────────────────────── */

.shop-cosmetics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.shop-cosmetic {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
}
[data-theme="dark"] .shop-cosmetic { border-color: var(--gray-700); }
.shop-cosmetic h3 { font-size: 1.125rem; margin: 1rem 0 0.25rem; }
.shop-page .shop-cosmetic p { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 1rem; flex: 1; }

/* Each card shows its own effect on a scrap of chat. */
.shop-cosmetic-sample {
  background: #10151d;
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: center;
  font-size: 1.25rem;
  color: var(--gold-bright);
  font-weight: 600;
}
.shop-cosmetic-sample span { color: inherit; }
.shop-cosmetic-sample .sample-color { color: oklch(72% 0.15 160); }
.sample-style { font-weight: 900; font-style: italic; }
.sample-shimmer { text-shadow: 0 0 4px currentColor, 0 0 8px currentColor; }

.shop-cosmetic-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.shop-page .shop-price {
  white-space: nowrap;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.shop-buy { padding: 0.55rem 1.1rem; }
.shop-buy:disabled { cursor: default; opacity: 1; }

.shop-cosmetic.is-owned { border-color: var(--success); }
.shop-cosmetic.is-owned .shop-price { visibility: hidden; }
.shop-cosmetic.is-owned .shop-buy {
  background: transparent;
  color: var(--success);
  border: 1px solid var(--success);
  box-shadow: none;
}

/* ── Studio ──────────────────────────────────────────────────────────────── */

.shop-studio { margin-top: 1.5rem; }
.shop-studio .card-body { padding: 1.5rem; }
.shop-studio-title { margin: 0 0 0.5rem; font-size: 1.25rem; }
.shop-studio-row {
  padding: 1rem 0;
  border-top: 1px solid var(--gray-200);
}
[data-theme="dark"] .shop-studio-row { border-top-color: var(--gray-700); }
.shop-studio-row > label:first-child,
.shop-studio-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.shop-page .shop-studio-note { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 0.6rem; max-width: 65ch; }
.shop-studio-row input[type="range"] { width: min(100%, 360px); vertical-align: middle; }
.shop-check { margin-right: 1.25rem; white-space: nowrap; }
.shop-studio-row input[type="range"] + .shop-check { margin-left: 1rem; }

.shop-sigils { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.shop-sigil {
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.6rem;
  font-size: 1.2rem;
  background: var(--surface-alt);
  color: var(--text-primary);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.shop-sigil--none { font-size: 0.9rem; }
.shop-sigil[aria-checked="true"] {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 2px var(--gold-bright);
}
.shop-sigil:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

#studioSave { margin-top: 0.5rem; }

/* ── Boosts and tips ─────────────────────────────────────────────────────── */

.shop-elsewhere {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.75rem;
  align-items: start;
  margin-top: 1.25rem;
}
.shop-elsewhere-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
}
[data-theme="dark"] .shop-elsewhere-item { border-color: var(--gray-700); }
.shop-elsewhere-item:hover,
.shop-elsewhere-item:focus-visible { border-color: var(--gold); }
.shop-elsewhere-item > i { color: var(--gold); font-size: 1.25rem; margin-top: 0.2rem; width: 1.5rem; text-align: center; }
.shop-elsewhere-text { flex: 1; display: grid; gap: 0.2rem; }
.shop-page .shop-elsewhere-text span { color: var(--text-muted); font-size: 0.925rem; }
.shop-page .shop-elsewhere-text .shop-elsewhere-price { font-weight: 700; color: var(--gold); font-size: 0.95rem; margin-top: 0.2rem; }

/* ── Phone ───────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .shop-hero-inner h1 { font-size: 2.1rem; }
  .shop-chatline { font-size: 1.2rem; padding: 0.8rem 1rem; }
  .shop-container { padding: 2rem 1rem; gap: 2.25rem; }
  .shop-elsewhere { grid-template-columns: 1fr; }
}
