/* Global subpage polish — clean backgrounds, no grain */

/* Safety: never re-enable SVG noise overlay on body */
body.ppl-premium::before,
body.ppl-premium::after {
  display: none !important;
  content: none !important;
  background: none !important;
  background-image: none !important;
}

body.ppl-premium {
  background:
    radial-gradient(ellipse 80% 45% at 50% -5%, rgba(22, 48, 82, 0.3) 0%, transparent 50%),
    linear-gradient(180deg, #0a1628 0%, #081420 100%) !important;
  background-attachment: fixed;
}

body.ppl-premium main {
  min-height: 50vh;
}

/* Subpage sections */
body.ppl-premium .page-section {
  position: relative;
  padding: 2.5rem 0;
}

body.ppl-premium .page-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 68rem);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 175, 55, 0.35) 50%,
    transparent
  );
  pointer-events: none;
}

body.ppl-premium .page-section:first-of-type::before {
  display: none;
}

body.ppl-premium.page-home .section-tone-sponsors {
  padding-bottom: 2rem;
  margin-bottom: 0;
}

body.ppl-premium.page-home .sponsors-section::before {
  display: none;
}

/* ── Team detail ── */
body.ppl-premium .team-detail-page {
  padding-bottom: 3rem;
}

.team-detail-hero {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .team-detail-hero {
    grid-template-columns: auto 1fr;
    gap: 2rem;
  }
}

.team-detail-crest-wrap {
  display: flex;
  justify-content: center;
}

.team-detail-crest-wrap .crest-ring--xl {
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.35));
}

.team-detail-heading h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  text-align: center;
}

@media (min-width: 640px) {
  .team-detail-heading h1 {
    text-align: left;
  }
}

.team-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

@media (min-width: 640px) {
  .team-detail-meta {
    justify-content: flex-start;
  }
}

.team-detail-meta .team-group-badge {
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.team-stats-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .team-stats-pills {
    justify-content: flex-start;
  }
}

.team-stat-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: var(--muted);
}

.team-stat-pill strong {
  color: var(--white);
  margin-right: 0.25rem;
}

.team-detail-block {
  margin-bottom: 2.5rem;
}

.team-detail-block h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.squad-grid {
  display: grid;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 480px) {
  .squad-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.squad-row {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
}

.squad-num {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold);
  text-align: center;
}

.squad-name {
  color: var(--white);
}

.squad-badge-gk {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.15rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.team-matches-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.team-match-card {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) minmax(5.5rem, auto) auto;
  align-items: center;
  gap: 0.65rem 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.team-match-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.team-match-card.is-live {
  border-color: rgba(255, 59, 59, 0.3);
  box-shadow: inset 3px 0 0 rgba(255, 59, 59, 0.6);
}

.team-match-time {
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.team-match-time small {
  display: block;
  font-size: 0.6rem;
  opacity: 0.8;
}

.team-match-lineup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.65rem;
  min-width: 0;
}

.team-match-lineup .match-team-cell.is-us .match-team-name {
  color: var(--gold-bright);
}

.team-match-score {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 2.75rem;
}

.team-match-card .pitch-badge {
  justify-self: start;
}

.team-match-card .status-badge {
  justify-self: end;
  white-space: nowrap;
}

/* Mobile: harmonogram meczów — 3 wiersze (godzina+boisko | drużyny | status) */
@media (max-width: 768px) {
  body.ppl-premium .match-row,
  .team-match-card {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "time pitch"
      "teams teams"
      "status status";
    gap: 0.45rem 0.65rem;
    align-items: center;
  }

  body.ppl-premium .match-row:hover {
    transform: none;
  }

  body.ppl-premium .match-row .match-time,
  .team-match-time {
    grid-area: time;
    justify-self: start;
  }

  body.ppl-premium .match-row .pitch-badge,
  .team-match-card .pitch-badge {
    grid-area: pitch;
    justify-self: end;
  }

  body.ppl-premium .match-row .match-teams-lineup,
  .team-match-lineup {
    grid-area: teams;
    width: 100%;
    justify-content: center;
    gap: 0.4rem 0.5rem;
    flex-wrap: wrap;
  }

  body.ppl-premium .match-row .status-badge,
  .team-match-card .status-badge {
    grid-area: status;
    justify-self: start;
  }

  body.ppl-premium .match-row .match-team-name,
  .team-match-lineup .match-team-name {
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.25;
  }

  body.ppl-premium .match-row .match-team-cell,
  .team-match-lineup .match-team-cell {
    flex: 1 1 5.5rem;
    max-width: calc(50% - 1.75rem);
  }

  body.ppl-premium .match-list--compact .match-row .match-time {
    min-width: 0;
    font-size: 1rem;
  }

  .team-match-score {
    font-size: 1.1rem;
    min-width: 2.25rem;
  }
}

/* Legacy crest-xl override */
body.ppl-premium .crest-xl {
  width: 140px !important;
  height: 140px !important;
  max-width: 180px;
  max-height: 180px;
}
