<?php

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

$education_skill_development_common_inline_css = '';

$education_skill_development_scroll_top_alignment = get_theme_mod('education_skill_development_scroll_top_alignment', 'Right');

$education_skill_development_alignment_styles = [
    'Left' => 'left: 20px;',
    'Center' => 'right: 0; left: 0; margin: 0 auto;',
    'Right' => 'right: 20px;'
];

$alignment_style = $education_skill_development_alignment_styles[$education_skill_development_scroll_top_alignment] ?? $education_skill_development_alignment_styles['Right'];

$education_skill_development_common_inline_css .= "a.scrollup,button#scroll_2 { $alignment_style }";

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

$education_skill_development_footer_background_color = get_theme_mod('education_skill_development_footer_background_color', '#242424');

if (!empty($education_skill_development_footer_background_color)) {
    $education_skill_development_common_inline_css .= ".footer-widgets { background: " . esc_attr($education_skill_development_footer_background_color) . "}";
}

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

$education_skill_development_footer_background_image = get_theme_mod('education_skill_development_footer_background_image', '');

if (!empty($education_skill_development_footer_background_image)) {
    $education_skill_development_common_inline_css .= ".footer-widgets { background-image: url('" . esc_url($education_skill_development_footer_background_image) . "') !important; background-size: cover; background-repeat: no-repeat; }";
}

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

$education_skill_development_copyright_alignment = get_theme_mod('education_skill_development_copyright_alignment', 'Center');

$education_skill_development_copyright_alignment_styles = [
    'Left' => 'text-align: left;',
    'Center' => 'text-align: center;',
    'Right' => 'text-align: right;'
];

$alignment_style = $education_skill_development_copyright_alignment_styles[$education_skill_development_copyright_alignment] ?? $education_skill_development_copyright_alignment_styles['Center'];

$education_skill_development_common_inline_css .= "#footer-copyright p { $alignment_style }";

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

$education_skill_development_container_width = get_theme_mod('education_skill_development_container_width');

if (!empty($education_skill_development_container_width)) {
    $education_skill_development_common_inline_css .= "@media (min-width: 1024px) { 
        body, .navbar-area.header-fixed, .admin-bar .header-fixed,.loading { 
            width: " . esc_attr($education_skill_development_container_width) . "%; 
            margin: 0 auto; 
        } 
        .admin-bar .header-fixed { 
            margin-top: 32px; 
        } 
    }";
}

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

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

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

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

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

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

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

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

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

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

$education_skill_development_theme_color_1 = get_theme_mod('education_skill_development_theme_color_1');

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

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