<?php 

	$nutrition_diet_custom_style= "";

//---------------------theme-button-color-------------//

// sticky header

if (false === get_option('nutrition_diet_sticky_header')) {
    add_option('nutrition_diet_sticky_header', 'off');
}

// Define the custom CSS based on the 'nutrition_diet_sticky_header' option

if (get_option('nutrition_diet_sticky_header', 'off') !== 'on') {
    $nutrition_diet_custom_style .= '.fixed_header.fixed {';
    $nutrition_diet_custom_style .= 'position: static;';
    $nutrition_diet_custom_style .= '}';
}

if (get_option('nutrition_diet_sticky_header', 'off') !== 'off') {
    $nutrition_diet_custom_style .= '.fixed_header.fixed {';
    $nutrition_diet_custom_style .= 'position: fixed; background: var(--theme-primary-color); padding-right:85px;';
    $nutrition_diet_custom_style .= '}';

    $nutrition_diet_custom_style .= '.admin-bar .fixed {';
    $nutrition_diet_custom_style .= ' margin-top: 32px;';
    $nutrition_diet_custom_style .= '}';
}

//colors
$color = get_theme_mod('fitmeal_dietitian_primary_color', '#efb443');
$color_secondary = get_theme_mod('fitmeal_dietitian_secondary_color', '#6d8c54');
$color_heading = get_theme_mod('fitmeal_dietitian_heading_color', '#282b2d');
$color_product_bg = get_theme_mod('fitmeal_dietitian_product_bg', '#ebebeb');
$color_fade = get_theme_mod('fitmeal_dietitian_primary_fade', '#efdcb3');
$color_footer_bg = get_theme_mod('fitmeal_dietitian_footer_bg', '#282b2d');


$nutrition_diet_custom_style .= ":root {";
    $nutrition_diet_custom_style .= "--theme-primary-color: {$color};";
    $nutrition_diet_custom_style .= "--theme-secondary-color: {$color_secondary};";
    $nutrition_diet_custom_style .= "--theme-heading-color: {$color_heading};";
    $nutrition_diet_custom_style .= "--product-bg: {$color_product_bg};";
    $nutrition_diet_custom_style .= "--theme-primary-fade: {$color_fade};";
    $nutrition_diet_custom_style .= "--theme-footer-color: {$color_footer_bg};";
$nutrition_diet_custom_style .= "}";


$fitmeal_dietitian_slider_opacity = get_theme_mod( 'fitmeal_dietitian_slider_opacity','1');

if($fitmeal_dietitian_slider_opacity == '0'){
$nutrition_diet_custom_style .='#slider img {';
    $nutrition_diet_custom_style .='opacity: 0';
$nutrition_diet_custom_style .='}';

}else if($fitmeal_dietitian_slider_opacity == '0.1'){
$nutrition_diet_custom_style .='#slider img {';
    $nutrition_diet_custom_style .='opacity: 0.1';
$nutrition_diet_custom_style .='}';

}else if($fitmeal_dietitian_slider_opacity == '0.2'){
$nutrition_diet_custom_style .='#slider img {';
    $nutrition_diet_custom_style .='opacity: 0.2';
$nutrition_diet_custom_style .='}';

}else if($fitmeal_dietitian_slider_opacity == '0.3'){
$nutrition_diet_custom_style .='#slider img {';
    $nutrition_diet_custom_style .='opacity: 0.3';
$nutrition_diet_custom_style .='}';

}else if($fitmeal_dietitian_slider_opacity == '0.4'){
$nutrition_diet_custom_style .='#slider img {';
    $nutrition_diet_custom_style .='opacity: 0.4';
$nutrition_diet_custom_style .='}';

}else if($fitmeal_dietitian_slider_opacity == '0.5'){
$nutrition_diet_custom_style .='#slider img {';
    $nutrition_diet_custom_style .='opacity: 0.5';
$nutrition_diet_custom_style .='}';

}else if($fitmeal_dietitian_slider_opacity == '0.6'){
$nutrition_diet_custom_style .='#slider img {';
    $nutrition_diet_custom_style .='opacity: 0.6';
$nutrition_diet_custom_style .='}';

}else if($fitmeal_dietitian_slider_opacity == '0.7'){
$nutrition_diet_custom_style .='#slider img {';
    $nutrition_diet_custom_style .='opacity: 0.7';
$nutrition_diet_custom_style .='}';

}else if($fitmeal_dietitian_slider_opacity == '0.8'){
$nutrition_diet_custom_style .='#slider img {';
    $nutrition_diet_custom_style .='opacity: 0.8';
$nutrition_diet_custom_style .='}';

}
else if($fitmeal_dietitian_slider_opacity == '0.9'){
$nutrition_diet_custom_style .='#slider img {';
    $nutrition_diet_custom_style .='opacity: 0.9';
$nutrition_diet_custom_style .='}';

}
else if($fitmeal_dietitian_slider_opacity == '1'){
$nutrition_diet_custom_style .='#slider img {';
    $nutrition_diet_custom_style .='opacity: 1';
$nutrition_diet_custom_style .='}';

}

$fitmeal_dietitian_slider_heading_color = get_theme_mod( 'fitmeal_dietitian_slider_heading_color','#282b2d');
$nutrition_diet_custom_style .='#slider .carousel-caption h2 {';
$nutrition_diet_custom_style .='color: '.esc_attr($fitmeal_dietitian_slider_heading_color).';';
$nutrition_diet_custom_style .='}';

$fitmeal_dietitian_slider_excerpt_color = get_theme_mod( 'fitmeal_dietitian_slider_excerpt_color','#282b2d');
$nutrition_diet_custom_style .='#slider .slider-excerpt {';
$nutrition_diet_custom_style .='color: '.esc_attr($fitmeal_dietitian_slider_excerpt_color).';';
$nutrition_diet_custom_style .='}';