/* Forum shop pages (/forum, /forum/<slug>), also embedded in Joomla
   articles. Loaded after base.css, which supplies the tokens, .card, .muted,
   .slot, .phrase and .eyebrow; nothing from style.css is needed here. The
   rules are explained at the top of base.css. */

/* ---------------------------------------------------------------- forum
   Public shop pages (/forum/<slug>), also embedded in the Joomla articles.
   Palette is the app's own — no new variables. */

/* Embed variant: no header band, transparent so the Joomla page shows
   through, and no page padding since the article already has its own. */
body.forum-embed { background: transparent; }
body.forum-embed main { padding: 0; max-width: none; }
body.forum-embed .card { margin-bottom: 0.9rem; }

/* In embed mode the page background is transparent, so these cards land on
   the Joomla article's white. Shading the two header blocks — full strength
   on the title, fainter on the picker — steps the eye down to the white
   item rows instead of one flat wall. */
.forum-head { text-align: center;
  background: linear-gradient(#eaf1dc, var(--card));
  border-top: 3px solid var(--accent); }
.forum-head h1 { margin-bottom: 0.3rem; color: var(--accent); }
.forum-picker { background: linear-gradient(#f5f8ee, var(--card)); }
.forum-prompt { font-size: 1.05rem; margin: 0 0 0.7rem; text-align: center; }

/* Shop picker — the whole page on first load */
.forum-shops { display: flex; gap: 0.7rem; flex-wrap: wrap;
  justify-content: center; }
.forum-shop-btn {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 0.7rem 1.2rem; min-width: 160px;
  background: var(--card); color: var(--accent);
  border: 2px solid var(--line); border-radius: 8px;
  text-decoration: none; cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
}
/* These are <button>s, so the global button:hover repaints them
   --accent-dark unless we say otherwise — dark green label on dark green
   fill. Both background and colour have to be restated on every state. */
.forum-shop-btn:hover {
  transform: translateY(-1px); border-color: var(--accent);
  background: var(--card); color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.forum-shop-btn.active,
.forum-shop-btn.active:hover { background: var(--accent);
  color: var(--header-text); border-color: var(--accent); }
.forum-shop-name { font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.06em; text-transform: uppercase; }
.forum-shop-count { font-size: 0.85rem; opacity: 0.85; margin-top: 0.15rem; }

/* A stall's items. Rendered visible; the switcher hides them once JS runs,
   so a no-JS reader still sees the whole forum. */
.forum.js .forum-stall { display: none; }
.forum.js .forum-stall.open { display: block; }
.forum-stall h2 { letter-spacing: 0.06em; text-transform: uppercase;
  margin-top: 0; }

.forum-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem 0; border-top: 1px solid var(--line);
}
.forum-item:last-child { padding-bottom: 0; }
.forum-item-icon { width: 78px; height: 78px; flex: none;
  object-fit: contain; background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; }
.forum-item-icon-card { height: 112px; }
.forum-item-noicon { display: flex; align-items: center;
  justify-content: center; color: var(--muted); }
.forum-item-body { flex: 1; min-width: 0; }
.forum-item-name { display: block; font-size: 1.05rem; }
/* Inherits the .slot pill from the character sheet; this only gives it the
   bit of extra presence the roomier Forum rows can carry. */
.forum-item-slot { display: inline-block; margin-top: 0.25rem;
  font-size: 0.8rem; letter-spacing: 0.04em;
  border: 1px solid var(--line); padding: 0.15rem 0.55rem;
  border-radius: 999px; }
.forum-item-desc { margin: 0.4rem 0 0; line-height: 1.55; }
/* Colour and italics come from the shared .phrase rule; this is spacing only. */
.forum-item-phrase { margin: 0.35rem 0 0; }
.forum-item-unlock { margin: 0.35rem 0 0; color: var(--accent);
  font-weight: 700; }

/* Cost block — deliberately loud, so nobody mistakes the numeral for a
   quantity or a rank. */
.forum-cost {
  flex: none; display: flex; flex-direction: column; align-items: center;
  gap: 0.15rem; padding: 0.45rem 0.9rem;
  background: var(--bg); border: 1px solid var(--lime); border-radius: 8px;
}
.forum-cost-label { color: var(--accent); }
.forum-cost-value { font-family: var(--code-font); font-size: 1.35rem;
  font-weight: 700; color: var(--ink); line-height: 1.1; }
.forum-cost-coin { display: block; width: 30px; height: 30px;
  object-fit: contain; }

@media (max-width: 560px) {
  .forum-item { flex-wrap: wrap; }
  .forum-item-body { flex-basis: 100%; order: 3; }
  .forum-cost { margin-left: auto; }
  .forum-shop-btn { flex: 1 1 100%; min-width: 0; }
}

