/* ==========================================================================
   OSZ Season Profile — assets/css/osz-season-profile.css
   Single column (no sidebar); same dark club aesthetic as the manager and
   team profiles. All rules scoped .osz-sp. Strong table rules defeat theme
   bleed.
   ========================================================================== */

.osz-sp {
  --osz-sp-bg: #0c0c0c;
  --osz-sp-panel: #141414;
  --osz-sp-panel-2: #1d1d1d;
  --osz-sp-border: #2a2a2a;
  --osz-sp-red: #d0021b;
  --osz-sp-red-deep: #7a0110;
  --osz-sp-text: #f5f5f5;
  --osz-sp-muted: #9a9a9a;

  background: var(--osz-sp-bg);
  color: var(--osz-sp-text);
  font-size: 16px;
  line-height: 1.5;
}

.osz-sp *,
.osz-sp *::before,
.osz-sp *::after {
  box-sizing: border-box;
}

.osz-sp a {
  text-decoration: none;
}

/* ── Hero ──────────────────────────────────────────────────── */

.osz-sp-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 380px;
  padding: 56px 48px;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse 60% 90% at 85% 40%,
      rgba(150, 5, 20, 0.55) 0%,
      rgba(150, 5, 20, 0) 65%
    ),
    radial-gradient(
      ellipse 50% 70% at 70% 100%,
      rgba(90, 3, 12, 0.6) 0%,
      rgba(90, 3, 12, 0) 70%
    ),
    linear-gradient(100deg, #0a0a0a 0%, #150607 55%, #2b090c 100%);
  border-bottom: 3px solid var(--osz-sp-red);
}

.osz-sp-hero-text {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-width: 0;
  container-type: inline-size;
}

/* Season name: white, one line, never wraps. The view sets --osz-sp-len
   (character count); the font shrinks so the whole name fits the column. */
.osz-sp-hero-name {
  margin: 0 0 18px;
  font-size: clamp(1.4rem, 4.6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

@supports (font-size: 1cqi) {
  .osz-sp-hero-name {
    font-size: min(4.2rem, calc(100cqi / (var(--osz-sp-len, 12) * 0.7)));
  }
}

.osz-sp-hero-role {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--osz-sp-text);
}

.osz-sp-hero-role::before {
  content: "";
  display: block;
  width: 3px;
  height: 1.1em;
  background: var(--osz-sp-red);
}

.osz-sp-hero-photo {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* Squad photo (landscape). Explicit width: WordPress marks lazy images
   sizes="auto", which with width:auto falls back to a 300px layout and
   loads the 300px file. */
.osz-sp-hero-photo img {
  display: block;
  width: 520px;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

/* ── Body: one centred column ──────────────────────────────── */

.osz-sp-body {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px 48px;
}

/* ── Breadcrumb ────────────────────────────────────────────── */

.osz-sp-crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0 20px;
  font-size: 0.78rem;
  color: var(--osz-sp-muted);
}

.osz-sp-crumbs a {
  color: var(--osz-sp-text);
}

.osz-sp-crumbs a:hover {
  color: var(--osz-sp-red);
}

.osz-sp-crumbs-sep {
  color: var(--osz-sp-muted);
}

.osz-sp-crumbs-current {
  color: var(--osz-sp-text);
  font-weight: 700;
}

/* ── Sections ──────────────────────────────────────────────── */

.osz-sp-section {
  background: var(--osz-sp-panel);
  border: 1px solid var(--osz-sp-border);
  padding: 22px 24px;
  margin-bottom: 24px;
  scroll-margin-top: 90px;
}

.osz-sp-heading {
  margin: 0 0 18px;
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--osz-sp-text);
}

.osz-sp-heading span {
  color: var(--osz-sp-red);
}

/* Two classes so Elementor kit heading styles (.elementor-kit-N h3) lose */
.osz-sp .osz-sp-subheading {
  margin: 22px 0 12px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--osz-sp-muted);
}

.osz-sp-caption {
  margin: -10px 0 16px;
  font-size: 0.85rem;
  color: var(--osz-sp-muted);
}

/* ── Overview facts ────────────────────────────────────────── */

.osz-sp-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.osz-sp-fact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--osz-sp-panel-2);
  border: 1px solid var(--osz-sp-border);
  padding: 14px 16px;
}

.osz-sp-fact-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--osz-sp-red);
}

.osz-sp-fact-label svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.osz-sp-fact-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--osz-sp-text);
}

.osz-sp-fact-value a {
  color: var(--osz-sp-text);
}

.osz-sp-fact-value a:hover {
  color: var(--osz-sp-red);
}

/* Games in charge, when more than one manager */
.osz-sp-fact-value em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--osz-sp-muted);
  margin-left: 4px;
}

.osz-sp-fact-sep {
  margin: 0 8px;
  color: var(--osz-sp-red);
}

/* ── League record tiles + summary ───────────────────────────── */

.osz-sp-tiles {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

/* Word above, number below (no icons) */
.osz-sp-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--osz-sp-panel-2);
  border: 1px solid var(--osz-sp-border);
  padding: 18px 10px;
  text-align: center;
}

.osz-sp-tile-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.3;
  color: var(--osz-sp-red);
}

.osz-sp-tile-num {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--osz-sp-text);
}

/* Season Info: the written summary (season term Description) */
.osz-sp-summary {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #d6d6d6;
}

.osz-sp-summary p {
  margin: 0 0 14px;
}

.osz-sp-summary p:last-child {
  margin-bottom: 0;
}

/* ── Result pills ──────────────────────────────────────────── */

.osz-sp-pill {
  display: inline-block;
  min-width: 28px;
  padding: 3px 10px;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 2px;
}

.osz-sp-pill-w {
  background: var(--osz-sp-red);
  border-color: var(--osz-sp-red);
  color: #fff !important;
}

.osz-sp-pill-d {
  background: #3a3a3a;
  border-color: #3a3a3a;
  color: #fff !important;
}

.osz-sp-pill-l {
  background: transparent;
  border-color: var(--osz-sp-muted);
  color: var(--osz-sp-muted) !important;
}

/* ── Match cards (dual crest) ──────────────────────────────── */

.osz-sp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.osz-sp-match {
  background: var(--osz-sp-panel-2);
  border: 1px solid var(--osz-sp-border);
  padding: 16px 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.osz-sp-match-crests {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 2px;
}

.osz-sp-match-crest {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.osz-sp-match-crest img {
  max-width: 40px;
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.osz-sp-match-crest svg {
  width: 30px;
  height: 30px;
  color: var(--osz-sp-muted);
}

.osz-sp-match-vs {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--osz-sp-muted);
}

.osz-sp-match-score {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--osz-sp-text);
}

.osz-sp-match-teams {
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  color: var(--osz-sp-text);
}

.osz-sp-match-date {
  font-size: 0.7rem;
  text-align: center;
  color: var(--osz-sp-muted);
}

/* Penalties / aggregate / historic note */
.osz-sp-match-note {
  font-size: 0.7rem;
  font-style: italic;
  text-align: center;
  line-height: 1.35;
  color: #cfcfcf;
}

.osz-sp-match-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--osz-sp-border);
  font-size: 0.7rem;
}

.osz-sp-match-link {
  color: var(--osz-sp-red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.osz-sp-match-link:hover {
  color: var(--osz-sp-text);
}

.osz-sp-milestone {
  display: flex;
  flex-direction: column;
}

.osz-sp-milestone-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
  margin-bottom: 8px;
  color: var(--osz-sp-text);
}

.osz-sp-milestone .osz-sp-match {
  flex: 1;
}

/* ── Tables — strong overrides to defeat ANY theme bleed ────── */

.osz-sp-table-wrap {
  overflow-x: auto;
}

.osz-sp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  background: var(--osz-sp-panel-2) !important;
}

.osz-sp-table thead th,
.osz-sp-table thead td {
  padding: 12px 10px;
  text-align: center;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--osz-sp-muted) !important;
  background: var(--osz-sp-panel-2) !important;
  border: 1px solid var(--osz-sp-border) !important;
}

.osz-sp-table tbody tr,
.osz-sp-table tbody tr:nth-child(odd),
.osz-sp-table tbody tr:nth-child(even) {
  background: var(--osz-sp-panel-2) !important;
}

.osz-sp-table tbody td,
.osz-sp-table tbody th {
  padding: 11px 8px;
  text-align: center;
  border: 1px solid var(--osz-sp-border) !important;
  color: var(--osz-sp-text) !important;
  background: var(--osz-sp-panel-2) !important;
  font-weight: 700;
  white-space: nowrap;
}

/* Opponent / competition may wrap so the action column stays in view */
.osz-sp-table tbody td.osz-sp-col-left {
  white-space: normal;
  min-width: 160px;
}

.osz-sp-table tbody td.osz-sp-col-wrap {
  white-space: normal;
}

.osz-sp-table tbody tr:hover,
.osz-sp-table tbody tr:hover td {
  background: var(--osz-sp-panel-2) !important;
  color: var(--osz-sp-text) !important;
}

.osz-sp-table a {
  color: var(--osz-sp-text) !important;
}

/* Plain links turn red on hover; buttons keep their own (white-on-red) hover */
.osz-sp-table a:not(.osz-sp-btn):hover {
  color: var(--osz-sp-red) !important;
}

.osz-sp-table .osz-sp-col-left {
  text-align: left !important;
}

.osz-sp-opponent-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.osz-sp-avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.osz-sp-avatar img {
  max-width: 32px !important;
  max-height: 32px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

.osz-sp-opp-name {
  color: var(--osz-sp-text) !important;
  font-weight: 700;
  font-size: 0.84rem;
}

.osz-sp-row-note {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  font-weight: 500;
  font-style: italic;
  color: var(--osz-sp-muted);
}

.osz-sp-action {
  width: 1%;
}

/* ── Top-five player cards ─────────────────────────────────── */

.osz-sp-mates {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.osz-sp-mate {
  background: var(--osz-sp-panel-2);
  border: 1px solid var(--osz-sp-border);
  padding: 10px 10px 12px;
  text-align: center;
  color: var(--osz-sp-text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

.osz-sp-mate:hover {
  border-color: var(--osz-sp-red);
  transform: translateY(-2px);
  color: var(--osz-sp-text) !important;
}

.osz-sp-mate-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  object-position: top;
}

.osz-sp-mate-name {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--osz-sp-text);
}

.osz-sp-mate-count {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--osz-sp-text);
}

.osz-sp-mate-count em {
  font-style: normal;
  color: var(--osz-sp-red);
  text-transform: uppercase;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
}

/* ── Buttons ───────────────────────────────────────────────── */

.osz-sp-btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--osz-sp-red);
  color: #fff !important;
  transition: background 0.15s ease;
}

.osz-sp-btn-ghost {
  background: transparent;
  padding: 6px 11px;
  border-color: var(--osz-sp-border);
  font-size: 0.64rem;
  white-space: nowrap;
}

.osz-sp-btn-ghost:hover {
  background: var(--osz-sp-red);
  border-color: var(--osz-sp-red);
  color: #fff !important;
}

/* ── Previous / next season ────────────────────────────────── */

.osz-sp-season-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
}

.osz-sp-season-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--osz-sp-panel);
  border: 1px solid var(--osz-sp-border);
  padding: 16px 20px;
  color: var(--osz-sp-text);
  transition: border-color 0.15s ease;
}

a.osz-sp-season-link:hover {
  border-color: var(--osz-sp-red);
  color: var(--osz-sp-text) !important;
}

.osz-sp-season-link span {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--osz-sp-red);
}

.osz-sp-season-link strong {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
}

.osz-sp-season-all {
  align-items: center;
  text-align: center;
}

.osz-sp-season-next {
  align-items: flex-end;
  text-align: right;
}

.osz-sp-season-empty {
  visibility: hidden;
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 900px) {
  .osz-sp-body {
    padding: 0 20px 40px;
  }
  .osz-sp-hero {
    padding: 40px 24px;
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
  }
  /* Column layout: give the name container the full width to fit into */
  .osz-sp-hero-text {
    width: 100%;
  }
  /* No sidebar to carry it, so the squad photo stays — full width under the name */
  .osz-sp-hero-photo {
    width: 100%;
  }
  .osz-sp-hero-photo img {
    width: 100%;
    max-width: 100%;
    max-height: none;
  }
  .osz-sp-table th,
  .osz-sp-table td {
    padding: 10px 8px;
  }
  .osz-sp-mates {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

@media (max-width: 760px) {
  .osz-sp-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .osz-sp-facts {
    grid-template-columns: 1fr;
  }
  .osz-sp-tiles {
    gap: 8px;
  }
  .osz-sp-tile {
    padding: 14px 6px;
  }
  .osz-sp-tile-num {
    font-size: 1.45rem;
  }
  .osz-sp-tile-label {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
  }
  .osz-sp-cards {
    grid-template-columns: 1fr;
  }
  .osz-sp-mates {
    grid-template-columns: 1fr 1fr;
  }
  .osz-sp-season-nav {
    grid-template-columns: 1fr 1fr;
  }
  .osz-sp-season-all {
    grid-column: 1 / -1;
    order: 3;
  }
}
