/* ==========================================================================
   Courtside — WordPress-specific blocks (extends main.css)
   ========================================================================== */

/* Page hero (archives, schedule, standings...) */
.page-hero { background: var(--c-navy); color: var(--c-on-dark); padding-block: 28px 32px; }
.page-hero__inner { display: grid; gap: 12px; }
.page-hero__desc { color: var(--c-on-dark-muted); max-width: 640px; }
.page-hero--center .page-hero__inner { justify-items: center; text-align: center; padding-block: 48px; }
.page-hero__big { font-family: var(--f-display); font-size: clamp(120px, 20vw, 220px); font-weight: 800; line-height: .8; color: var(--c-accent); }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
@media (min-width: 900px) { .page-hero { padding-block: 48px 56px; } }
.eyebrow--light { color: var(--c-on-dark-muted); }

.container--narrow { max-width: calc(760px + var(--gutter) * 2); }
.empty-state { padding: 24px; border: 1px dashed var(--c-line-strong); border-radius: var(--r-lg); color: var(--c-muted); text-align: center; background: rgba(255,255,255,.5); }
.card__body { padding: 0 16px 16px; }
@media (min-width: 600px) { .card__body { padding: 0 24px 24px; } }

/* Search panel */
.site-search { background: var(--c-navy-2); border-top: 1px solid var(--c-line-dark); padding-block: 12px; }
.site-search[hidden] { display: none; }
.site-search__form { display: flex; gap: 8px; }
.site-search__input { flex: 1; min-height: 48px; padding: 0 16px; border: 1px solid #334063; border-radius: var(--r-sm); background: var(--c-navy); color: #fff; }

/* Date strip (schedule) */
.date-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.date-strip__list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.date-strip__list::-webkit-scrollbar { display: none; }
.date-strip__day {
  display: grid; justify-items: center; gap: 0; min-width: 60px; padding: 8px 6px;
  border: 1px solid #334063; border-radius: 12px; color: var(--c-on-dark); line-height: 1.15;
}
.date-strip__day:hover { color: #fff; border-color: #fff; }
.date-strip__day--active { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-ink); }
.date-strip__day--active:hover { color: var(--c-ink); }
.date-strip__dow, .date-strip__mon { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.date-strip__num { font-family: var(--f-display); font-size: 24px; font-weight: 800; }
.date-strip__nav svg { width: 18px; height: 18px; }
.icon-flip { display: inline-flex; transform: scaleX(-1); }
.date-strip__input { min-height: 44px; padding: 0 12px; border: 1px solid #334063; border-radius: var(--r-sm); background: var(--c-navy-2); color: #fff; color-scheme: dark; }
@media (max-width: 599px) { .date-strip__nav { display: none; } .date-strip__form { width: 100%; } .date-strip__input { width: 100%; } }

.standings-page { display: grid; gap: 24px; }

/* Live updates */
.is-updated { animation: cs-flash 1.4s ease-out; }
@keyframes cs-flash { 0% { background: var(--c-accent); color: var(--c-ink); border-radius: 4px; } 100% { background: transparent; } }
.scoreboard__status--live { background: var(--c-live); color: #fff; }
.scoreboard__status--live::before { content: "● "; }
.scoreboard__score--time { font-size: clamp(44px, 7vw, 88px); }
.match-card__team--lost .match-card__name, .match-card__team--lost .match-card__score { color: var(--c-muted-2); }
.match-card__name { color: var(--c-ink); }
.match-card__record { font-size: 12px; font-weight: 600; color: var(--c-muted); }
.next-game__score { font-family: var(--f-display); font-size: 32px; font-weight: 800; }

/* Images from the API */
.player-card__visual { overflow: hidden; }
.player-card__photo { position: absolute; right: 0; bottom: 0; width: 82%; height: auto; object-fit: contain; object-position: bottom right; }
.player-card__number { position: relative; z-index: 1; }
.player-hero__photo--cutout { background: none; border-radius: 0; object-fit: contain; object-position: bottom center; aspect-ratio: auto; height: auto; max-height: 500px; filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); }
.data-table__photo { width: 32px; height: 32px; border-radius: 50%; background: var(--c-surface-2); object-fit: cover; object-position: top; flex-shrink: 0; }
.entity-list__photo { width: 36px; height: 36px; border-radius: 50%; background: var(--c-surface-2); object-fit: cover; object-position: top; flex-shrink: 0; }
.mini-list__avatar { object-fit: cover; object-position: top; background: var(--c-surface-2); }
.leader-card__photo, .performer__photo { object-fit: cover; object-position: top; }
.embed-player__photo { object-fit: cover; object-position: top; background: var(--team-color); }
.stat-tiles--single { grid-template-columns: 1fr; }

/* Sidebar mini scores */
.mini-scores li + li { border-top: 1px solid var(--c-line-soft); }
.mini-scores__game { display: grid; gap: 6px; padding: 12px 0; font-size: 14px; }
.mini-scores__row { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.mini-scores__team { flex: 1; }
.mini-scores__status { font-size: 12px; color: var(--c-muted); }

.article-header__match { width: 100%; max-width: 720px; }

/* Pagination */
.pagination { margin-top: 40px; }
.pagination ul, .pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; justify-content: center; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--c-line-strong); border-radius: var(--r-pill); font-weight: 700; background: var(--c-surface); }
.pagination .current { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Comments */
.comments { display: grid; gap: 20px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--c-line); font-size: 16px; }
.comments__list, .comments__list .children { list-style: none; padding: 0; display: grid; gap: 16px; }
.comments__list .children { padding-left: 24px; margin-top: 16px; }
.comment-body { padding: 16px; border-radius: var(--r-md); background: var(--c-surface); border: 1px solid var(--c-line); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: 13px; color: var(--c-muted); margin: 4px 0 8px; }
.comment-form { display: grid; gap: 12px; }
.comment-form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--c-line-strong); border-radius: var(--r-sm); background: var(--c-surface);
}

/* WordPress content helpers */
.prose .alignwide { margin-inline: 0; }
.prose .wp-block-image img, .prose img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.prose .wp-block-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: var(--r-md); }
.prose .wp-element-caption, .prose .wp-caption-text { font-size: 14px; color: var(--c-muted); }
.prose .match-grid--embed { grid-template-columns: 1fr; padding: 0; }
@media (min-width: 600px) { .prose .match-grid--embed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prose .data-table { font-size: 14px; line-height: 1.3; }
.prose > .table-scroll { border: 1px solid var(--c-line); border-radius: var(--r-lg); background: var(--c-surface); }
.page-links { display: flex; gap: 8px; font-weight: 700; }
.sticky, .bypostauthor { }
.wp-caption { max-width: 100%; }
.alignleft { float: left; margin: 0 20px 12px 0; }
.alignright { float: right; margin: 0 0 12px 20px; }
.aligncenter { margin-inline: auto; }

.btn--icon.btn--outline-light { width: 44px; padding: 0; }

.match-card__top { gap: 8px; }
.match-card__top > span:last-child { text-align: right; }
.page-hero__inner > * { min-width: 0; }

/* Team logo image (local copy) inside the logo token */
.team-logo--img { background: #fff; padding: calc(var(--size) * 0.12); overflow: hidden; box-sizing: border-box; }
.team-logo--img img { display: block; width: 100%; height: 100%; min-width: 0; object-fit: contain; }

/* Floating sidebar (team page): sticks below the header + tabs while the page scrolls.
   --cs-sticky-top is set by main.js; a sidebar taller than the window sticks by its bottom edge. */
@media (min-width: 1024px) {
  .layout-split__col--sticky { position: sticky; top: var(--cs-sticky-top, calc(var(--header-h) + 72px)); }
}

/* Player hero: smaller background jersey number, less empty space under the header */
.player-hero__jersey { font-size: clamp(150px, 17vw, 250px); top: 12px; }
@media (min-width: 900px) {
  .player-hero__inner { padding-top: 16px; }
  .player-hero__info { padding-bottom: 72px; }
  .player-hero__visual { min-height: 400px; }
}

/* Player hero on any team color: labels in soft white (like the team hero) */
.player-hero__team-meta,
.player-hero__fact dt,
.player-hero .breadcrumbs__list { color: rgba(255,255,255,.75); }

/* Scores ticker: finished games (loser dimmed) and a divider before upcoming games */
.scores-ticker__row--lost { opacity: .5; }
.scores-ticker__game--final .scores-ticker__row:not(.scores-ticker__row--lost) { font-weight: 800; }
.scores-ticker__sep { flex: 0 0 auto; align-self: center; width: 1px; height: 32px; margin: 0 10px; background: rgba(255,255,255,.18); }
.scores-ticker__status { white-space: nowrap; }

/* Schedule date strip: days without games are not links */
.date-strip__day--empty { opacity: .4; cursor: default; }
.date-strip__nav.is-disabled { opacity: .3; pointer-events: none; }

/* Telegram button (header + footer) — Telegram blue so it's recognisable */
.site-header__tg { display: inline-flex; align-items: center; gap: 8px; background: #229ed9; border-color: #229ed9; color: #fff; }
.site-header__tg:hover, .site-header__tg:focus-visible { background: #1c8cc2; border-color: #1c8cc2; color: #fff; }
.site-header__tg svg { width: 18px; height: 18px; flex: 0 0 auto; }
.site-header__actions .site-header__tg { width: 40px; height: 40px; padding: 0; justify-content: center; }
.site-header__actions .site-header__tg-text { display: none; }
@media (min-width: 600px) {
  .site-header__actions .site-header__tg { width: auto; padding: 0 18px; }
  .site-header__actions .site-header__tg-text { display: inline; }
}

/* Search results (client-side search page) */
.page-hero .site-search__form { max-width: 640px; }
.search-results { display: grid; gap: 10px; margin-top: 12px; }
.search-results__link { display: grid; gap: 4px; padding: 14px 18px; border-radius: var(--r-lg); background: var(--c-surface); border: 1px solid var(--c-line); color: inherit; }
.search-results__link:hover { border-color: var(--c-ink); }
.search-results__tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent-text); }
.search-results__title { font-weight: 800; color: var(--c-ink); }
.search-results__text { font-size: 14px; color: var(--c-muted); }
