/* Playoff 2.5D avatar — Reel app extensions
 * ───────────────────────────────────────────────────────────────────────────
 * Adds three things on top of the canonical avatar-flourishes.css without
 * touching that load-bearing file:
 *
 *   1. .pa-name-strip       Optional bottom-of-card name label, since
 *                           most players don't recognize a takahē / esky /
 *                           pademelon from silhouette alone.
 *   2. .pa-tile--pro        Gold outline + soft halo for Pro Supporter
 *                           accounts (web Stripe; TV is paid-upfront so
 *                           never sets this flag).
 *   3. Reel chrome reset    The card looks great on a paper background but
 *                           our app is dark; ensure the card doesn't fight
 *                           the surrounding ink-2 surfaces with a stray
 *                           outline.
 *
 * The hand-illustrated art and tier flourishes (halo / shimmer / orbital /
 * sparks) come from the canonical CSS — we only extend, never reimplement.
 */

/* ─── Name strip ─────────────────────────────────────────────────────────── */
/* Sits ABOVE the SVG noise/vignette pseudo-elements (z-index 4 puts it on top
   of .pa-tile::before [z:2] and ::after [z:3]). Stays under .pa-tier-badge. */
.pa-name-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 6px 5px;
  text-align: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pa-ink, #1A1C26);
  background: linear-gradient(to top, rgba(244, 241, 232, 0.95), rgba(244, 241, 232, 0.0));
  pointer-events: none;
  z-index: 4;
  /* Truncate long names rather than wrapping — keeps the card clean. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* On the warmer-paper tiers, blend the strip into their background gradient
   so the name reads but doesn't introduce a hard color seam. */
.pa-tier-legendary .pa-name-strip {
  background: linear-gradient(to top, rgba(244, 232, 216, 0.95), rgba(244, 232, 216, 0.0));
}
.pa-tier-mythic .pa-name-strip {
  background: linear-gradient(to top, rgba(232, 220, 244, 0.95), rgba(232, 220, 244, 0.0));
}

/* Shorter card art when the name strip is present so the species' silhouette
   doesn't get clipped. The canonical CSS sets .pa-art svg { width/height: 88% }
   centered in the card; we shift the whole thing up to clear the strip. */
.pa-tile--with-name .pa-art {
  transform: translateY(-6%);
}

/* ─── Pro Supporter outline ─────────────────────────────────────────────── */
/* Gold ring around the card + a soft amber glow. Subtle; the card chrome
   still does the heavy lifting — this just signals "this player paid". */
.pa-tile--pro {
  box-shadow:
    inset 0 0 0 2px #FFE14A,
    0 0 0 1px rgba(255, 225, 74, 0.25),
    0 6px 14px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 0 22px rgba(255, 225, 74, 0.18);
}
.pa-tile--pro:hover,
.pa-tile--pro:focus-visible {
  box-shadow:
    inset 0 0 0 2px #FFE14A,
    0 0 0 1px rgba(255, 225, 74, 0.4),
    0 14px 28px rgba(0, 0, 0, 0.45),
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 0 32px rgba(255, 225, 74, 0.32);
}

/* ─── Reel chrome reset ─────────────────────────────────────────────────── */
/* When a .pa-tile sits inside a parent that already gave it size + a click
   target (e.g. host sidebar's `.avatar.avatar--svg` wrapper), strip the parent
   wrapper's background, border, and padding so only the card chrome shows. */
.avatar.avatar--svg {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  overflow: visible;
}

/* ─── Picker grid (Reel-app-specific layout) ────────────────────────────── */
/* The new tile is square + self-labels, so we go back to a multi-column
   grid (the old single-column row layout existed because the previous flat
   tiles couldn't fit a name and stayed cramped). 2 cols on small phones,
   3 on wider screens — names are 10px caps inside the strip, readable down
   to ~110px tile width. */
.avatar-picker__grid--25d {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 380px) {
  .avatar-picker__grid--25d {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

/* The picker tile no longer needs row-style padding; the card brings its
   own. We keep the wrapper as the clickable / aria-disabled / selected
   target, but reset its visual chrome. */
.avatar-tile-25d {
  position: relative;
  display: block;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.avatar-tile-25d:active { transform: scale(0.96); }

/* Selected — sky-blue ring outside the card. */
.avatar-tile-25d--selected .pa-tile {
  box-shadow:
    inset 0 0 0 1px rgba(26, 28, 38, 0.10),
    0 0 0 3px var(--reel, #FF3D6B),
    0 14px 28px rgba(0, 0, 0, 0.45);
}

/* Taken — diagonal "TAKEN" stamp. Kept compatible with the old fallback. */
.avatar-tile-25d--taken { opacity: 0.5; cursor: not-allowed; }
.avatar-tile-25d--taken::after {
  content: "TAKEN";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #F4F1E8;
  background: rgba(0, 0, 0, 0.65);
  padding: 3px 8px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 5;
}
