<?php
function bongdako_shortcode_lichthidau($atts)
{
    $atts = shortcode_atts(
        array(
            'leagues' => null,
            'nations' => null,
        ),
        $atts
    );
    $leagues = $atts['leagues'];
    $nations = $atts['nations'];

    $saved_bgcolor_fixture = get_option('bg_color_fixture');
    $saved_textcolor1_fixture = get_option('text_color1_fixture');
    $assets = plugin_dir_url(__FILE__) . '/';
    $assets_root = trailingslashit(dirname(dirname(dirname(plugin_dir_url(__FILE__))))) . 'assets/';

    $font = get_option('typography_main_fixture', []);

    ob_start();


    ?>

    <?php
        static $sport_plugin_fixture_existed = false;
        echo genDefaultFilterValue($leagues, $nations);
        if (!$sport_plugin_fixture_existed) {
            ?>
            <link rel="preload" as="style" href="<?= BONGDAKO_BUILD ?>css/assets/css/iframe_fixture.css?v=<?= ASSETS_VERSION ?>" />
            <link rel="stylesheet" href="<?= BONGDAKO_BUILD ?>css/assets/css/iframe_fixture.css?v=<?= ASSETS_VERSION ?>" />
            <?php
            bongdako_banner_assets();
            bongdako_layout_assets();
            add_action('wp_footer', function() {
                bongdako_assets_js();
               ?>
                <script type="module" src="<?= BONGDAKO_BUILD ?>fixture_iframe/assets/js/index.js?v=<?= ASSETS_VERSION ?>" defer></script>
                <script src="<?= BONGDAKO_PLUGIN_DIR_URL ?>layouts/shortcode/fixture/common.js?v=<?= ASSETS_VERSION ?>" defer></script>
                <script src="<?= BONGDAKO_PLUGIN_DIR_URL ?>layouts/shortcode/fixture/hide.js?v=<?= ASSETS_VERSION ?>" defer></script>
               <?php
            });
    
            $sport_plugin_fixture_existed = true;
        }
    ?>
    

    <link href="<?= $assets ?>style.css?v=<?= ASSETS_VERSION ?>" rel="stylesheet">

    <style>
        #scrollIframe #filter-box-on-mobile .all-hot-filter>.button-df{
            text-overflow: ellipsis;
            white-space: nowrap;
            padding: 0px 5px;
            overflow: hidden;
        }
        #scrollIframe .fixture{
            padding-top: 0;
        }
        /* #scrollIframe .fake_iframe{
            top: -2px;
        } */
       
        #scrollIframe .allno {
            background-image: url("<?= IMGS3_PLUGINS ?>/assets/images/icon-trash.svg") !important;
        }
        #scrollIframe .fixture #sixinoneFilterLeague .bts-bottom .select-all input:before,
        #scrollIframe #showoptional2 .bts:nth-of-type(6) .select-all input:before ,
        #scrollIframe .fixture #sixinoneFilterLeague #myleague2 ul li input[type=checkbox]:before{
            background-image: url('<?= IMGS3_PLUGINS ?>/assets/football-vn/images/uncheck-square.svg') !important;
        }

        #scrollIframe .fixture #sixinoneFilterLeague .bts-bottom .select-all input:checked:before ,
        #scrollIframe #showoptional2 .bts:nth-of-type(6) .select-all input:checked:before ,
        #scrollIframe .fixture #sixinoneFilterLeague #myleague2 ul li input[type=checkbox]:checked:before{
            background-image: url('<?= IMGS3_PLUGINS ?>/assets/football-vn/images/check-square.svg') !important;
        }

        #scrollIframe #table_live tr i.icon.iconfont.icon-font-collect-off::before {
            content: "";
            background-image: url("<?= IMGS3_PLUGINS ?>/images/rating-light.png");
            background-size: contain;
            background-repeat: no-repeat;
        }

        #scrollIframe #table_live tr.Leaguestitle i.icon.iconfont.icon-font-collect-off::before {
            background-image: url("<?= IMGS3_PLUGINS ?>/images/rating-title-light.png");
        }

        <?php if ($saved_bgcolor_fixture): ?>
        #scrollIframe.fixture-iframe {
            background-color: <?php echo esc_attr($saved_bgcolor_fixture); ?> !important;
        }

        #scrollIframe.fixture-iframe #tools {
            background-color: <?php echo esc_attr($saved_bgcolor_fixture); ?> !important;
        }

        #scrollIframe.fixture-iframe #appHome {
            background-color: <?php echo esc_attr($saved_bgcolor_fixture); ?> !important;
        }

        #scrollIframe.fixture-iframe #mintable {
            background-color: <?php echo esc_attr($saved_bgcolor_fixture); ?> !important;
        }

        <?php else: ?>
        #scrollIframe.fixture-iframe {
            background-color: #e6e6e6 !important;
        }

        #scrollIframe.fixture-iframe #tools {
            background-color: #e6e6e6 !important;
        }

        #scrollIframe.fixture-iframe #appHome {
            background-color: #e6e6e6 !important;
        }

        #scrollIframe.fixture-iframe #mintable {
            background-color: #e6e6e6 !important;
        }

        <?php endif; ?>

        <?php if ($saved_textcolor1_fixture): ?>
        #scrollIframe.fixture-iframe .football-team-name {
            color: <?php echo esc_attr($saved_textcolor1_fixture); ?> !important;
        }

        <?php else: ?>
        #scrollIframe.fixture-iframe .football-team-name {
            color: #070f03 !important;
        }

        <?php endif; ?>
    </style>
    <style>

        #scrollIframe.wrap-iframe-fixture *, #scrollIframe.wrap-iframe-fixture input::placeholder {
            font-family: <?php echo $font['font-family'] ?? ""; ?> !important;
        }

        body #scrollIframe.wrap-iframe-schedule #date-picker-id .date-picker ul li span,
        body #scrollIframe.wrap-iframe-schedule .item-pk span {
            color: var(--text_tool_schedule, #070f03) !important;
        }

        body #scrollIframe.wrap-iframe-schedule #date-picker-id .date-picker ul li:hover span,
        body #scrollIframe.wrap-iframe-schedule #date-picker-id .date-picker ul li.on span,
        body body #scrollIframe.wrap-iframe-schedule .item-pk:hover span {
            color: var(--text_tool_hover_schedule, #fff) !important;
        }

        body #scrollIframe.wrap-iframe-schedule #date-picker-id .date-picker ul li,
        body #scrollIframe.wrap-iframe-schedule .item-pk {
            background-color: var(--bg_tool_schedule);
        }

        body #scrollIframe.wrap-iframe-schedule #date-picker-id .date-picker ul li:hover,
        body #scrollIframe.wrap-iframe-schedule #date-picker-id .date-picker ul li.on,
        body #scrollIframe.wrap-iframe-schedule .item-pk:hover,
        body #scrollIframe.wrap-iframe-schedule .timeBox .item-pk:hover,
        body #scrollIframe.wrap-iframe-schedule .item-pk.on {
            background-color: var(--bg_tool_hover_schedule, #c73c10);
        }

        #scrollIframe #date-picker-id .date-picker ul li:not(.li_today) {
            background-color: <?php echo get_option('background_filter_date_color_fixture'); ?> !important;
        }

        #scrollIframe #date-picker-id .date-picker ul li.li_today {
            background-color: <?php echo get_option('background_filter_today_color_fixture'); ?> !important;
        }

        #scrollIframe #date-picker-id .date-picker ul li:not(.li_today) span:first-child {
            color: <?php echo get_option('text_filter_day_of_week_color_fixture'); ?> !important;
        }

        #scrollIframe #date-picker-id .date-picker ul li:not(.li_today) span:last-child {
            color: <?php echo get_option('text_filter_day_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture #min .tools li.filterLi2.xz .dropdown-toggle {
            background: transparent;
        }

        body #scrollIframe.wrap-iframe-fixture.wrap-iframe,
        body #scrollIframe.wrap-iframe-fixture .match-list-head,
        body #scrollIframe.wrap-iframe-fixture.resultIframe #tools,
        body #scrollIframe.wrap-iframe-fixture.fixture-iframe #tools,
        body #scrollIframe.wrap-iframe-fixture .Leaguestitle,
        body #scrollIframe.wrap-iframe-fixture.fixture-iframe #appHome,
        body #scrollIframe.wrap-iframe-fixture.rate_iframe #appHome,
        body #scrollIframe.wrap-iframe-fixture.resultIframe #mintable,
        body #scrollIframe.wrap-iframe-fixture.resultIframe #appHome,
        body #scrollIframe.wrap-iframe-fixture.fixture-iframe #mintable {
            background: <?php echo get_option('background_color_fixture'); ?> !important;
            background-color: <?php echo get_option('background_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .button-df.active,
        body #scrollIframe.wrap-iframe-fixture #app6in1 .custom-select-02.show.button-df {
            border: 1px solid <?php echo get_option('background_main_color_fixture'); ?> !important;
            background: <?php echo get_option('background_main_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .btn-item-now.active,
        body #scrollIframe.wrap-iframe-fixture .tools .switch-view-btn span.on,
        body #scrollIframe.wrap-iframe-fixture #min .tools ul li#li_ShowAll.on,
        body #scrollIframe.wrap-iframe-fixture #min .tools ul li#li_FilterHot.on,
        body #scrollIframe.wrap-iframe-fixture #min .tools ul li#li_FilterLea.on,
        body #scrollIframe.wrap-iframe-fixture #min .tools ul li#li_FilterCdi.on,
        body #scrollIframe.wrap-iframe-fixture #min .tools ul li#li_FilterCdi.active,
        body #scrollIframe.wrap-iframe-fixture #min .tools ul li#li_ShowAll:hover,
        body #scrollIframe.wrap-iframe-fixture #min .tools ul li#li_FilterHot:hover,
        body #scrollIframe.wrap-iframe-fixture #min .tools ul li#li_FilterLea:hover,
        body #scrollIframe.wrap-iframe-fixture #min .tools ul li#li_FilterCdi:hover,
        body #scrollIframe.wrap-iframe-fixture .filterLi2.xz .dropdown-toggle:hover,
        body #scrollIframe.wrap-iframe-fixture #min .tools ul li.on,
        body #scrollIframe.wrap-iframe-fixture #min .tools ul li.active,
        body #scrollIframe.wrap-iframe-fixture #min .tools ul li:hover {
            background-color: <?php echo get_option('background_main_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture #showFilterBox .rbl .el-radio > input[type=radio]:checked + .el-radio-style {
            background: <?php echo get_option('background_main_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture #showoptional2 .bts:nth-of-type(3) span input:checked + label {
            border: 1px solid <?php echo get_option('background_main_color_fixture'); ?> !important;
            color: <?php echo get_option('background_main_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture #table_live tr.tds td .match-state,
        body #scrollIframe.wrap-iframe-fixture .time-bx,
        body #scrollIframe.wrap-iframe-fixture #main .idx-homepage td .scored-s.no-score {
            /*color: var(--text_sub_fixture, #888) !important;*/
        }

        body #scrollIframe.wrap-iframe-fixture .cup-match-tags a {
            background-color: <?php echo get_option('background_league_color_fixture'); ?> !important;
            color: <?php echo get_option('text_league_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture #app6in1 .button-df:hover {
            border: 1px solid <?php echo get_option('background_main_color_fixture'); ?> !important;
            background: <?php echo get_option('background_main_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .tools .switch-view-btn span, {
            color: <?php echo get_option('background_main_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .filter-select-rate,
        body #scrollIframe.wrap-iframe-fixture .filter-select-company {
            border: 1px solid <?php echo get_option('background_main_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .live-match .odds.normal,
        body #scrollIframe.wrap-iframe-fixture .bet-match-item-repeated:nth-child(2n) .bet-match-item .odds.normal,
        body #scrollIframe.wrap-iframe-fixture #table_live .odds1,
        body #scrollIframe.wrap-iframe-fixture #table_live .odds2,
        body #scrollIframe.wrap-iframe-fixture #table_live .odds3,
        body #scrollIframe.wrap-iframe-fixture #homepage .game-rate #game-rate .container-sp .table-core-odds-value .odds-number,
        body #scrollIframe.wrap-iframe-fixture .odds-bg.odds-normal > span,
        body #scrollIframe.wrap-iframe-fixture #game-rate .odds-number,
        body #scrollIframe.wrap-iframe-fixture .odds.normal {
            background: <?php echo get_option('background_odd_color_fixture'); ?> !important;
            background-color: <?php echo get_option('background_odd_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .odds:hover {
            background: <?php echo get_option('background_odd_hover_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .odds.down,
        body #scrollIframe.wrap-iframe-fixture #table_live .odds1.resultColor,
        body #scrollIframe.wrap-iframe-fixture #table_live .odds2.resultColor,
        body #scrollIframe.wrap-iframe-fixture .odds2 > span.down,
        body #scrollIframe.wrap-iframe-fixture .odds-bg.odds-normal > span.down,
        body #scrollIframe.wrap-iframe-fixture #table_live .new-home-tr .odds1.odds-down,
        body #scrollIframe.wrap-iframe-fixture #table_live .new_oddsChangePopup .popup-odds-change .odds-down,
        body #scrollIframe.wrap-iframe-fixture #homepage .game-rate #game-rate .container-sp .table-core-odds-value .odds-number.odds-down,
        body #scrollIframe.wrap-iframe-fixture #game-rate .odds-number.odds-down {
            background: <?php echo get_option('background_odd_down_fixture'); ?> !important;
            background-color: <?php echo get_option('background_odd_down_fixture'); ?> !important;
        }

        html body #scrollIframe.wrap-iframe-fixture.wrap-iframe .mcontent .table-view .league-item .bet-match-list .bet-match-item-repeated .bet-match-item .bet-match-item-child .odds-title-item .odds.normal.down:hover {
            background: <?php echo get_option('background_odd_down_hover_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .odds.up,
        body #scrollIframe.wrap-iframe-fixture #table_live .odds3.resultColor,
        body #scrollIframe.wrap-iframe-fixture .odds-bg.odds-normal > span.up,
        body #scrollIframe.wrap-iframe-fixture #table_live .new-home-tr .odds1.odds-up,
        body #scrollIframe.wrap-iframe-fixture #homepage .game-rate #game-rate .container-sp .table-core-odds-value .odds-number.odds-up,
        body #scrollIframe.wrap-iframe-fixture #table_live .new_oddsChangePopup .popup-odds-change .odds-up,
        body #scrollIframe.wrap-iframe-fixture .odds2 > span.up,
        body #scrollIframe.wrap-iframe-fixture #game-rate .odds-number.odds-up {
            background: <?php echo get_option('background_odd_up_fixture'); ?> !important;
            background-color: <?php echo get_option('background_odd_up_fixture'); ?> !important;
        }

        html body #scrollIframe.wrap-iframe-fixture.wrap-iframe .mcontent .table-view .league-item .bet-match-list .bet-match-item-repeated .bet-match-item .bet-match-item-child .odds-title-item .odds.normal.up:hover {
            background: <?php echo get_option('background_odd_up_hover_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .live-status {
            color: <?php echo get_option('text_live_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .score-lst .score,
        body #scrollIframe.wrap-iframe-fixture .handpoint.score-color b.match-finished,
        body #scrollIframe.wrap-iframe-fixture #main .idx-homepage td.score-color b,
        body #scrollIframe.wrap-iframe-fixture #main .idx-homepage .handpoint.score-color b.match-not-finished {
            color: <?php echo get_option('text_score_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .match-during-time.running,
        body #scrollIframe.wrap-iframe-fixture.fixture-iframe #table_live tr.tds td:nth-child(3) span {
            color: <?php echo get_option('text_time_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .toggle-bet {
            background: <?php echo get_option('background_button_more_bet_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .toggle-bet > div,
        body #scrollIframe.wrap-iframe-fixture .toggle-bet span {
            color: <?php echo get_option('background_main_color_fixture'); ?> !important;
        }

        #scrollIframe.wrap-iframe-fixture .toggle-bet.active > div, #scrollIframe.wrap-iframe-fixture .toggle-bet.active span {
            color: #fff !important;
        }

        body #scrollIframe.wrap-iframe-fixture.wrap-iframe,
        body #scrollIframe.wrap-iframe-fixture .odds-title-item,
        body #scrollIframe.wrap-iframe-fixture .team-box > a,
        body #scrollIframe.wrap-iframe-fixture #table_live .upper-live-titlez td,
        body #scrollIframe.wrap-iframe-fixture #table_live tr.upper-live-title td,
        body #scrollIframe.wrap-iframe-fixture #table_live #CompanySel #dropSelect,
        body #scrollIframe.wrap-iframe-fixture #table_live tr td,
        body #scrollIframe.wrap-iframe-fixture #table_live tr:not(.Leaguestitle):not(.scoretitle) td[name="timeData"],
        body #scrollIframe.wrap-iframe-fixture .filterLi2.xz .dropdown-toggle,
        body #scrollIframe.wrap-iframe-fixture #table_live tr.scoretitle td,
        body #scrollIframe.wrap-iframe-fixture #min .tools li,
        body #scrollIframe.wrap-iframe-fixture #game-rate .table-score-container .odds-name,
        body #scrollIframe.wrap-iframe-fixture #game-rate span.text-uppercase,
        body #scrollIframe.wrap-iframe-fixture #main #table_live tr[id^=tr1_] td.toolimg span,
        body #scrollIframe.wrap-iframe-fixture #table_live .status-time-match span,
        body #scrollIframe.wrap-iframe-fixture #main #table_live tr[id^=tr1_].tds td[id^=ht_] a,
        body #scrollIframe.wrap-iframe-fixture #main #table_live tr[id^=tr1_].tds td[id^=gt_] a,
        body #scrollIframe.wrap-iframe-fixture.fixture-iframe #table_live tr.tds td,
        body #scrollIframe.wrap-iframe-fixture #fixture_iframe .team-name,
        #scrollIframe .filterLi2.xz .dropdown-menu .dropdown-menu-inner .option,
        #scrollIframe #min .tools li span,
        #scrollIframe .filter-row-date .btn-item-now,
        #scrollIframe #table_live tr:not(.Leaguestitle):not(.scoretitle) td.handpoint.blue,
        tr#tr_upper-live-titlez label,
        #scrollIframe .button-df,
        #scrollIframe .filter-cup-match .custom-select-02 .custom-select,
        body #scrollIframe.wrap-iframe-fixture #main #tableCoreSP .status-time-match {
            color: <?php echo get_option('text_main_color_fixture'); ?> !important;
        }

        /*#scrollIframe .filterLi2.active .dropdown-menu .dropdown-menu-inner .option,*/
        #scrollIframe #min .tools ul li.on span, #scrollIframe #min .tools ul li:hover span,
        #scrollIframe #min .tools li.filterLi2.xz .dropdown-toggle:hover {
            color: #ffffff !important;
        }

        body #scrollIframe.wrap-iframe-fixture.fixture-iframe #table_live tr.tds td:nth-child(3) span {
            color: <?php echo get_option('text_time_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .odds,
        body #scrollIframe.wrap-iframe-fixture #table_live .odds1,
        body #scrollIframe.wrap-iframe-fixture #table_live .odds2,
        body #scrollIframe.wrap-iframe-fixture #table_live .odds3,
        body #scrollIframe.wrap-iframe-fixture #homepage .game-rate #game-rate .container-sp .table-core-odds-value .odds-number,
        body #scrollIframe.wrap-iframe-fixture .odds-bg.odds-normal > span,
        body #scrollIframe.wrap-iframe-fixture #table_live .new-home-tr .odds1.odds-down,
        body #scrollIframe.wrap-iframe-fixture #table_live .new-home-tr .odds1.odds-up,
        body #scrollIframe.wrap-iframe-fixture #table_live .new_oddsChangePopup .popup-odds-change .odds-up,
        body #scrollIframe.wrap-iframe-fixture #table_live .new_oddsChangePopup .popup-odds-change .odds-down,
        body #scrollIframe.wrap-iframe-fixture #game-rate .odds-number {
            color: <?php echo get_option('text_odd_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .league-name,
        body #scrollIframe.wrap-iframe-fixture.resultIframe .football-team-name,
        body #scrollIframe.wrap-iframe-fixture.fixture-iframe .football-team-name,
        body #scrollIframe.wrap-iframe-fixture .football-team-name,
        body #scrollIframe.wrap-iframe-fixture .LGname,
        body #scrollIframe.wrap-iframe-fixture.rate_iframe .football-team-name {
            color: <?php echo get_option('text_title_league_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture #homepage .game-rate #live #tr_upper-live-title td {
            background: <?php echo get_option('background_item_2_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .wrap-loadmore .load-more-btn {
            background-color: <?php echo get_option('background_main_color_fixture'); ?> !important;
            background-image: url(/wp-content/plugins/sport-plugin/assets/images/double-alt-arrow-down.svg);
            background-repeat: no-repeat;
            background-position: right 20px top 6px;
        }

        body #scrollIframe.wrap-iframe-fixture .ods-detail-item {
            background: <?php echo get_option('background_more_bet_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .toggle-bet.active,
        #scrollIframe #showoptional2 .rbl .el-radio > input[type=radio]:checked + .el-radio-style,
        body #scrollIframe.wrap-iframe-fixture #game-rate .btn-live-chanel,
        body #scrollIframe.wrap-iframe-fixture #homepage .game-rate #live .btn-live {
            background: <?php echo get_option('background_main_color_fixture'); ?> !important;
        }

        #scrollIframe .tools .switch-view-btn span:not(.on) {
            color: <?php echo get_option('background_main_color_fixture'); ?> !important;
        }

        body .score-detail .secont-half,
        body #scrollIframe.wrap-iframe-fixture #table_live .corner-text {
            color: <?php echo get_option('text_score_corner_color_fixture'); ?> !important;
        }

        #scrollIframe .filterLi2.xz .dropdown-menu .dropdown-menu-inner .option.active, #scrollIframe .filterLi2.xz .dropdown-menu .dropdown-menu-inner .option:hover {

            color: <?php echo get_option('text_drop_color_fixture'); ?> !important;
            background-color: <?php echo get_option('background_drop_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture #table_live tr.tds td,
        body #scrollIframe.wrap-iframe-fixture #table_live tr:not(.Leaguestitle):not(.scoretitle),
        body #scrollIframe.wrap-iframe-fixture .league-item-head,
        body #scrollIframe.wrap-iframe-fixture .bet-match-item-repeated .bet-match-item,
        body #scrollIframe.wrap-iframe-fixture #table_live .upper-live-titlez,
        body #scrollIframe.wrap-iframe-fixture #table_live tr.scoretitle td,
        body #scrollIframe.wrap-iframe-fixture #game-rate .core-container,
        body #scrollIframe.wrap-iframe-fixture #game-rate #tableCore,
        body #scrollIframe.wrap-iframe-fixture #main #table_live tr[id^=tr1_],
        body #scrollIframe.wrap-iframe-fixture .match-box {
            background-color: <?php echo get_option('background_item_color_fixture'); ?> !important;
            background: <?php echo get_option('background_item_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .bet-match-item-repeated:nth-child(2n) .bet-match-item,
        body #scrollIframe.wrap-iframe-fixture #main .idx-homepage #table_live tr[id^=tr1_] .league-detail-mobile,
        body #scrollIframe.wrap-iframe-fixture #main .idx-favorite #table_live tr[id^=tr1_] .league-detail-mobile {
            background: <?php echo get_option('background_item_2_color_fixture'); ?> !important;
            background-color: <?php echo get_option('background_item_2_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .grey,
        body #scrollIframe.wrap-iframe-fixture .odds.no-bg,
        body #scrollIframe.wrap-iframe-fixture .odds.no-bg.down {
            color: <?php echo get_option('text_odd_option_color_fixture'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-fixture .team-hg, #scrollIframe .bftab .rank,
        body #scrollIframe.wrap-iframe-fixture #main #table_live .new-home-tr .odds1::before,
        body #scrollIframe.wrap-iframe-fixture #homepage .game-rate #game-rate .container-sp .table-core-odds-value .odds-number::before,
        body #scrollIframe.wrap-iframe-fixture #main #table_live tr[id^=tr1_].tds .status-time-sched {
            color: <?php echo get_option('text_sub_color_fixture'); ?> !important;
        }

        @media (min-width: 1001px) {

        <?php if (get_option('tags_cup_fixture') === "medium"){?>
            #scrollIframe .cup-match-tags a {
                font-size: 13px;
                line-height: 16px;
                padding: 6px 9px;
            }

        <?php }?>
        <?php if (get_option('tags_cup_fixture') === "small"){?>
            #scrollIframe .cup-match-tags a {
                font-size: 12px;
                line-height: 14px;
                padding: 5px 7px;
            }

        <?php }?>

        <?php if (get_option('search_team_fixture') === "medium"){?>
            #scrollIframe #iframe_6in1 .filter-box .filter-search-row .filter-search-name input {
                padding: 6px 12px 5px;
            }

            #scrollIframe .filter-search-name input {
                padding: 12px;
                line-height: 16px;
                font-size: 12px;
            }

        <?php }?>
        <?php if (get_option('search_team_fixture') === "small"){?>

            #scrollIframe #iframe_6in1 .filter-box .filter-search-row .filter-search-name input {
                padding: 5px 10px;
            }

            #scrollIframe .filter-search-name input {
                padding: 10px;
                line-height: 14px;
                font-size: 10px;
            }

        <?php }?>

        <?php if (get_option('search_league_fixture') === "medium"){?>
            #scrollIframe #iframe_6in1 .filter-box .filter-search-row .filter-cup-match .filter-cup-match-box {
                height: 28px;
                padding: 5px 10px;
            }

            #scrollIframe .filter-cup-match .custom-select-02 .custom-select {
                font-size: 12px;
            }

            #scrollIframe .sixmix-container .filter-box #sixinoneFilterLeague {
                top: 32px;

            }

        <?php }?>
        <?php if (get_option('search_league_fixture') === "small"){?>

            #scrollIframe #iframe_6in1 .filter-box .filter-search-row .filter-cup-match .filter-cup-match-box {
                height: 26px;
                padding: 5px 10px;
            }

            #scrollIframe .filter-cup-match .custom-select-02 .custom-select {
                font-size: 10px;
            }

            #scrollIframe .sixmix-container .filter-box #sixinoneFilterLeague {
                top: 30px;

            }

        <?php }?>
        <?php if (get_option('odd_1_1_fixture')){?>
            #scrollIframe .odds-title-item.two-line-start {
                flex: 1 1 <?php echo get_option('odd_1_1_fixture') ?>px;
                width: <?php echo get_option('odd_1_1_fixture') ?>px;
            }

        <?php }?>
        <?php if (get_option('odd_1_2_fixture')){?>
            #scrollIframe .odds-title-item.two-line-end {
                flex: 1 1 <?php echo get_option('odd_1_2_fixture') ?>px;
                width: <?php echo get_option('odd_1_2_fixture') ?>px;
            }

        <?php }?>
        <?php if (get_option('filter_date_fixture') === "medium"){?>
            #scrollIframe .btn-item-now, #scrollIframe .btn-item-now.ttnow {
                padding: 6px;
            }

            #scrollIframe .filter-select-rate, #scrollIframe .filter-select-company {

                font-size: 12px;

                line-height: 22px;
                padding: 6px 10px;

            }

        <?php }?>
        <?php if (get_option('filter_date_fixture') === "small"){?>

            #scrollIframe .btn-item-now, #scrollIframe .btn-item-now.ttnow {
                padding: 4px;
                min-height: 20px;
            }

            #scrollIframe .filter-select-rate, #scrollIframe .filter-select-company {
                font-size: 10px;
                line-height: 18px;
                padding: 5px 8px;

            }

        <?php }?>
        <?php if (get_option('odd_1_1_fixture') > 0){?>
            #scrollIframe #rate_iframe #table_live tr.tds > td {
                min-width: <?php echo get_option('odd_1_1_fixture') ?>px;
            }

        <?php }?>
        <?php if (get_option('team_home_fixture')){?>
            #scrollIframe.wrap-iframe [id^="ht_"], #scrollIframe.wrap-iframe [id^="ht_"] .team-box {
                max-width: <?php echo get_option('team_home_fixture')?>px !important;
                min-width: <?php echo get_option('team_home_fixture')?>px !important;
                width: <?php echo get_option('team_home_fixture')?>px !important;
            }

        <?php }?>
        <?php if (get_option('team_guest_fixture')){?>
            #scrollIframe.wrap-iframe [id^="gt_"], #scrollIframe.wrap-iframe [id^="gt_"] .team-box {
                max-width: <?php echo get_option('team_guest_fixture')?>px !important;
                min-width: <?php echo get_option('team_guest_fixture')?>px !important;
                width: <?php echo get_option('team_guest_fixture')?>px !important;
            }

        <?php }?>
        <?php if (get_option('tg_fixture')){?>
            #scrollIframe #main .idx-resultpage .status-time-sched span {
                font-size: <?php echo get_option('tg_fixture')?> !important;
            }

        <?php }?>
        <?php if (get_option('ti_so_fixture')){?>
            #scrollIframe td.score-color b {
                font-size: <?php echo get_option('ti_so_fixture')?> !important;
            }

        <?php }?>
        <?php if (get_option('goc_fixture')){?>
            #scrollIframe .secont-half.text-center.w-100-i {
                font-size: <?php echo get_option('goc_fixture')?> !important;
            }

        <?php }?>
        <?php if (get_option('gd_fixture')){?>
            #scrollIframe .football-team-name {
                font-size: <?php echo get_option('gd_fixture')?> !important;
            }

        <?php }?>
        <?php if (get_option('odd_1_2_fixture')){?>
            #scrollIframe #table_live tr {
                height: <?php echo get_option('league-item-head_fixture');?>
            }

        <?php }?>
        <?php if (get_option('action_size_fixture') === "lager"){?>
            #scrollIframe .icon-14 {
                width: 18px;
                height: 18px;
            }

            #scrollIframe .icon-16 {
                width: 20px;
                height: 20px;
            }

            #scrollIframe #table_live .analyze-icon::before, #scrollIframe #table_live .Detail-icon::before, #scrollIframe #table_live .analyze-icon::before {
                background-size: 20px;
            }

            #scrollIframe .odds-icon, #scrollIframe .odds-icon1x2, #scrollIframe .analyze-icon, #scrollIframe .Detail-icon, #scrollIframe .Detail-basketball-icon, #scrollIframe .x12-icon, #scrollIframe .matchdata-icon, #scrollIframe .closedata-icon, #scrollIframe .icon-font-reduce, #scrollIframe .highlight-icon {
                width: 20px;
            }

        <?php }?>
        <?php if (get_option('action_size_fixture') === "small"){?>

            #scrollIframe .icon-14 {
                width: 12px;
                height: 12px;
            }

            #scrollIframe .icon-16 {
                width: 14px;
                height: 14px;
            }

            #scrollIframe #table_live .analyze-icon::before, #scrollIframe #table_live .Detail-icon::before, #scrollIframe #table_live .analyze-icon::before {
                background-size: 14px;
            }

        <?php }?>

        }
        
        @container iframe-table (max-width: 870px) {
          
            #scrollIframe #filter-box-on-pc .filter-third>div{
                width: 180px !important;
                max-width: initial !important;
                min-width: initial !important;
            }
        }

        #scrollIframe .hidden-info span:hover:after, #scrollIframe .hidden-info-match:hover:after {
            content: "<?php esc_html_e('Ẩn lại giải đấu này', 'sport') ?>" !important;
        }

        #scrollIframe .show-info span:hover:after, #scrollIframe .display-info:hover:after, #scrollIframe .show-info-match:hover:after {
            content: "<?php esc_html_e('Hiển thị giải đấu này', 'sport') ?>" !important;
        }
        #scrollIframe .Detail-icon:hover:after {
            content: "<?php esc_html_e('Chi tiết', 'sport') ?>" !important;;
        }
        #scrollIframe .add-info:hover:after,
        #scrollIframe .add-info-l:hover:after {
            /* display: none !important; */
        }

        #scrollIframe #showoptional2 .bts:nth-of-type(6) .select-all {
            max-width: 135px !important;
        }

        #scrollIframe #showoptional2 .rbl .el-radio > input[type=radio] + .el-radio-style {
            font-size: 12px;
        }
        body #scrollIframe .league-info-link, body #scrollIframe .league-info-link * {
            pointer-events: none !important;
        }


    </style>
    <?php
    $maxOption = get_option('max_leagues_fixture');
    $number_match = !empty($maxOption) ? $maxOption : 10;
    ?>
    <div id="scrollIframe" class="wrap-iframe fixture-iframe wrap-iframe-fixture tm_12-scroll tm_12-fixture-wrapper">
        <div id="soccer" class="tm_12-soccer tm_12-section">
            <div id="homepage" class="mcontent tm_12-homepage tm_12-content">
                <div id="main" class="main-home-page-mobile tm_12-main tm_12-mobile">
                    <div id="appHome" class="w-100 mx-auto tm_12-appHome tm_12-center">
                        <div id="fake_iframeFixture" class="index idx-homepage css-home-page home-page-mobile fake_iframe tm_12-fake tm_12-iframe">
                            <div id="min" class="fixture tm_12-min tm_12-fixture">
                                <div class="top-nav-vuejs tm_12-top-nav"><?php header_fixture(); ?></div>

                                <?php echo renderLiveScoreHeaderFixture(); ?>
                                <div id="mintable" class="tm_12-mintable">
                                    <div id="live" class="tm_12-live">
                                        <table id="table_live" class="table-time euro-view tm_12-table" width="100%"
                                               align="center"
                                               cellspacing="0" border="0" cellpadding="0">
                                            <tbody class="tm_12-tbody">
                                            <?php echo renderLiveTableHeaderLiveFixture(); ?>
                                            <?php echo renderHeaderLiveTableTitleFixture(); ?>
                                            <?php fetchdataFixture($number_match,$leagues, $nations); ?>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="fixture_iframe" style="opacity: 1 !important;"
                             class="index idx-homepage css-home-page home-page-mobile tm_12-iframe-main tm_12-fixture-iframe"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>



    <?php
    $content = ob_get_contents();
    ob_end_clean();
    return $content;
}

add_shortcode('bongdako_fixture', 'bongdako_shortcode_lichthidau');

require_once plugin_dir_path(__FILE__) . 'includes/functions.php';