<?php

$motivational_speaker_custom_style= "";

/*---------------------------Width -------------------*/
$motivational_speaker_theme_width = get_theme_mod( 'motivational_speaker_width_options','full_width');

if($motivational_speaker_theme_width == 'full_width'){

$motivational_speaker_custom_style .='body{';

	$motivational_speaker_custom_style .='max-width: 100%;';

$motivational_speaker_custom_style .='}';

}else if($motivational_speaker_theme_width == 'container'){

$motivational_speaker_custom_style .='body{';

	$motivational_speaker_custom_style .='width: 100%; padding-right: 15px; padding-left: 15px;  margin-right: auto !important; margin-left: auto !important;';

$motivational_speaker_custom_style .='}';

$motivational_speaker_custom_style .='@media screen and (min-width: 601px){';

$motivational_speaker_custom_style .='body{';

    $motivational_speaker_custom_style .='max-width: 720px;';
    
$motivational_speaker_custom_style .='} }';

$motivational_speaker_custom_style .='@media screen and (min-width: 992px){';

$motivational_speaker_custom_style .='body{';

    $motivational_speaker_custom_style .='max-width: 960px;';
    
$motivational_speaker_custom_style .='} }';

$motivational_speaker_custom_style .='@media screen and (min-width: 1200px){';

$motivational_speaker_custom_style .='body{';

    $motivational_speaker_custom_style .='max-width: 1140px;';
    
$motivational_speaker_custom_style .='} }';

$motivational_speaker_custom_style .='@media screen and (min-width: 1400px){';

$motivational_speaker_custom_style .='body{';

    $motivational_speaker_custom_style .='max-width: 1320px;';
    
$motivational_speaker_custom_style .='} }';

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

$motivational_speaker_custom_style .='body{';

    $motivational_speaker_custom_style .='max-width: 100%; padding-right:0px; padding-left: 0px';
    
$motivational_speaker_custom_style .='} }';

}else if($motivational_speaker_theme_width == 'container_fluid'){

$motivational_speaker_custom_style .='body{';

	$motivational_speaker_custom_style .='width: 100%;padding-right: 15px;padding-left: 15px;margin-right: auto;margin-left: auto;';

$motivational_speaker_custom_style .='}';

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

$motivational_speaker_custom_style .='body{';

    $motivational_speaker_custom_style .='max-width: 100%; padding-right:0px; padding-left: 0px';
    
$motivational_speaker_custom_style .='} }';
}

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

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

if($motivational_speaker_scroll_options == 'right_align'){

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

	$motivational_speaker_custom_style .='';

$motivational_speaker_custom_style .='}';

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

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

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

$motivational_speaker_custom_style .='}';

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

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

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

$motivational_speaker_custom_style .='}';
}
//----------logo-max-width------------
$motivational_speaker_logo_max_height = get_theme_mod('motivational_speaker_logo_max_height','100');

if($motivational_speaker_logo_max_height != false){

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

	$motivational_speaker_custom_style .='max-height: '.esc_html($motivational_speaker_logo_max_height).'px;';

$motivational_speaker_custom_style .='}';
}

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

$motivational_speaker_text_transform = get_theme_mod( 'motivational_speaker_menu_text_transform','CAPITALISE');
if($motivational_speaker_text_transform == 'CAPITALISE'){

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

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

$motivational_speaker_custom_style .='}';

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

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

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

$motivational_speaker_custom_style .='}';

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

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

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

$motivational_speaker_custom_style .='}';
}

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

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

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

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

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

$motivational_speaker_custom_style .='}';

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

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

    $motivational_speaker_custom_style .='right: 35%; left: 15%';
    
$motivational_speaker_custom_style .='} }';

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

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

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


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

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

	$motivational_speaker_custom_style .='text-align:center; right: 15%; left: 15%;';

$motivational_speaker_custom_style .='}';


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

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

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

$motivational_speaker_custom_style .='}';

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

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

    $motivational_speaker_custom_style .='right: 15%; left: 35%';
    
$motivational_speaker_custom_style .='} }';

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

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

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

}

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

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

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

if (get_option('motivational_speaker_sticky_header', 'off') !== 'off') {
    $motivational_speaker_custom_style .= '.fixed_header.fixed {';
    $motivational_speaker_custom_style .= 'position: fixed; background-color: #fff; box-shadow: 0px 3px 10px 2px #eee;';
    $motivational_speaker_custom_style .= '}';

    $motivational_speaker_custom_style .= '.admin-bar .fixed {';
    $motivational_speaker_custom_style .= ' margin-top: 32px;';
    $motivational_speaker_custom_style .= '}';
}
//related products
if( get_option( 'motivational_speaker_related_product',true) != 'on') {

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

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

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

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

	$motivational_speaker_custom_style .='display: block;';
	
$motivational_speaker_custom_style .='}';
}
// footer text alignment
$motivational_speaker_footer_content_alignment = get_theme_mod( 'motivational_speaker_footer_content_alignment','CENTER-ALIGN');

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

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

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

$motivational_speaker_custom_style .='}';

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

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

$motivational_speaker_custom_style .='}';


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

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

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

$motivational_speaker_custom_style .='}';


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

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

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

$motivational_speaker_custom_style .='}';

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

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

$motivational_speaker_custom_style .='}';

}

// slider button
$mobile_button_setting = get_option('motivational_speaker_slider_button_mobile_show_hide', '1');
$main_button_setting = get_option('motivational_speaker_slider_button_show_hide', '1');

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

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

$motivational_speaker_custom_style .= '}';

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


// scroll button
$mobile_scroll_setting = get_option('motivational_speaker_scroll_enable_mobile', '1');
$main_scroll_setting = get_option('motivational_speaker_scroll_enable', '1');

$motivational_speaker_custom_style .= '.scrollup {';

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

$motivational_speaker_custom_style .= '}';

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

// theme breadcrumb
$mobile_breadcrumb_setting = get_option('motivational_speaker_enable_breadcrumb_mobile', '1');
$main_breadcrumb_setting = get_option('motivational_speaker_enable_breadcrumb', '1');

$motivational_speaker_custom_style .= '.archieve_breadcrumb {';

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

$motivational_speaker_custom_style .= '}';

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

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

$motivational_speaker_custom_style .= '.single_breadcrumb {';

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

$motivational_speaker_custom_style .= '}';

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

// woocommerce breadcrumb
$mobile_woo_breadcrumb_setting = get_option('motivational_speaker_woocommerce_enable_breadcrumb_mobile', '1');
$main_woo_breadcrumb_setting = get_option('motivational_speaker_woocommerce_enable_breadcrumb', '1');

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

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

$motivational_speaker_custom_style .= '}';

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

//colors
$color = get_theme_mod('motivational_speaker_primary_color', '#eb5151');
$color_heading = get_theme_mod('motivational_speaker_heading_color', '#222222');
$color_text = get_theme_mod('motivational_speaker_text_color', '#757575');
$color_fade = get_theme_mod('motivational_speaker_primary_fade', '#fff5f3');
$color_footer_bg = get_theme_mod('motivational_speaker_footer_bg', '#222222');
$color_post_bg = get_theme_mod('motivational_speaker_post_bg', '#ffffff');
$slider_overlay = get_theme_mod( 'motivational_speaker_slider_overlay','#fff5f3');


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

$motivational_speaker_slider_opacity = get_theme_mod( 'motivational_speaker_slider_opacity','0.5');

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

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

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

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

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

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

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

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

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

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

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

}

$motivational_speaker_slider_heading_color = get_theme_mod( 'motivational_speaker_slider_heading_color','#222222');
$motivational_speaker_custom_style .='#slider .carousel-caption h2 {';
$motivational_speaker_custom_style .='color: '.esc_attr($motivational_speaker_slider_heading_color).';';
$motivational_speaker_custom_style .='}';

$motivational_speaker_slider_excerpt_color = get_theme_mod( 'motivational_speaker_slider_excerpt_color','#222222');
$motivational_speaker_custom_style .='#slider .slider-excerpt {';
$motivational_speaker_custom_style .='color: '.esc_attr($motivational_speaker_slider_excerpt_color).';';
$motivational_speaker_custom_style .='}';

//-------------------title-font-size----//  
$motivational_speaker_site_title_fontsize = get_theme_mod('motivational_speaker_site_title_fontsize','25');

if($motivational_speaker_site_title_fontsize != false){

$motivational_speaker_custom_style .='.motivational-speaker-logo h1,.site-title,.site-title a,.motivational-speaker-logo h1 a{';

    $motivational_speaker_custom_style .='font-size: '.esc_html($motivational_speaker_site_title_fontsize).'px;';

$motivational_speaker_custom_style .='}';
}

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

if($motivational_speaker_site_tagline_fontsize != false){

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

    $motivational_speaker_custom_style .='font-size: '.esc_html($motivational_speaker_site_tagline_fontsize).'px;';

$motivational_speaker_custom_style .='}';
}

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

if($motivational_speaker_menu_fontsize != false){

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

    $motivational_speaker_custom_style .='font-size: '.esc_html($motivational_speaker_menu_fontsize).'px;';

$motivational_speaker_custom_style .='}';
}

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