/* The Agora — barter of duplicate cosmetics. Piece/board art comes from armory.css (.am-piece, .am-bsw-*) so a cosmetic draws identically here and in the store. */

.agora-screen .sm { font-size: 0.82rem; }

.ag-hero {
  position: relative; overflow: hidden;
  padding: 40px 36px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
}
.ag-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 90% 50%, rgba(184,155,95,0.18), transparent 55%),
    radial-gradient(ellipse at 10% 80%, rgba(106,42,106,0.14), transparent 55%);
}
.ag-hero-inner { position: relative; z-index: 1; }
.ag-title { font-family: var(--font-display); font-size: 2.2rem; margin: 6px 0; font-weight: 500; }
.ag-lede { max-width: 600px; margin: 0; color: var(--ink-3); line-height: 1.5; }
.ag-stats {
  display: flex; gap: 40px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--divider);
}
.ag-stat-n { font-size: 1.5rem; color: var(--ink); font-weight: 600; line-height: 1.1; }

.ag-tabs { margin: 18px 0 16px; }
.ag-tab-count {
  display: inline-block; margin-left: 7px;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  background: var(--bronze-deep); color: var(--gold);
  border-radius: 100px; padding: 0 6px;
}
.am-tab.on .ag-tab-count { background: rgba(0,0,0,0.28); }

.ag-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ag-spacer { flex: 1; }
.ag-select, .ag-input {
  padding: 6px 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--ink);
  font-family: inherit; font-size: 0.85rem;
  max-width: 100%;
}

.ag-art { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ag-art .am-piece { width: 44px; height: 44px; }
.ag-art .am-piece .am-piece-gem { font-size: 1.1rem; }
.ag-art-lg .am-piece, .ag-art .am-piece.ag-art-lg { width: 58px; height: 58px; }
.ag-art-lg .am-piece-gem { font-size: 1.4rem; }
.ag-board-tile {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
  width: 44px; height: 44px; flex: none;
  border-radius: 6px; overflow: hidden; border: 1px solid var(--border);
}
.ag-board-tile.ag-art-lg { width: 58px; height: 58px; }

.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ag-item {
  display: flex; flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  overflow: hidden;
  transition: border-color 0.15s;
}
.ag-item:hover { border-color: var(--bronze); }
.ag-item.is-composing { border-color: var(--bronze); box-shadow: 0 0 0 2px rgba(184,137,58,0.2); }
.ag-item-art {
  aspect-ratio: 16/10;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at center, rgba(184,155,95,0.14), transparent 60%),
    var(--bg-2);
  border-bottom: 1px solid var(--divider);
}
.ag-item-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ag-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ag-item-titles { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ag-item-name {
  font-family: var(--font-display); font-size: 1.05rem;
  line-height: 1.25; word-break: break-word; color: var(--ink);
}
.ag-player {
  background: none; border: 0; padding: 0;
  font: inherit; font-size: inherit;
  color: var(--bronze-2); cursor: pointer;
}
.ag-player:hover { color: var(--gold); text-decoration: underline; }
.ag-pill-wait {
  flex: none;
  font-size: 0.7rem; font-weight: 600;
  padding: 2px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--lapis) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--lapis) 45%, transparent);
  color: var(--lapis-2);
}
.ag-note { color: var(--ink-3); font-size: 0.84rem; font-style: italic; line-height: 1.4; }
.ag-item-meta { min-height: 1.1em; }
/* The only number on a card: the Armory price as a rarity reference. Muted+mono so it never reads as a sale price — barter only, nothing is for sale. */
.ag-ref { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-3); cursor: help; }
.ag-item-foot {
  display: flex; justify-content: flex-end; align-items: center;
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--divider);
}
.ag-card-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ag-answered { color: var(--laurel-2); font-size: 0.82rem; font-weight: 500; }
/* Sent state spans the foot: pill left, Cancel right, one baseline. */
.ag-foot-sent { flex: 1; justify-content: space-between; align-items: center; flex-wrap: nowrap; }

.ag-composer {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--divider);
}
.ag-composer-label {
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
}
.ag-composer-btns { display: flex; gap: 6px; }

/* The gift's report. It REPLACES a toast, so it reads as a standing message with its own
   dismiss, not as something that will fade. */
.ag-gift-note {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-m);
  font-size: 0.85rem; line-height: 1.4;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--ink-2);
}
.ag-gift-note.is-ok {
  border-color: color-mix(in srgb, var(--laurel) 45%, transparent);
  background: color-mix(in srgb, var(--laurel) 12%, var(--bg-2));
  color: var(--laurel-2);
}
.ag-gift-note.is-err {
  border-color: color-mix(in srgb, var(--porphyry) 50%, transparent);
  background: color-mix(in srgb, var(--porphyry) 12%, var(--bg-2));
  color: var(--ink-2);
}
.ag-gift-note-ico { flex: none; line-height: 1.4; }
.ag-gift-note-txt { flex: 1; min-width: 0; }
.ag-gift-note-x {
  flex: none; padding: 0 2px; line-height: 1;
  background: none; border: 0; cursor: pointer;
  font-size: 1.05rem; color: inherit; opacity: 0.65;
}
.ag-gift-note-x:hover { opacity: 1; }

.ag-dupes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ag-dupe {
  display: flex; gap: 14px; padding: 16px; align-items: flex-start;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
}
.ag-dupe-art { position: relative; flex: none; }
.ag-dupe-qty {
  position: absolute; bottom: -4px; right: -6px;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  color: var(--lapis-2); background: var(--bg-2);
  border: 1px solid rgba(90,130,180,0.5);
  border-radius: 100px; padding: 1px 7px;
}
.ag-dupe-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ag-dupe-btns { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.ag-listed { color: var(--laurel-2); font-size: 0.82rem; font-weight: 500; }

.ag-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.ag-col { display: flex; flex-direction: column; gap: 10px; }
.ag-col-gap { height: 8px; }
.ag-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.ag-sec-head h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; }
.ag-empty-sm {
  padding: 16px; border: 1px dashed var(--border);
  border-radius: var(--radius-m); font-size: 0.88rem;
}
.ag-prop {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
}
.ag-prop.is-out { flex-direction: row; align-items: center; gap: 14px; }
.ag-prop-info { min-width: 0; flex: 1; }
.ag-prop-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 0.9rem; color: var(--ink-2); }
.ag-prop-when { margin-left: auto; }
.ag-prop-acts { display: flex; gap: 8px; }
.ag-swap-body { display: flex; align-items: center; gap: 12px; }
.ag-swap-side { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.ag-swap-name { color: var(--ink); font-size: 0.92rem; word-break: break-word; }
.ag-swap-arrow { font-size: 1.3rem; color: var(--bronze-2); flex: none; }
.ag-gift-arrow { color: var(--laurel-2); }
.ag-gift-side { color: var(--laurel-2); font-size: 0.85rem; font-style: italic; }

@media (max-width: 1024px) {
  .ag-cols { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .ag-hero { padding: 22px 18px; }
  .ag-title { font-size: 1.6rem; }
  .ag-stats { gap: 22px; }
  .ag-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .ag-dupes-grid { grid-template-columns: 1fr; }
}

/* Kind filter: pill strip on desktop, native select on phones (the strip/dropdown swap
   Tabs.html uses). Exactly one of the two is ever visible. */
.ag-filter-strip { display: contents; }
.ag-filter-dropdown { display: none; }
@media (max-width: 640px) {
  .ag-filters { flex-wrap: nowrap; gap: 8px; }
  .ag-filter-strip { display: none; }
  .ag-spacer { display: none; }
  .ag-filters > .ag-select { display: block; flex: 1 1 50%; width: auto; min-width: 0; }
}

