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

    $saved_bgcolor_6in1 = get_option('bg_color_6in1');
    $saved_textcolor1_6in1 = get_option('text_color1_6in1');
    $assets = plugin_dir_url(__FILE__) . '/';
    $font = get_option('typography_main_sixinone', []);

    ob_start();
 

    $padding_6in1_filter_box = '0px';

    if($atts['style'] && $atts['style'] == 1) {
        $padding_6in1_filter_box = '15px';
    }

    ?>
   
    <?php
        static $sport_plugin_6in1_existed = false;
        echo genDefaultFilterValue($leagues, $nations);
        if (!$sport_plugin_6in1_existed) {
            ?>
            <link rel="preload" as="style" href="<?= BONGDAKO_BUILD ?>css/assets/css/iframe_6in1.css?v=<?= ASSETS_VERSION ?>" />
            <link rel="stylesheet" href="<?= BONGDAKO_BUILD ?>css/assets/css/iframe_6in1.css?v=<?= ASSETS_VERSION ?>" />
            <script>const d = new Date();d.setTime(d.getTime() + (24 * 60 * 60 * 1000));document.cookie = `six_in_one_type=1; expires=${d.toUTCString()}; path=/`;</script>
            <?php
            bongdako_banner_assets();
            bongdako_layout_assets();
            add_action('wp_footer', function() {
                bongdako_assets_js();
               ?>
                <script type="module" src="<?= BONGDAKO_BUILD ?>6in1_iframe/assets/js/index.js?v=<?= ASSETS_VERSION ?>" defer></script>
                <script src="<?= BONGDAKO_PLUGIN_DIR_URL ?>/layouts/shortcode/6in1/common.js?v=<?= ASSETS_VERSION ?>" defer></script>
                <script src="<?= BONGDAKO_PLUGIN_DIR_URL ?>/layouts/shortcode/6in1/hide.js?v=<?= ASSETS_VERSION ?>" defer></script>
               <?php
            });
    
            $sport_plugin_6in1_existed = true;
        }
    ?>
    <link href="<?= $assets ?>style.css?v=<?= ASSETS_VERSION ?>" rel="stylesheet">

    <style>
        #scrollIframe #iframe_6in1 .odds-number-name{
            display: none;
        }
        @container iframe-table (max-width: 700px) {
            #scrollIframe .d-corner,
            #scrollIframe #fake_iframe6in1 .bet-match-list,
            #scrollIframe #fake_iframe6in1 .match-list-head{
                display: none !important;
            }
            #scrollIframe #fake_iframe6in1 .match-list-sm {
                display: block;
            }
            
        }
        #scrollIframe .odds.normal {
            font-weight: 400 !important;
        }

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

        <?php endif; ?>

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

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

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

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

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

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

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

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

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

        #scrollIframe #filter-box-on-pc {
            padding: <?php echo $padding_6in1_filter_box; ?>
        }

        body #scrollIframe.wrap-iframe-6in1 .filter-select-rate,
        #scrollIframe #filter-box-on-pc .filter-third > div #selectLeague,
        #scrollIframe #filter-box-on-pc .filter-third > div.min126px,
        #scrollIframe #filter-box-on-mobile .filter-cup-match-box,
        body #scrollIframe.wrap-iframe-6in1 .filter-select-company {
            border: 1px solid <?php echo get_option('background_main_color_sixinone'); ?> !important;
        }

        #scrollIframe .sixmix-container #sixinoneFilterLeague .bts-top span input:checked + label {
            color: <?php echo get_option('background_main_color_sixinone'); ?> !important;
            border: 1px solid <?php echo get_option('background_main_color_sixinone'); ?> !important;
        }

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

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

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

        html body #scrollIframe.wrap-iframe-6in1.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_sixinone'); ?> !important;
        }

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

        html body #scrollIframe.wrap-iframe-6in1.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_sixinone'); ?> !important;
        }

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

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

        body #scrollIframe.wrap-iframe-6in1 .match-during-time.running,
        #scrollIframe .match-list-sm .match-list-box-repeated-sm .match-list-top-sm .match-list-top-main-sm .match-list-top-main-time-sm .match-during-time {
            color: <?php echo get_option('text_time_color_sixinone'); ?> !important;
        }

        #scrollIframe .filter-third .custom-select-02 .custom-options .custom-option.active, #scrollIframe .filter-third .custom-select-02 .custom-options .custom-option:hover,
        #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_sixinone'); ?> !important;
            background-color: <?php echo get_option('background_drop_color_sixinone'); ?> !important;
        }

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

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

        #scrollIframe #filter-box-on-pc .filter-third > div #selectLeague:hover {
            border: 1px solid <?php echo get_option('background_main_color_sixinone'); ?> !important;
        }

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

        #scrollIframe #filter-box-on-pc .filter-second .all-hot-filter .d-flex.xll-r .button-df:first-child:hover {
            border: 1px solid <?php echo get_option('background_main_color_sixinone'); ?> !important;
        }

        #scrollIframe #filter-box-on-pc .all-hot-filter .button-df.active_ {
            background-color: <?php echo get_option('background_main_color_sixinone'); ?> !important;
            border: 1px solid <?php echo get_option('background_main_color_sixinone'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-6in1.wrap-iframe,
        body #scrollIframe.wrap-iframe-6in1 .odds-title-item,
        body #scrollIframe.wrap-iframe-6in1 .team-box > a,
        body #scrollIframe.wrap-iframe-6in1 .button-df,
        body #scrollIframe.wrap-iframe-6in1 .sixmix-container .filter-heading.d-flex.ai-c,
        body #scrollIframe.wrap-iframe-6in1 .sixmix-container .filter-heading.d-flex.ai-c *,
        body #scrollIframe.wrap-iframe-6in1 #filter-box-on-pc .filter-third > div .custom-select,
        body #scrollIframe.wrap-iframe-6in1 .btn-item-now,
        body #scrollIframe.wrap-iframe-6in1 .btn-item-now span,
        body #scrollIframe.wrap-iframe-6in1 #table_live .upper-live-titlez td,
        body #scrollIframe.wrap-iframe-6in1 #table_live tr.upper-live-title td,
        body #scrollIframe.wrap-iframe-6in1 #table_live #CompanySel #dropSelect,
        body #scrollIframe.wrap-iframe-6in1 #table_live tr td,
        body #scrollIframe.wrap-iframe-6in1 #table_live tr:not(.Leaguestitle):not(.scoretitle) td[name="timeData"],
        body #scrollIframe.wrap-iframe-6in1 .filterLi2.xz .dropdown-toggle,
        body #scrollIframe.wrap-iframe-6in1 #table_live tr.scoretitle td,
        body #scrollIframe.wrap-iframe-6in1 #min .tools li,
        body #scrollIframe.wrap-iframe-6in1 #game-rate .table-score-container .odds-name,
        body #scrollIframe.wrap-iframe-6in1 #game-rate span.text-uppercase,
        body #scrollIframe.wrap-iframe-6in1 #main #table_live tr[id^=tr1_] td.toolimg span,
        body #scrollIframe.wrap-iframe-6in1 #table_live .status-time-match span,
        body #scrollIframe.wrap-iframe-6in1 #main #table_live tr[id^=tr1_].tds td[id^=ht_] a,
        body #scrollIframe.wrap-iframe-6in1 #main #table_live tr[id^=tr1_].tds td[id^=gt_] a,
        body #scrollIframe.wrap-iframe-6in1.fixture-iframe #table_live tr.tds td,
        body #scrollIframe.wrap-iframe-6in1 #fixture_iframe .team-name,
        #scrollIframe .filter-cup-match .custom-select-02 .custom-select,
        #scrollIframe .match-list-sm .match-list-box-repeated-sm .match-list-main-sm .match-list-main--title > div,
        body #scrollIframe.wrap-iframe-6in1 #main #tableCoreSP .status-time-match {
            color: <?php echo get_option('text_main_color_sixinone'); ?> !important;
        }

        body #scrollIframe.wrap-iframe-6in1 .sixmix-container .filter-heading.d-flex.ai-c .red {
            color: red !important;
        }

        body #scrollIframe.wrap-iframe-6in1 .btn-item-now.active,
        body #scrollIframe.wrap-iframe-result #min .tools ul li:hover
        body #scrollIframe.wrap-iframe-6in1 #filter-box-on-pc .filter-third > div #selectLeague:hover .custom-select,
        body #scrollIframe.wrap-iframe-6in1 #filter-box-on-pc .filter-third > div.custom-select-02:hover .custom-select {
            color: #ffffff !important;
        }

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

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

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

        body #scrollIframe.wrap-iframe-6in1 .wrap-loadmore .load-more-btn {
            background-color: <?php echo get_option('background_main_color_sixinone'); ?> !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-6in1 .ods-detail-item {
            background: <?php echo get_option('background_more_bet_color_sixinone'); ?> !important;
        }

        #scrollIframe #filter-box-on-pc .filter-third > div #selectLeague:hover,
        body #scrollIframe.wrap-iframe-6in1 .toggle-bet.active,
        body #scrollIframe.wrap-iframe-6in1 #game-rate .btn-live-chanel,
        body #scrollIframe.wrap-iframe-6in1 #homepage .game-rate #live .btn-live {
            background: <?php echo get_option('background_main_color_sixinone'); ?> !important;
        }

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

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

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

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

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

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

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

        <?php }?>

        <?php if (get_option('search_team_sixinone') === "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_sixinone') === "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_sixinone') === "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_sixinone') === "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 }?>
            #scrollIframe .btn-item-now {
                max-height: 36px;
            }

            #scrollIframe .button-df {
                height: 34px !important;
                line-height: 34px !important;
            }


        <?php if (get_option('filter_date_sixinone') === "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_sixinone') === "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('filter_date_sixinone') === "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_sixinone') === "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('action_size_sixinone') === "lager"){?>
            #scrollIframe .icon-14 {
                width: 18px;
                height: 18px;
            }

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

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

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

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

        <?php }?>

            #scrollIframe .odds-title.two-line-bet {
                min-width: <?php echo get_option('odd_1_0_sixinone',113) + get_option('odd_1_1_sixinone',113) + get_option('odd_1_2_sixinone',66) ?>px !important;
                max-width: <?php echo get_option('odd_1_0_sixinone',113) + get_option('odd_1_1_sixinone',113) + get_option('odd_1_2_sixinone',66) ?>px !important;
            }

            #scrollIframe .odds-title.two-line-bet .odds-title-item.two-line-start:first-child .odds.normal span {
                width: 50%;
            }
           
        }

        @container iframe-table (max-width: 870px) {
            #scrollIframe #filter-box-on-pc .custom-select{
                white-space: nowrap;
                padding: 0 !important;
            }
            #scrollIframe .bet-match-list .odds-title,
            #scrollIframe .match-list-head .odds-title{
                max-width: initial !important;
                min-width: initial !important;
                width: 350px;
            }
           
            #scrollIframe .bet-match-list .w-score,
            .match-list-head .w-score,
            .odds-title-haft.filter-type-1{
                display: none !important;
            }
            #scrollIframe .bet-match-list .res-container,
            #scrollIframe .bet-match-list .res-container .w-score{
                display: flex !important;
            }
            #scrollIframe .bet-match-list .res-container .w-score.d-corner{
                display: none !important;
            }
            #scrollIframe .bet-match-list.filter-type-2 .odds-title,
            #scrollIframe .match-list-head .odds-title.two-line-bet{
                width: 250px;
            }
       
            #scrollIframe .bet-match-list .team-name span{
                font-size: 12px;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            #scrollIframe .bet-match-item-repeated,
            #scrollIframe  .ads-block,
            #scrollIframe  .ads-block img{
                max-width: 100%;
            }
           
        }

        #scrollIframe .odds-title.two-line-bet .odds-title-item.two-line-start:first-child {
            flex: 1 1 <?php echo get_option('odd_1_0_sixinone',113) ?>px;
            width: <?php echo get_option('odd_1_0_sixinone',113) ?>px;
        }

        #scrollIframe .odds-title.two-line-bet .odds-title-item.two-line-start:last-child {
            flex: 1 1 <?php echo get_option('odd_1_1_sixinone',113) ?>px;
            width: <?php echo get_option('odd_1_1_sixinone',113) ?>px;
        }

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

        #scrollIframe #iframe_6in1 .info-teams {
            flex: 1;
            width: auto;
            min-width: 100px !important;
        }

        <?php if (get_option('odd_1_0_sixinone',113) <=66): ?>
        #scrollIframe .odds-title-item {
            font-size: 11px;
        }

        <?php endif; ?>
        <?php if (get_option('team_home_sixinone') && 1==2){?>
        #scrollIframe .info-teams {
            max-width: <?php echo get_option('team_home_sixinone',200)?>px;
        }

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

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

        <?php }?>
        <?php if (get_option('league-item-head_sixinone')){?>
        #scrollIframe .league-item-head {
            height: <?php echo get_option('league-item-head_sixinone')?>;
        }

        <?php }?>


        <?php if (get_option('tg_sixinone')){?>
        #scrollIframe .match-during-time {
            font-size: <?php echo get_option('tg_sixinone')?> !important;
        }

        <?php }?>
        <?php if (get_option('ti_so_sixinone')){?>
        body #scrollIframe.wrap-iframe-6in1 .score-lst .score {
            font-size: <?php echo get_option('ti_so_sixinone')?> !important;
        }

        <?php }?>
        <?php if (get_option('ti_le_sixinone')){?>
        #scrollIframe .odds-title-item.two-line-start .odds.normal span, #scrollIframe .odds {
            font-size: <?php echo get_option('ti_le_sixinone')?> !important;
        }

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

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

        <?php }?>
        }

      

        @media only screen and (max-width: 1024px) {
            #scrollIframe #filter-box-on-mobile .custom-select-02 .custom-options {
                max-width: 100%;
            }
        }

        @media only screen and (max-width: 500px) {
            #scrollIframe #filter-box-on-mobile .custom-select-02.filter-select-rate .custom-options {
                width: 100% !important;
                max-width: unset;
            }

            #scrollIframe .sixmix-container #sixinoneFilterLeague .bts-bottom #button {
                padding: 5px !important;
            }

            #scrollIframe #app6in1 .custom-select-02.button-df.filter-select-rate, #scrollIframe #app6in1 .custom-select-02.button-df.filter-select-company {
                position: relative;
                height: 32px;
            }

            /* #scrollIframe #app6in1 .custom-select-02.button-df.filter-select-rate .custom-select, #scrollIframe #app6in1 .custom-select-02.button-df.filter-select-company .custom-select {
                position: absolute;
                width: 100%;
                height: 100%;
                z-index: 1;
                max-width: 100%;
                top: 0;
                left: 0;
                padding: 0 8px;
                line-height: 32px;
                font-size: 12px;
            } */

            #scrollIframe #filter-box-on-mobile .btn-item-now {
                padding: 8px 5px !important;
            }

            #scrollIframe #filter-box-on-mobile .xll-r, #scrollIframe #filter-box-on-mobile .filter-row-select {
                width: 100%;
            }

            #scrollIframe #filter-box-on-mobile .custom-select-02 .custom-options {
                width: 100%;
            }

            #scrollIframe #filter-box-on-mobile #sixinoneFilterLeague {
                max-width: unset !important;
            }
        }

        .score-lst.text-center > div {
            margin-left: unset;
            margin-right: unset;
        }
        
    /* #fake_iframe6in1{
        position: absolute !important;
        display: block !important;
        z-index: 99 !important;
        opacity: 1 !important;
    }     */
    </style>

    <div id="scrollIframe" class="wrap-iframe wrap-iframe-6in1 tm_12-scroll tm_12-iframe-wrapper">
        <div id="appHome" class="tm_12-appHome">
            <div id="app6in1" class="mcontent tm_12-app6in1 tm_12-main-content">
                <div id="fake_iframe6in1" class="fake_iframe tm_12-fake tm_12-6in1">
                    <div class="sixmix-container custom_6in1 tm_12-container tm_12-sixmix">
                        <?php header_6in1(); ?>
                        <?php fetchdata6in1($leagues ?? "",$nations ?? ""); ?>
                    </div>
                </div>
                <div id="iframe_6in1" class="tm_12-iframe tm_12-end"></div>
            </div>
        </div>
    </div>



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

add_shortcode('bongdako_6in1', 'bongdako_shortcode_6in1');

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