/*
Theme Name: ArenaFlex
Theme URI: 
Author: Kevin
Author URI: 
Description: Multi-sport streaming theme
Version: 1.0.0
Requires at least: 5.0
Tested up to: 5.4
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: arenaflex
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

.video__content.pre-match-banner {
    aspect-ratio: 16 / 9;
    min-height: 360px;
    background-color: #0f1320;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
}
.video__content.pre-match-banner p {
    color: #fff;
    font-size: 20px;
    line-height: 1.4;
    margin: 0 auto 18px !important;
    max-width: 38rem;
}
.video__content.pre-match-banner a {
    background: var(--custom-theme-color, #c41e3a);
    color: #fff;
    padding: 14px 26px;
    font-size: 16px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
}
@media (max-width: 768px) {
    .video__content.pre-match-banner { min-height: 300px; padding: 16px; }
    .video__content.pre-match-banner p { font-size: 12px; line-height: 1.35; margin-bottom: 12px !important; }
    .video__content.pre-match-banner a { padding: 8px 14px; font-size: 11px; }
}

.video__content.updated-soon-banner {
    aspect-ratio: 16 / 9;
    min-height: 360px;
    background-color: #1a1410;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
}
.video__content.updated-soon-banner p {
    color: #fff;
    font-size: 20px;
    line-height: 1.4;
    margin: 0 auto 18px !important;
    max-width: 38rem;
}
.video__content.updated-soon-banner a {
    background: var(--custom-theme-color, #c41e3a);
    color: #fff;
    padding: 14px 26px;
    font-size: 16px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
}

@media (max-width: 768px) {
    .video__content.updated-soon-banner { min-height: 300px; padding: 16px; }
    .video__content.updated-soon-banner p { font-size: 12px; line-height: 1.35; margin-bottom: 12px !important; }
    .video__content.updated-soon-banner a { padding: 8px 14px; font-size: 11px; }
}

body.ticker-hidden .nw-period {
    display: none !important;
}

body.ticker-hidden .nw-matchup .nw-score {
    font-size: 0 !important;
    color: transparent !important;
    background: none !important;
    animation: none !important;
}
body.ticker-hidden .nw-matchup .nw-score::before {
    content: "@";
    display: inline;
    color: var(--text_color);
    opacity: 0.5;
    font-size: 14px;
    font-weight: 400;
}

@media (max-width: 600px) {
    .multiview-btn {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        min-width: 36px;
        min-height: 36px;
        margin-right: 10px;
    }
}

@media (max-width: 767px) {
    .social {
        z-index: 9999;
    }
}

#scoreToggle { gap: 6px; opacity: 1 !important; }
#scoreToggle.score-hidden { opacity: 1 !important; }

.score-toggle__label {
    font-family: var(--heading-font);
    font-size: 14px;
    font-weight: 700;
    color: var(--text_color);
    white-space: nowrap;
}
.score-toggle__pill {
    position: relative;
    width: 26px;
    height: 15px;
    border-radius: 8px;
    background: var(--custom-theme-color, #c41e3a);
    transition: background .2s;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}
.score-toggle__thumb {
    position: absolute;
    top: 2px;
    left: 13px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.35);
    transition: left .2s;
    display: block;
}
/* Header OFF */
#scoreToggle.score-hidden .score-toggle__pill,
body.ticker-hidden #scoreToggle .score-toggle__pill { background: rgba(140,140,140,.45); }
#scoreToggle.score-hidden .score-toggle__thumb,
body.ticker-hidden #scoreToggle .score-toggle__thumb { left: 2px; }

.theatre .updated-soon-banner {
    position:     fixed             !important;
    top:          var(--tt, 64px)   !important;
    left:         0                 !important;
    right:        var(--cw, 350px)  !important;
    bottom:       0                 !important;
    width:        auto              !important;
    height:       auto              !important;
    aspect-ratio: unset             !important;
    min-height:   unset             !important;
}

/* Multiview default OFF */
#mvScoresToggle .score-toggle__pill  { background: rgba(140,140,140,.45); }
#mvScoresToggle .score-toggle__thumb { left: 2px; }
/* Multiview ON */
#mvScoresToggle.active .score-toggle__pill  { background: var(--custom-theme-color, #c41e3a); }
#mvScoresToggle.active .score-toggle__thumb { left: 13px; }

@media (max-width: 767px) {
    #mvScoresToggle span { display: inline !important; }
    #mvScoresToggle { white-space: nowrap; }
}

.hdr-settings-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hdr-settings-btn {
    display: none;
    cursor: pointer;
    color: var(--icon-color);
    opacity: .85;
    background: 0 0;
    border: none;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 8px 4px 4px;
    transition: opacity .2s, background .2s;
}
.hdr-settings-btn:hover { opacity: 1; background: var(--icon-hover-color); }
.hdr-settings-btn svg { pointer-events: none; }
.hdr-settings-btn__text { display: none; }
.hdr-settings-panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}
.hdr-settings-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.hdr-settings-row__lbl { display: none; }

@media (max-width: 768px) {
    
    .right_content { flex-wrap: nowrap !important; align-items: center; padding-right: 48px !important; }
    /* Neutralise output.css margin-right:40px that was for checkbox-wrapper in header flow */
    .hdr-settings-panel .checkbox-wrapper { margin-right: 0 !important; }
    /* Show the gear + "Settings" button */
    .hdr-settings-btn { display: flex; }
    /* Hide the inline panel; it becomes a dropdown */
    .hdr-settings-panel {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        background: var(--header-bg);
        border: 1px solid var(--color-border);
        border-radius: 10px;
        padding: 4px 0;
        flex-direction: column;
        min-width: 160px;
        z-index: 10001;
        box-shadow: 0 4px 20px rgba(0,0,0,.15);
    }
    .hdr-settings-wrap.open .hdr-settings-panel { display: flex; }
    .hdr-settings-btn__text {
        display: inline;
        font-size: 14px;
        font-weight: 700;
        font-family: var(--heading-font);
        color: var(--icon-color);
        white-space: nowrap;
    }
    .hdr-settings-row {
        justify-content: space-between;
        padding: 8px 14px;
        gap: 8px;
        width: 100%;
        border-bottom: 1px solid var(--color-border);
        box-sizing: border-box;
    }
    .hdr-settings-row:last-child { border-bottom: none; }
    .hdr-settings-row__lbl {
        display: block;
        font-size: 13px;
        font-weight: 700;
        font-family: var(--heading-font);
        color: var(--text_color);
        white-space: nowrap;
    }
    /* Multiview nav row: full-width link, no extra padding on the row itself */
    .hdr-settings-row--nav { padding: 0; }
    .hdr-settings-row--nav .multiview-btn {
        width: 100%;
        padding: 8px 14px;
        justify-content: flex-start;
        gap: 8px;
        opacity: 1;
        border-radius: 0;
    }
    .hdr-settings-panel .multiview-btn__text { display: inline !important; font-size: 13px; }
    /* Partner rows: zero padding — partner-sport-item handles its own padding */
    .hdr-settings-row--partner { padding: 0; }
    .hdr-settings-row--partner .partner-sport-item {
        width: 100%;
        padding: 8px 14px;
        font-size: 13px;
        font-weight: 600;
        border-radius: 0;
        white-space: nowrap;
    }
    /* Hide the original partner ⋮ button in the header on mobile */
    .partner-sports-wrap { display: none !important; }
    /* Hide the in-button "Scores" text — row label replaces it */
    .hdr-settings-row #scoreToggle .score-toggle__label { display: none; }
}
/* On desktop, hide partner rows that are duplicated inside the settings panel */
@media (min-width: 769px) {
    .hdr-settings-row--partner { display: none; }
}

/* Theater mode: when the header is revealed (eye icon), raise its stacking context
   above the chat panel (z-index: 999999999) so the ⋮ partner dropdown appears on top. */
.theatre.theatre-show-header .main_header {
    z-index: 1000000000;
}
/* Explicitly raise both dropdown panels above the chat overlay in theater mode. */
.theatre.theatre-show-header .partner-sports-dropdown,
.theatre.theatre-show-header .hdr-settings-panel {
    z-index: 1000000001;
}

/* Theater score chip — replaces eye icon toggle; "Score" label toggles header. */
.theatre .theater_header_toggle .th-score-val {
    color: #e5e5e5;
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--heading-font);
    line-height: 1;
    white-space: nowrap;
    transition: color 0.2s;
}
.theatre.theatre-show-header .theater_header_toggle .th-score-val {
    color: #bababa;
}

/* ── Score ticker: three-dot loading animation ─────────────────────── */
#box_loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 8px !important;
    margin-top: -4px;
    margin-left: -22px;
    display: block !important;
    z-index: 1;
}
#box_loader_pr {
    position: absolute;
    z-index: 1;
    white-space: nowrap;
}
.pr_bt {
    display: inline-block;
    vertical-align: top;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    margin-right: 2px;
    background: #333;
    opacity: .2;
    animation-duration: 1500ms;
    animation-name: pr_bt_anim;
    animation-iteration-count: infinite;
}
body.dark-theme .pr_bt { background: #b3b3b3; }
.pr_big .pr_bt {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    margin-right: 4px;
}
.pr_baw .pr_bt { background: #b3b3b3; }
.pr_bt:nth-child(2) { animation-delay: 500ms; }
.pr_bt:nth-child(3) { animation-delay: 1000ms; }
@keyframes pr_bt_anim {
    0%, 100% { opacity: .2; }
    50%      { opacity: 1;  }
}

/* ── Settings panel: backdrop + ghost-click prevention ────────────────── */
/* Sits above page content (z-index < header 100000), blocks tap bleed-through  */
#hdrSettingsBackdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}
/* Eliminate 300ms ghost-click delay on panel + multiview controls */
@media (max-width: 768px) {
    .hdr-settings-panel,
    .hdr-settings-panel button,
    .hdr-settings-panel a,
    .hdr-settings-panel label,
    .hdr-settings-panel input,
    .mv-ctrl-btn { touch-action: manipulation; }
}

/* ── Mobile sticky footer ad fix ────────────────────────────────────── */
/* The fallback puts the 728×90 desktop ad code into the mobile container;
   clip it to viewport width and add iOS safe-area spacing at the bottom. */
@media (max-width: 767px) {
    .sticky-footer-ad {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .sticky-footer-ad__mobile {
        display: block !important;
        max-width: 100%;
        overflow: hidden;
        min-height: 50px;
    }
    .sticky-footer-ad__mobile iframe,
    .sticky-footer-ad__mobile ins {
        max-width: 100% !important;
    }
}

/* ── Score ticker: smooth slide transition ──────────────────────────── */
#ticker {
    transition: transform 0.3s ease;
}

/* ── Score strip background ─────────────────────────────────────────── */
.scoreStripGames {
    background: linear-gradient(to bottom, #fff 0%, #f1f1f1 50%, #fff 100%);
}
body.dark-theme .scoreStripGames {
    background: var(--body_color);
}

/* ── Multiview: currently-playing stream badge in cell controls bar ─── */
/* Controls bar is always dark (#000000b3) but body text colour changes with
   light/dark theme — so we must pin both bg and colour explicitly. */
.mv-cell__stream-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,.22);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 10px;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    margin-left: 4px;
    line-height: 1.5;
    white-space: nowrap;
    flex-shrink: 0;
    vertical-align: middle;
    letter-spacing: .02em;
}

/* ── Multiview: stream link states inside the modal ────────────────── */
/* Need relative so the in-use badge can be positioned */
.mv-source-link { position: relative; }

/* Currently playing in THIS player: orange highlight + checkmark */
.mv-source-link.mv-source-link--active {
    background: var(--custom-theme-color, #ff5722) !important;
    color: #fff !important;
    border-color: transparent !important;
    font-weight: 600;
}
.mv-source-link.mv-source-link--active::before {
    content: '\2713\00A0';
}

/* Playing in ANOTHER player: small Px badge top-right corner */
.mv-source-link--in-use {
    border-color: rgba(255,87,34,.45) !important;
}
.mv-source-link--in-use::after {
    content: attr(data-used-by);
    position: absolute;
    top: -7px;
    right: -5px;
    background: #888;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    border-radius: 7px;
    padding: 1px 4px;
    line-height: 1.4;
    pointer-events: none;
}
