<?php

/*----------------------------------------------------------------------------------*/

$elearning_school_common_inline_css = ''; 

$elearning_school_responsive_scroll_to_top_setting = get_theme_mod( 'elearning_school_responsive_scroll_to_top_setting', true );

if ( $elearning_school_responsive_scroll_to_top_setting == true && get_theme_mod( 'elearning_school_scroll_to_top_setting', true ) != true ) {
    $elearning_school_common_inline_css .= "a.scrollup,button#scroll_2 {
        display: none !important;
    }";
}

if ( $elearning_school_responsive_scroll_to_top_setting == true ) {
    $elearning_school_common_inline_css .= "@media screen and (max-width: 768px) {
        a.scrollup,button#scroll_2 {
            display: block !important;
        }
    }";
} elseif ( $elearning_school_responsive_scroll_to_top_setting == false ) {
    $elearning_school_common_inline_css .= "@media screen and (max-width: 768px) {
        a.scrollup,button#scroll_2 {
            display: none !important;
        }
    }";
}

/*----------------------------------------------------------------------------------*/ 

$elearning_school_responsive_preloader_setting = get_theme_mod( 'elearning_school_responsive_preloader_setting', false );

if ( $elearning_school_responsive_preloader_setting == true && get_theme_mod( 'elearning_school_preloader_setting', false ) == false ) {
    $elearning_school_common_inline_css .= "@media screen and (min-width: 768px) {
        .loading {
            display: none !important;
        }
    }";
}

if ( $elearning_school_responsive_preloader_setting == false ) {
    $elearning_school_common_inline_css .= "@media screen and (max-width: 768px) {
        .loading {
            display: none !important;
        }
    }";
}

/*---------------------------Global Color-------------------*/

$elearning_school_theme_color_1 = get_theme_mod('elearning_school_theme_color_1');
$elearning_school_theme_color_2 = get_theme_mod('elearning_school_theme_color_2');

/*--- First Global Color ---*/

if ($elearning_school_theme_color_1) {
  $elearning_school_common_inline_css .= ':root {';
  $elearning_school_common_inline_css .= '--first-color: ' . esc_attr($elearning_school_theme_color_1) . ' !important;';
  $elearning_school_common_inline_css .= '} ';
}

/*--- Second Global Color ---*/

if ($elearning_school_theme_color_2) {
  $elearning_school_common_inline_css .= ':root {';
  $elearning_school_common_inline_css .= '--second-color: ' . esc_attr($elearning_school_theme_color_2) . ' !important;';
  $elearning_school_common_inline_css .= '} ';
}