/* ── Unified game card ─────────────────────────────────────────────────────
   Single source of truth for any card that shows: thumbnail | title + sub | badge.
   Use renderGameCard() in js/app/lib/card.js to generate the HTML.
   Mobile: thumbnail shrinks to 60x28, title stays bold, sub truncates.        */
.game-card {
  display: flex;
  flex-direction: column;
  background: var(--s1);
  border: 0;
  box-shadow: 0 0 0 1px var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.15s, background 0.15s, transform 0.05s;
}
.game-card-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px 8px 8px;
}
.game-card:hover { box-shadow: 0 0 0 1px var(--accent); text-decoration: none; }
.game-card:active { transform: translateY(1px); }
.game-card-thumb-wrap {
  position: relative;
  flex-shrink: 0;
  line-height: 0;
}
.game-card-thumb {
  width: 92px;
  height: 43px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--s2);
  flex-shrink: 0;
}
/* Store tag overlaid on the artwork's bottom-right corner. Frees the right
   column for the rating pill alone, so titles get more width on mobile. */
.game-card-store-tag {
  position: absolute;
  right: 4px;
  bottom: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.25;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
/* Desktop: give the report rows more presence with a bigger boxart and
   roomier padding. Steam header ratio (~2.14:1) is preserved. */
@media (min-width: 760px) {
  /* Padding goes on .game-card-row so the bottom-bar strip (a sibling) can
     still reach the card's bottom and side edges. See the matching note
     on the size-modifier rules below. */
  .game-card-row { gap: 18px; padding: 11px 18px 11px 11px; }
  .game-card-thumb { width: 138px; height: 64px; border-radius: 8px; }
  .game-card-title { font-size: 1.04rem; }
  .game-card-sub { font-size: 0.82rem; }
  .game-card-store-tag { font-size: 0.64rem; right: 6px; bottom: 6px; padding: 2px 7px; }
}
.game-card-thumb--missing {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.game-card-body { flex: 1; min-width: 0; }
.game-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-card-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
  font-family: var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.game-card-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--s2);
  color: var(--muted);
}
/* Not-yet-rated games: muted outlined pill so it reads as "no data" rather than
   a real tier. */
.game-card-badge--unrated {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border, #2a3340);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.game-card-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.game-card-store-pill {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  background: #1689d0;
  color: #fff;
}
.game-card-store-pill--steam { background: #1689d0; color: #fff; }
.game-card-store-pill--gog   { background: #7a3fcf; color: #fff; }
.game-card-store-pill--epic  { background: #555; color: #eee; }
.game-card-store-pill--non-steam { background: #444; color: #ddd; }
@media (max-width: 600px) {
  .game-card-pills { flex-direction: column; align-items: flex-end; gap: 4px; }
}
.game-card-source {
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0.7;
  padding-right: 10px;
}

/* Bottom-bar layout (data-card-layout="strip"): hide the right column,
   show a tier-colored bar spanning the full card width across the bottom,
   mirroring ProtonDB's card design. Title row gets the full body width.
   Toggle lives in options.html as "Rating layout". See #111. */
.game-card-strip { display: none; }
[data-card-layout="strip"] .game-card-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 26px;
  width: 100%;
  /* margin-top adds breathing space between the row text and the rating
     strip so the title/sub aren't sandwiched against the bar. */
  margin-top: 12px;
  padding: 0 14px;
  background: var(--s2);
  color: var(--muted);
  box-sizing: border-box;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}
[data-card-layout="strip"] .game-card-strip .game-card-store-pill {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
[data-card-layout="strip"] .game-card-strip[data-tier="platinum"] { background: linear-gradient(90deg, #b4c7dc, #cad8e7); color: #0a0c10; }
[data-card-layout="strip"] .game-card-strip[data-tier="gold"]     { background: linear-gradient(90deg, #cfb274, #e4cb8f); color: #0a0c10; }
[data-card-layout="strip"] .game-card-strip[data-tier="silver"]   { background: linear-gradient(90deg, #a8b1bd, #c5cdd7); color: #0a0c10; }
[data-card-layout="strip"] .game-card-strip[data-tier="bronze"]   { background: linear-gradient(90deg, #b07d4f, #cf9e6f); color: #0a0c10; }
[data-card-layout="strip"] .game-card-strip[data-tier="borked"]   { background: linear-gradient(90deg, #884444, #b25555); color: #fff; }
[data-card-layout="strip"] .game-card-strip-tier {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}
[data-card-layout="strip"] .game-card-strip .game-card-store-pill {
  /* Knock the store pill darker so it reads as a chip on top of the
     tier-colored bar instead of competing with it. */
  background: rgba(0, 0, 0, 0.22) !important;
  color: inherit;
  font-size: 0.62rem;
  padding: 2px 8px;
}
[data-card-layout="strip"] .game-card-right { display: none; }
.load-more-btn {
  display: block;
  margin: 12px auto 0;
  padding: 8px 24px;
  background: var(--s2);
  color: var(--muted);
  border: none;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
}
.load-more-btn:hover {
  background: var(--s3);
  color: var(--fg);
}
@media (max-width: 480px) {
  .game-card-thumb { width: 60px; height: 28px; }
  .game-card-title { font-size: 0.88rem; }
  .game-card-sub   { font-size: 0.72rem; }
}

/* Floating "Copied" tooltip for clipboard buttons */
.copy-tooltip {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30,30,46,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  color: #eee;
  font-size: 0.72rem;
  padding: 2px 7px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s;
  z-index: 10;
}
.copy-tooltip--show { opacity: 1; }

/* ---- Toasts (js/lib/toast.js) -------------------------------------------
   Transient action feedback. Stacks bottom-right, slides in/out, auto-dismiss.
   Sits above modals/overlays. */
.pp-toast-container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.pp-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px 11px 14px;
  border-radius: 8px;
  background: var(--s2);
  color: var(--fg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  font-size: 0.88rem;
  line-height: 1.4;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.pp-toast--in { opacity: 1; transform: translateY(0); }
.pp-toast--out { opacity: 0; transform: translateY(8px); }
.pp-toast--success { border-left-color: var(--green); }
.pp-toast--error { border-left-color: var(--red); }
.pp-toast--info { border-left-color: var(--accent); }
.pp-toast-msg { flex: 1 1 auto; min-width: 0; word-wrap: break-word; }
.pp-toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.pp-toast-close:hover { color: var(--fg); }
@media (max-width: 480px) {
  .pp-toast-container { right: 10px; left: 10px; bottom: 10px; max-width: none; }
}
