/* Jedno tło dla ekipy, profilu, rankingu i dalszych statystyk zawodników. */
.team-page .legacy-players {
  border-color:rgba(255,65,82,.58);
  background-color:#090e17;
  background-image:
    linear-gradient(180deg,rgba(4,8,15,.22) 0,rgba(5,9,17,.30) 200px,rgba(6,10,18,.66) 460px,#090e17 880px),
    url('assets/team-roster-hostage-background.webp');
  background-repeat:no-repeat;
  background-position:center top,right top;
  background-size:100% 100%,100% auto;
  box-shadow:inset 0 1px 0 #ff5b6966,inset 0 -2px 0 #ff405533,0 0 30px #a90e2330,0 20px 48px #0008;
}
.team-page .legacy-players::before {background:none;}
.team-page .legacy-players::after {
  left:clamp(18px,2.35vw,34px);right:clamp(18px,2.35vw,34px);
  height:2px;background:linear-gradient(90deg,#ff4055,#ff405544 42%,transparent);
  box-shadow:0 0 16px #ff405577;
}

/* Zachowujemy wielkość i pozycję nagłówka oraz jego światło. */
#pt-players #pt-roster-heading {
  position:relative;text-shadow:0 3px 14px #000b,0 0 20px #ff405522;
}

/* Filtry są czytelne na fotografii, lecz zachowują obecne działanie. */
#pt-players .pt-roster-area .pt-filter-label {display:inline-flex;align-items:center;gap:6px;color:#b5bfce;}
#pt-players .pt-roster-area .pt-filter-label::before {
  content:"";width:5px;height:10px;flex:none;transform:skew(-26deg);
  background:#ff4055;box-shadow:0 0 8px #ff405566;
}
#pt-players .pt-roster-area .pt-filter {
  min-height:38px;border-color:#a0aec339;border-radius:999px;
  background:linear-gradient(180deg,#101722e8,#0a111ce8);box-shadow:inset 0 1px #ffffff13,0 5px 13px #0007;
}
#pt-players .pt-roster-area .pt-filter button {border-radius:999px;min-height:29px;}
#pt-players .pt-roster-area .pt-filter button.is-active {
  background:linear-gradient(180deg,#ec293b,#ac0d21);box-shadow:inset 0 1px #ffffff55,0 0 12px #e82343a0;
}

/* Ta sama fotografia karty jest obracana do koloru z postteam-players.js. */
#pt-players .pt-roster-grid {gap:14px 12px;}
#pt-players .pt-roster-grid .pt-card {
  border:0;border-radius:13px;
  background:transparent!important;
  box-shadow:none;
  transition:transform .2s ease;
}
#pt-players .pt-roster-grid .pt-card::before {
  content:"";position:absolute;inset:-5px -6px;z-index:0;pointer-events:none;
  border-radius:inherit;
  background:url('assets/player-card-neon-base.webp') center/100% 100% no-repeat;
  filter:hue-rotate(var(--pt-card-hue,0deg)) saturate(var(--pt-card-saturation,1)) brightness(.88);
  opacity:.92;
  transition:filter .2s ease,opacity .2s ease;
}
#pt-players .pt-roster-grid .pt-card::after {
  content:none;
}
#pt-players .pt-roster-grid .pt-card:hover {
  --rise:-2px;box-shadow:none;
}
#pt-players .pt-roster-grid .pt-card:hover::before {opacity:1;filter:hue-rotate(var(--pt-card-hue,0deg)) saturate(var(--pt-card-saturation,1)) brightness(1.05);}
#pt-players .pt-roster-grid .pt-card.is-selected {
  outline:none;box-shadow:none;
}
#pt-players .pt-roster-grid .pt-card.is-selected::before {opacity:1;filter:hue-rotate(var(--pt-card-hue,0deg)) saturate(var(--pt-card-saturation,1)) brightness(1.05);}
#pt-players .pt-roster-grid .pt-card:focus-visible {outline:2px solid rgb(var(--p-rgb));outline-offset:3px;}

/* Archiwalny Telemans zachowuje dawną kartę zamiast rozciągniętej grafiki. */
#pt-players .pt-roster-grid .pt-card[data-player="Telemans"] {
  border:1px solid rgba(142,130,162,.38);
  background:linear-gradient(120deg,#17141d,#0e1118 68%,#1b1320)!important;
  box-shadow:0 8px 20px #0007;
}
#pt-players .pt-roster-grid .pt-card[data-player="Telemans"]::before {
  inset:0;background:radial-gradient(340px circle at var(--pointer-x,50%) var(--pointer-y,40%),#ffffff1f,transparent 68%);
  filter:none;opacity:.48;
}
#pt-players .pt-roster-grid .pt-card[data-player="Telemans"]::after {
  content:"";position:absolute;left:0;right:0;bottom:0;top:auto;height:2px;
  background:linear-gradient(90deg,transparent,#9581ac,transparent);opacity:.35;
}
#pt-players .pt-roster-grid .pt-card[data-player="Telemans"]:is(:hover,.is-selected) {
  border-color:#9581ac;box-shadow:0 10px 24px #0008,0 0 15px #9581ac33;
}
#pt-players .pt-roster-grid .pt-card[data-player="Telemans"].is-selected::before {
  filter:none;opacity:.48;
}

/* Trójkąty i dane pozostają w istniejących kartach. */
#pt-players .pt-card:not(.is-inactive) {height:164px;min-height:164px;grid-template-rows:103px 61px;}
#pt-players .pt-card:not(.is-inactive) .pt-card-figure {
  z-index:2;height:103px;overflow:visible;
}
#pt-players .pt-card:not(.is-inactive) .pt-card-figure img {
  height:102px;top:-2px;
  filter:drop-shadow(0 7px 10px #000b) drop-shadow(0 0 13px rgba(var(--p-rgb),.42));
}
#pt-players .pt-card:not(.is-inactive) .pt-card-footer h5 {
  margin-top:28px;font-size:clamp(18px,1.55vw,23px);font-style:italic;
  letter-spacing:-.55px;text-shadow:0 2px 8px #000c;
}
#pt-players .pt-card:not(.is-inactive) .pt-card-tag {
  margin-top:58px;font-size:9px;font-weight:900;letter-spacing:1.05px;
}
#pt-players .pt-card:not(.is-inactive) .pt-card-numbers {
  margin:0 12px 11px;padding-top:9px;border-top:1px solid #dce8f031;
}
#pt-players .pt-card:not(.is-inactive) .pt-card-numbers strong {
  font-size:clamp(18px,1.7vw,24px);line-height:1.08;
  text-shadow:0 2px 8px #0009;
}
#pt-players .pt-card:not(.is-inactive) .pt-card-numbers small {
  margin-top:3px;font-size:9px;color:#b4bfcd;letter-spacing:.7px;
}
#pt-players .pt-card .pt-card-numbers span:not(:first-child) {border-left:1px solid #dce8f02b;}
#pt-players .pt-card.is-inactive {height:164px;min-height:164px;}
#pt-players .pt-card.is-inactive .pt-card-figure {position:relative;z-index:2;}

/* Miękkie przejście do profilu zawodnika w tym samym kontenerze. */
#pt-players .pt-roster-area {padding-top:0;padding-bottom:31px;}
#pt-players .pt-profile-area {border-top-color:#ff6b7b36;}

@media (max-width:1100px) {
  #pt-players .pt-roster-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:600px) {
  .team-page .legacy-players {
    background-image:linear-gradient(180deg,#050913aa 0,#070c17dd 360px,#090e17 740px),
      url('assets/team-roster-hostage-background.webp');
    background-size:100% 100%,auto 560px;
    background-position:center top,right top;
    box-shadow:inset 0 1px #ff5b6955,inset 0 -1px #ff405533,0 13px 30px #0007;
  }
  #pt-players .pt-roster-area .pt-filter {border-radius:9px;}
  #pt-players .pt-roster-area .pt-filter button {border-radius:6px;}
  #pt-players .pt-roster-grid {gap:9px;}
  #pt-players .pt-card:not(.is-inactive) {
    height:146px;min-height:146px;grid-template-rows:92px 54px;
    grid-template-columns:minmax(0,1fr) 60px max-content minmax(0,1fr);
    column-gap:4px;
  }
  #pt-players .pt-card:not(.is-inactive) .pt-card-figure {height:92px;}
  #pt-players .pt-card:not(.is-inactive) .pt-card-figure img {height:82px;top:-1px;}
  #pt-players .pt-card:not(.is-inactive) .pt-card-footer h5 {margin:27px 2px 0 0;font-size:clamp(12px,3.5vw,16px);}
  #pt-players .pt-card:not(.is-inactive) .pt-card-tag {margin:51px 2px 0 0;font-size:7px;letter-spacing:.3px;}
  #pt-players .pt-card:not(.is-inactive) .pt-card-numbers {margin:0 7px 8px;padding-top:7px;}
  #pt-players .pt-card:not(.is-inactive) .pt-card-numbers strong {font-size:14px;}
  #pt-players .pt-card:not(.is-inactive) .pt-card-numbers small {font-size:7px;letter-spacing:.2px;}
  #pt-players .pt-card.is-inactive {height:146px;min-height:146px;}
}
@media (max-width:360px) {
  #pt-players .pt-roster-grid {grid-template-columns:minmax(0,1fr);}
  #pt-players .pt-card:not(.is-inactive) {
    height:154px;min-height:154px;grid-template-columns:minmax(0,1fr) 78px max-content minmax(0,1fr);
    grid-template-rows:100px 54px;
  }
  #pt-players .pt-card:not(.is-inactive) .pt-card-figure {height:100px;}
  #pt-players .pt-card:not(.is-inactive) .pt-card-figure img {height:94px;}
  #pt-players .pt-card:not(.is-inactive) .pt-card-footer h5 {font-size:18px;}
  #pt-players .pt-card:not(.is-inactive) .pt-card-tag {font-size:8px;}
}
@media (prefers-reduced-motion:reduce) {
  #pt-players .pt-roster-grid .pt-card,#pt-players .pt-roster-grid .pt-card::before {transition:none;}
}
