<?php

$recycling_energy_custom_style= "";

/*---------------------------Scroll-top-position -------------------*/

$recycling_energy_scroll_options = get_theme_mod( 'recycling_energy_scroll_options','right_align');

if($recycling_energy_scroll_options == 'right_align'){

$recycling_energy_custom_style .='.scroll-top button{';

	$recycling_energy_custom_style .='';

$recycling_energy_custom_style .='}';

}else if($recycling_energy_scroll_options == 'center_align'){

$recycling_energy_custom_style .='.scroll-top button{';

	$recycling_energy_custom_style .='right: 0; left:0; margin: 0 auto; top:85% !important';

$recycling_energy_custom_style .='}';

}else if($recycling_energy_scroll_options == 'left_align'){

$recycling_energy_custom_style .='.scroll-top button{';

	$recycling_energy_custom_style .='right: auto; left:5%; margin: 0 auto';

$recycling_energy_custom_style .='}';
}

// logo-max-height
$recycling_energy_logo_max_height = get_theme_mod('recycling_energy_logo_max_height','100');

if($recycling_energy_logo_max_height != false){

$recycling_energy_custom_style .='.custom-logo-link img{';

	$recycling_energy_custom_style .='max-height: '.esc_html($recycling_energy_logo_max_height).'px;';

$recycling_energy_custom_style .='}';
}

/*---------------------------text-transform-------------------*/

$recycling_energy_text_transform = get_theme_mod( 'recycling_energy_menu_text_transform','CAPITALISE');
if($recycling_energy_text_transform == 'CAPITALISE'){

$recycling_energy_custom_style .='nav#top_gb_menu ul li a{';

	$recycling_energy_custom_style .='text-transform: capitalize ;';

$recycling_energy_custom_style .='}';

}else if($recycling_energy_text_transform == 'UPPERCASE'){

$recycling_energy_custom_style .='nav#top_gb_menu ul li a{';

	$recycling_energy_custom_style .='text-transform: uppercase ;';

$recycling_energy_custom_style .='}';

}else if($recycling_energy_text_transform == 'LOWERCASE'){

$recycling_energy_custom_style .='nav#top_gb_menu ul li a{';

	$recycling_energy_custom_style .='text-transform: lowercase ;';

$recycling_energy_custom_style .='}';
}

/*-------------------------Slider-content-alignment-------------------*/

$recycling_energy_slider_content_alignment = get_theme_mod( 'recycling_energy_slider_content_alignment','LEFT-ALIGN');

if($recycling_energy_slider_content_alignment == 'LEFT-ALIGN'){

$recycling_energy_custom_style .='#slider .carousel-caption{';

	$recycling_energy_custom_style .='text-align:left; right: 55%; left: 15%;';

$recycling_energy_custom_style .='}';

$recycling_energy_custom_style .='@media screen and (max-width:1199px){';

$recycling_energy_custom_style .='#slider .carousel-caption{';

    $recycling_energy_custom_style .='right: 40%; left: 15%';
    
$recycling_energy_custom_style .='} }';

$recycling_energy_custom_style .='@media screen and (max-width:991px){';

$recycling_energy_custom_style .='#slider .carousel-caption{';

    $recycling_energy_custom_style .='right: 20%; left: 15%';
    
$recycling_energy_custom_style .='} }';


}else if($recycling_energy_slider_content_alignment == 'CENTER-ALIGN'){

$recycling_energy_custom_style .='#slider .carousel-caption{';

	$recycling_energy_custom_style .='text-align:center; right: 20%; left: 20%;';

$recycling_energy_custom_style .='}';


}else if($recycling_energy_slider_content_alignment == 'RIGHT-ALIGN'){

$recycling_energy_custom_style .='#slider .carousel-caption{';

	$recycling_energy_custom_style .='text-align:right; right: 15%; left: 55%;';

$recycling_energy_custom_style .='}';

$recycling_energy_custom_style .='@media screen and (max-width:1199px){';

$recycling_energy_custom_style .='#slider .carousel-caption{';

    $recycling_energy_custom_style .='right: 15%; left: 40%';
    
$recycling_energy_custom_style .='} }';

$recycling_energy_custom_style .='@media screen and (max-width:991px){';

$recycling_energy_custom_style .='#slider .carousel-caption{';

    $recycling_energy_custom_style .='right: 15%; left: 20%';
    
$recycling_energy_custom_style .='} }';

}
//--------------------sticky header----------------------
if (false === get_option('recycling_energy_sticky_header')) {
    add_option('recycling_energy_sticky_header', 'off');
}

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

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

if (get_option('recycling_energy_sticky_header', 'off') !== 'off') {
    $recycling_energy_custom_style .= '.fixed_header.fixed {';
    $recycling_energy_custom_style .= 'position: fixed; background-color: var(--theme-primary-color); padding: 10px 0px;';
    $recycling_energy_custom_style .= '}';

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

//related products
if( get_option( 'recycling_energy_related_product',true) != 'on') {

$recycling_energy_custom_style .='.related.products{';

	$recycling_energy_custom_style .='display: none;';
	
$recycling_energy_custom_style .='}';
}

if( get_option( 'recycling_energy_related_product',true) != 'off') {

$recycling_energy_custom_style .='.related.products{';

	$recycling_energy_custom_style .='display: block;';
	
$recycling_energy_custom_style .='}';
}

// footer text alignment
$recycling_energy_footer_content_alignment = get_theme_mod( 'recycling_energy_footer_content_alignment','CENTER-ALIGN');

if($recycling_energy_footer_content_alignment == 'LEFT-ALIGN'){

$recycling_energy_custom_style .='.site-info{';

	$recycling_energy_custom_style .='text-align:left; padding-left: 30px;';

$recycling_energy_custom_style .='}';

$recycling_energy_custom_style .='.site-info a{';

	$recycling_energy_custom_style .='padding-left: 30px;';

$recycling_energy_custom_style .='}';


}else if($recycling_energy_footer_content_alignment == 'CENTER-ALIGN'){

$recycling_energy_custom_style .='.site-info{';

	$recycling_energy_custom_style .='text-align:center;';

$recycling_energy_custom_style .='}';


}else if($recycling_energy_footer_content_alignment == 'RIGHT-ALIGN'){

$recycling_energy_custom_style .='.site-info{';

	$recycling_energy_custom_style .='text-align:right; padding-right: 30px;';

$recycling_energy_custom_style .='}';

$recycling_energy_custom_style .='.site-info a{';

	$recycling_energy_custom_style .='padding-right: 30px;';

$recycling_energy_custom_style .='}';

}

// slider button
$mobile_button_setting = get_option('recycling_energy_slider_button_mobile_show_hide', '1');
$main_button_setting = get_option('recycling_energy_slider_button_show_hide', '1');

$recycling_energy_custom_style .= '#slider .home-btn {';

if ($main_button_setting == 'off') {
    $recycling_energy_custom_style .= 'display: none;';
}

$recycling_energy_custom_style .= '}';

// Add media query for mobile devices
$recycling_energy_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_button_setting == 'off' || $mobile_button_setting == 'off') {
    $recycling_energy_custom_style .= '#slider .home-btn { display: none; }';
}
$recycling_energy_custom_style .= '}';


// scroll button
$mobile_scroll_setting = get_option('recycling_energy_scroll_enable_mobile', '1');
$main_scroll_setting = get_option('recycling_energy_scroll_enable', '1');

$recycling_energy_custom_style .= '.scrollup {';

if ($main_scroll_setting == 'off') {
    $recycling_energy_custom_style .= 'display: none;';
}

$recycling_energy_custom_style .= '}';

// Add media query for mobile devices
$recycling_energy_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_scroll_setting == 'off' || $mobile_scroll_setting == 'off') {
    $recycling_energy_custom_style .= '.scrollup { display: none; }';
}
$recycling_energy_custom_style .= '}';

// theme breadcrumb
$mobile_breadcrumb_setting = get_option('recycling_energy_enable_breadcrumb_mobile', '1');
$main_breadcrumb_setting = get_option('recycling_energy_enable_breadcrumb', '1');

$recycling_energy_custom_style .= '.archieve_breadcrumb {';

if ($main_breadcrumb_setting == 'off') {
    $recycling_energy_custom_style .= 'display: none;';
}

$recycling_energy_custom_style .= '}';

// Add media query for mobile devices
$recycling_energy_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_breadcrumb_setting == 'off' || $mobile_breadcrumb_setting == 'off') {
    $recycling_energy_custom_style .= '.archieve_breadcrumb { display: none; }';
}
$recycling_energy_custom_style .= '}';

// single post and page breadcrumb
$mobile_single_breadcrumb_setting = get_option('recycling_energy_single_enable_breadcrumb_mobile', '1');
$main_single_breadcrumb_setting = get_option('recycling_energy_single_enable_breadcrumb', '1');

$recycling_energy_custom_style .= '.single_breadcrumb {';

if ($main_single_breadcrumb_setting == 'off') {
    $recycling_energy_custom_style .= 'display: none;';
}

$recycling_energy_custom_style .= '}';

// Add media query for mobile devices
$recycling_energy_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_single_breadcrumb_setting == 'off' || $mobile_single_breadcrumb_setting == 'off') {
    $recycling_energy_custom_style .= '.single_breadcrumb { display: none; }';
}
$recycling_energy_custom_style .= '}';

// woocommerce breadcrumb
$mobile_woo_breadcrumb_setting = get_option('recycling_energy_woocommerce_enable_breadcrumb_mobile', '1');
$main_woo_breadcrumb_setting = get_option('recycling_energy_woocommerce_enable_breadcrumb', '1');

$recycling_energy_custom_style .= '.woocommerce-breadcrumb {';

if ($main_woo_breadcrumb_setting == 'off') {
    $recycling_energy_custom_style .= 'display: none;';
}

$recycling_energy_custom_style .= '}';

// Add media query for mobile devices
$recycling_energy_custom_style .= '@media screen and (max-width: 600px) {';
if ($main_woo_breadcrumb_setting == 'off' || $mobile_woo_breadcrumb_setting == 'off') {
    $recycling_energy_custom_style .= '.woocommerce-breadcrumb { display: none; }';
}
$recycling_energy_custom_style .= '}';

//colors
$color = get_theme_mod('recycling_energy_primary_color', '#7fb93d');
$color_heading = get_theme_mod('recycling_energy_heading_color', '#1d2b09');
$color_text = get_theme_mod('recycling_energy_text_color', '#555555');
$color_fade = get_theme_mod('recycling_energy_primary_fade', '#f3ffe5');
$color_footer_bg = get_theme_mod('recycling_energy_footer_bg', '#1d2b09');
$color_post_bg = get_theme_mod('recycling_energy_post_bg', '#ffffff');
$slider_overlay = get_theme_mod( 'recycling_energy_slider_overlay','#1d2b09');


$recycling_energy_custom_style .= ":root {";
    $recycling_energy_custom_style .= "--theme-primary-color: {$color};";
    $recycling_energy_custom_style .= "--theme-heading-color: {$color_heading};";
    $recycling_energy_custom_style .= "--theme-text-color: {$color_text};";
    $recycling_energy_custom_style .= "--theme-primary-fade: {$color_fade};";
    $recycling_energy_custom_style .= "--theme-footer-color: {$color_footer_bg};";
    $recycling_energy_custom_style .= "--post-bg-color: {$color_post_bg};";
    $recycling_energy_custom_style .= "--slider-overlay: {$slider_overlay};";
$recycling_energy_custom_style .= "}";

$recycling_energy_slider_opacity = get_theme_mod( 'recycling_energy_slider_opacity','0.7');

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

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

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

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

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

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

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

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

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

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

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

}

$recycling_energy_slider_heading_color = get_theme_mod( 'recycling_energy_slider_heading_color','#ffffff');
$recycling_energy_custom_style .='#slider .carousel-caption h2 {';
$recycling_energy_custom_style .='color: '.esc_attr($recycling_energy_slider_heading_color).';';
$recycling_energy_custom_style .='}';

$recycling_energy_slider_excerpt_color = get_theme_mod( 'recycling_energy_slider_excerpt_color','#ffffff');
$recycling_energy_custom_style .='#slider .slider-excerpt {';
$recycling_energy_custom_style .='color: '.esc_attr($recycling_energy_slider_excerpt_color).';';
$recycling_energy_custom_style .='}';
//-------------------title-font-size----//  
$recycling_energy_site_title_fontsize = get_theme_mod('recycling_energy_site_title_fontsize','25');

if($recycling_energy_site_title_fontsize != false){

$recycling_energy_custom_style .='.recycling-energy-logo h1,.site-title,.site-title a,.recycling-energy-logo h1 a{';

    $recycling_energy_custom_style .='font-size: '.esc_html($recycling_energy_site_title_fontsize).'px;';

$recycling_energy_custom_style .='}';
}

//-------------------tagline-font-size----//  
$recycling_energy_site_tagline_fontsize = get_theme_mod('recycling_energy_site_tagline_fontsize','15');

if($recycling_energy_site_tagline_fontsize != false){

$recycling_energy_custom_style .='p.site-description{';

    $recycling_energy_custom_style .='font-size: '.esc_html($recycling_energy_site_tagline_fontsize).'px;';

$recycling_energy_custom_style .='}';
}

//-------------------menu-font-size----//  
$recycling_energy_menu_fontsize = get_theme_mod('recycling_energy_menu_fontsize','14');

if($recycling_energy_menu_fontsize != false){

$recycling_energy_custom_style .='.gb_nav_menu li a{';

    $recycling_energy_custom_style .='font-size: '.esc_html($recycling_energy_menu_fontsize).'px;';

$recycling_energy_custom_style .='}';
}

//-------------------first-letter-capital----//
if (false === get_option('recycling_energy_first_letter_capital_enable')) {
    add_option('recycling_energy_first_letter_capital_enable', 'on');
}
if (get_option('recycling_energy_first_letter_capital_enable') === 'off') {
    $recycling_energy_custom_style .= '.entry-content > p:first-of-type:first-letter {';
    $recycling_energy_custom_style .= 'font-size: 16px; float: none; line-height: unset; padding: 0;';
    $recycling_energy_custom_style .= '}';
}