/* Collectible cards drawn from the card template (js/extras.js). Shared by
   the game and the collectibles editor. */
/* The collectible template: the card's own artwork (frame, picture, name
   panel) is one SVG filling the card; the series label and name are text
   over its panel, sized from the card's width so they scale with it. */
.tcard.tcard-t {
  position: relative;
  display: block;
  box-sizing: border-box;
  aspect-ratio: 193.54 / 409.4;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  container-type: inline-size;
}
.tcard-t .tcard-frame { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.tcard-t.is-diamond .tcard-frame { filter: drop-shadow(0 0 6px rgba(140, 200, 255, 0.5)); }
.tcard-t .tcard-series {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 62%;
  font-size: 5.4cqw;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.1;
  text-transform: uppercase;
  text-align: center;
  opacity: 1;
}
.tcard-t .tcard-name {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 68%;
  height: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5cqw;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-align: center;
}


.tcard-t .tcard-count {
  position: absolute;
  top: 6%;
  right: -4px;
  padding: 2px 7px;
  border-radius: 10px;
  background: #12301e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* A second line under the name, e.g. a golfer's years. */
.tcard-t .tcard-name.has-sub { top: 66.5%; height: 12%; }
.tcard-t .tcard-sub {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 78.6%;
  font-size: 6.4cqw;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: center;
}

/* Ultimate: a slow sunburst, twinkles, a warm glow and a foil sheen. */
.tcard-t.is-ultimate .tcard-frame { filter: drop-shadow(0 0 10px rgba(240, 200, 100, 0.45)); animation: ult-glow 3.6s ease-in-out infinite; }
.tcard-t.is-ultimate .ult-rays { transform-box: view-box; transform-origin: 98.62px 124.2px; animation: ult-spin 60s linear infinite; }
.tcard-t.is-ultimate .ult-twinkle { animation: ult-twinkle 2.4s ease-in-out infinite; }
.tcard-t.is-ultimate .ult-twinkle-b { animation-delay: -1.2s; }
.tcard-t.is-ultimate::after {
  content: ''; position: absolute; pointer-events: none;
  left: 4.45%; top: 2%; width: 93%; height: 96.7%;
  border-radius: 14.4% / 6.6%;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 236, 170, 0.28) 46%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 236, 170, 0.28) 54%, transparent 62%);
  background-size: 300% 100%;
  mix-blend-mode: screen;
  animation: ult-sheen 5s ease-in-out infinite;
}
@keyframes ult-spin { to { transform: rotate(360deg); } }
@keyframes ult-twinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes ult-glow { 0%, 100% { filter: drop-shadow(0 0 8px rgba(240, 200, 100, 0.35)); } 50% { filter: drop-shadow(0 0 18px rgba(255, 215, 120, 0.7)); } }
@keyframes ult-sheen { 0% { background-position: 120% 0; } 60%, 100% { background-position: -40% 0; } }
@media (prefers-reduced-motion: reduce) {
  .tcard-t.is-ultimate .tcard-frame, .tcard-t.is-ultimate .ult-rays, .tcard-t.is-ultimate .ult-twinkle, .tcard-t.is-ultimate::after { animation: none; }
}
