/* =====================================================================
   Koora TV — ktv-pro.css  (final layer, loaded AFTER every other stylesheet)
   One palette, one radius, one shadow, light + dark.
   Everything here is an override; delete this file (and its <link>) to go back.
   ===================================================================== */

/* ---------- 1. one palette ---------- */
:root{
  --ktv-red:#E30613; --ktv-red-dark:#B80510;
  --accent-red:#E30613; --accent-gold:#F5A400; --accent-green:#16A34A;
  --ktv-ink:#0B1220; --ktv-ink-2:#121C30; --ktv-ink-3:#1A2740;
  --ktv-radius:16px;
  --ktv-shadow:0 6px 24px rgba(11,18,32,.10);
}
body.light-mode{
  --mp-bg:#F1F4F9; --mp-card:#FFFFFF; --mp-card-2:#F6F8FC; --mp-line:#E3E9F3;
  --mp-text:#0B1220; --mp-muted:#5B6B86; --mp-accent-soft:rgba(227,6,19,.08);
}
body:not(.light-mode){
  --mp-bg:#0B1220; --mp-card:#121C30; --mp-card-2:#172339; --mp-line:rgba(148,163,184,.18);
  --mp-text:#F1F5F9; --mp-muted:#9AA9C2; --mp-accent-soft:rgba(227,6,19,.16);
}

/* ---------- 2. panels: clean header with a red marker, not a full red bar ---------- */
html body .kl-panel{border:1px solid var(--mp-line,#e3e9f3);border-radius:var(--ktv-radius)!important;box-shadow:var(--ktv-shadow)!important;overflow:hidden}
html body .kl-panel-title{
  background:transparent!important;color:var(--mp-text,#0b1220)!important;text-align:start!important;
  font-size:1.05rem!important;font-weight:900!important;padding:14px 18px!important;
  border-bottom:1px solid var(--mp-line,#e3e9f3);position:relative;
  display:flex;align-items:center;gap:10px;
}
html body .kl-panel-title::before{content:"";width:4px;height:1.15em;border-radius:3px;background:var(--ktv-red);flex:0 0 4px}
body:not(.light-mode) .kl-panel{background:var(--mp-card)!important}

/* ---------- 3. one tab style ---------- */
html body .kl-tab.active,html body .kl-tab.today.active{background:var(--ktv-red)!important;color:#fff!important}

/* ---------- 4. match page: theme-aware instead of always-dark ---------- */
html body .sir-match-page{background:var(--mp-bg)!important;color:var(--mp-text)!important;min-height:0!important}
/* back bar + intro */
html body .sir-top-bar{background:var(--mp-card)!important;border:1px solid var(--mp-line)!important;border-radius:14px!important;color:var(--mp-text)!important;box-shadow:none!important}
html body .sir-top-bar a,html body .sir-top-bar h1,html body .sir-title-link,html body .sir-title-link h1{color:var(--mp-text)!important;background:none!important;-webkit-text-fill-color:currentColor!important}
html body .sir-match-page .sir-legal,html body .sir-match-page .sir-note,html body .sir-match-page p{color:var(--mp-muted)}
/* scoreboard hero stays dark in both themes: it is the one dark object on the page */
html body .sir-match-strip{background:linear-gradient(135deg,#0B1220 0%,#16233D 100%)!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:20px!important;box-shadow:0 14px 40px rgba(11,18,32,.28)!important}
html body .sir-status-bar{background:rgba(255,255,255,.06)!important;color:#fff!important;letter-spacing:.2px}
html body .sir-strip-team span,html body .big-center-score strong{color:#fff!important}
html body .big-center-score small{color:#B7C3D9!important}
html body .ktv-goals-summary{background:rgba(255,255,255,.04)!important;border-top:1px solid rgba(255,255,255,.08)!important}
html body .ktv-goal-pill{background:rgba(255,255,255,.07)!important;border-color:rgba(255,255,255,.12)!important;color:#fff!important}
html body .ktv-goal-pill small{color:#4ADE80!important}
/* "finished" card: was a white card inside the dark page */
html body .ktv-mf-card{background:var(--mp-card)!important;border:1px solid var(--mp-line)!important;color:var(--mp-text)!important;box-shadow:var(--ktv-shadow)!important;border-radius:var(--ktv-radius)!important}
html body .ktv-mf-card *{color:inherit}
html body .ktv-mf-badge{background:var(--mp-accent-soft)!important;color:var(--ktv-red)!important;font-weight:900}
html body .ktv-mf-score b{color:var(--ktv-red)!important}
html body .ktv-mf-sub{color:var(--mp-muted)!important}
/* tabs */
html body .sir-tabs-wrap{background:var(--mp-card)!important;border:1px solid var(--mp-line);border-radius:var(--ktv-radius)!important;box-shadow:var(--ktv-shadow)}
html body .sir-tabs-nav{background:var(--mp-card)!important;border-bottom:1px solid var(--mp-line)!important}
html body .sir-tab-btn{color:var(--mp-muted)!important;background:transparent!important;border-radius:0!important;border-bottom:3px solid transparent!important}
html body .sir-tab-btn.active{color:var(--ktv-red)!important;border-bottom:3px solid var(--ktv-red)!important;background:var(--mp-accent-soft)!important;box-shadow:none!important}
/* info cards */
html body .sir-info-card,html body .sir-lineup-team,html body .bein-event-box{background:var(--mp-card)!important;border:1px solid var(--mp-line)!important;color:var(--mp-text)!important;border-radius:var(--ktv-radius)!important}
html body .sir-detail-item{background:var(--mp-card-2)!important;border:1px solid var(--mp-line)!important;color:var(--mp-text)!important;border-radius:14px!important}
html body .sir-info-card h2,html body .sir-info-card h3,html body .sir-detail-item strong,html body .sir-detail-item b{color:var(--mp-text)!important}
html body .sir-detail-item span,html body .sir-detail-item small{color:var(--mp-muted)!important}
html body .bein-event-box strong,html body .bein-event-box p{color:var(--mp-text)!important}
html body .bein-event-box small,html body .bein-event-minute{color:var(--mp-muted)!important}
html body .sir-lineup-section-title{background:var(--mp-accent-soft)!important;color:var(--ktv-red)!important}
html body .sir-player-row{border-bottom-color:var(--mp-line)!important;color:var(--mp-text)}
html body .sir-player-row span{color:var(--ktv-red)!important}
html body .sir-player-row small{color:var(--mp-muted)!important}
/* events timeline (match_events_view.php) follows the theme too */
html body .ktv-tl::before{background:var(--mp-line)}
html body .ktv-tl-min{background:var(--mp-card)!important;border-color:var(--mp-line)!important;color:var(--mp-text)!important}
html body .ktv-tl-ev{background:var(--mp-card-2)!important;border-color:var(--mp-line)!important;color:var(--mp-text)!important}
html body .ktv-tl-ev.goal{background:rgba(22,163,74,.12)!important;border-color:rgba(22,163,74,.5)!important}
html body .ktv-tl-ev.yellow{border-color:rgba(245,164,0,.6)!important}
html body .ktv-tl-ev.red{border-color:rgba(227,6,19,.6)!important}
html body .ktv-tl-ev small,html body .ktv-tl-head{color:var(--mp-muted)!important}
/* "other matches today" */
html body .sir-match-page .sir-other-title,html body .sir-match-page h2{color:var(--mp-text)}

/* ---------- 5. home: small polish ---------- */
html body .ktv-more-item:hover .ktv-more-t{color:var(--ktv-red)}
html body .article-card{border:1px solid var(--mp-line,#e3e9f3)}

/* ── v1.1: variables used by inline match.php blocks + panel bg ── */
body.light-mode{--ktv-panel2:#F6F8FC;--ktv-line:#E3E9F3;--ktv-dim:#64748B}
body:not(.light-mode){--ktv-panel2:#172339;--ktv-line:rgba(148,163,184,.18);--ktv-dim:#94A3B8}
html body .sir-tab-panel,html body .sir-tab-panel.active{background:transparent!important}
html body .sir-match-page a[href*="match.php?id"]{color:var(--mp-text)}

/* v1.1b: hero is always dark → keep its contents readable in both themes */
html body .sir-match-strip .big-center-score strong,html body .sir-match-strip .big-center-score strong *,html body .sir-match-strip .sir-main-score{color:#fff!important}
html body .sir-match-strip .big-center-score small,html body .sir-match-strip .sir-strip-team span{color:#e5e7eb!important}
html body .sir-match-strip .ktv-mf-card{background:rgba(255,255,255,.06)!important;border:1px solid rgba(255,255,255,.10)!important;color:#fff!important;box-shadow:none!important}
html body .sir-match-strip .ktv-mf-card *{color:inherit}
html body .sir-match-strip .ktv-mf-card h1,html body .sir-match-strip .ktv-mf-card h2{color:#fff!important}
html body .sir-match-strip .ktv-mf-card strong,html body .sir-match-strip .ktv-mf-card b{color:#ff5a64!important}
html body .sir-match-strip button:not([class]){background:rgba(255,255,255,.10)!important;color:#fff!important;border:1px solid rgba(255,255,255,.18)!important}

/* v1.2: line-ups (player names were white-on-white in light), pitch header, dark tab contrast */
html body .sir-player-row b{color:var(--mp-text)!important;font-weight:800}
html body .sir-player-row span{color:var(--ktv-red)!important;font-weight:800}
html body .sir-player-row small{color:var(--mp-muted)!important}
html body .sir-player-row{border-bottom:1px solid var(--mp-line)!important}
html body .sir-lineup-team h3{color:var(--mp-text)!important}
html body .sir-lineup-team .sir-formation{color:var(--mp-muted)!important}
html body .ktv-pitch-head{color:var(--mp-text)!important}
html body .ktv-pitch-head .f{color:#b45309!important}
body:not(.light-mode) .ktv-pitch-head .f{color:#fbbf24!important}
body:not(.light-mode) .sir-tab-btn.active{color:#ff7a82!important}
html body .sir-tabs-wrap::before{display:none!important}

/* v1.3: live tab (5 tabs) + commentary panel */
html body .sir-tabs-nav-live{gap:0!important}
html body .sir-tabs-nav-live .sir-tab-btn,html body #sirTabsNav .sir-tab-btn{padding:12px 2px!important;font-size:.82rem!important;line-height:1.25;white-space:normal;word-break:keep-all;overflow-wrap:normal;hyphens:none}
html body .ktv-live-head,html body .ktv-live-head>span:not(.ktv-live-badge):not(.ktv-live-min){color:var(--mp-text)!important}
html body .ktv-live-head>span:nth-child(2){font-weight:900}
html body .ktv-c-empty{background:var(--mp-card-2)!important;border:1px dashed var(--mp-line)!important;color:var(--mp-muted)!important}
html body .ktv-c-feed *{border-color:var(--mp-line)}
html body .ktv-c-feed .ktv-c-t,html body .ktv-c-feed p{color:var(--mp-text)!important}
html body .ktv-c-body,html body .ktv-c-body *{color:var(--mp-text)!important}
html body .ktv-c-min{color:var(--ktv-red)!important}

/* v1.4: live commentary rows follow the theme (was dark text on dark card) */
html body .ktv-c-row .ktv-c-body{background:var(--mp-card-2)!important;border:1px solid var(--mp-line)!important;border-inline-start:4px solid var(--mp-line)!important;border-radius:14px!important;box-shadow:none!important;background-image:none!important}
html body .ktv-c-row.ktv-c-goal .ktv-c-body{border-inline-start-color:#16a34a!important}
html body .ktv-c-row.ktv-c-yellow .ktv-c-body{border-inline-start-color:#eab308!important}
html body .ktv-c-row.ktv-c-red .ktv-c-body{border-inline-start-color:#dc2626!important}
html body .ktv-c-row.ktv-c-sub .ktv-c-body,html body .ktv-c-row.ktv-c-var .ktv-c-body{border-inline-start-color:#3b82f6!important}
html body .ktv-c-row .ktv-c-text{color:var(--mp-text)!important;font-weight:700}
