<?php

/*---------------------------Width -------------------*/

$senior_care_lite_custom_style= "";

$senior_care_lite_theme_width = get_theme_mod( 'senior_care_lite_width_options','full_width');

if($senior_care_lite_theme_width == 'full_width'){

$senior_care_lite_custom_style .='body{';

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

$senior_care_lite_custom_style .='}';

}else if($senior_care_lite_theme_width == 'Container'){

$senior_care_lite_custom_style .='body{';

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

$senior_care_lite_custom_style .='}';

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

$senior_care_lite_custom_style .='body{';

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

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

$senior_care_lite_custom_style .='body{';

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

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

$senior_care_lite_custom_style .='body{';

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

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

$senior_care_lite_custom_style .='body{';

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

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

$senior_care_lite_custom_style .='body{';

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

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

$senior_care_lite_custom_style .='body{';

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

$senior_care_lite_custom_style .='}';

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

$senior_care_lite_custom_style .='body{';

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

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

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

if($senior_care_lite_scroll_options == 'right_align'){

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

	$senior_care_lite_custom_style .='';

$senior_care_lite_custom_style .='}';

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

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

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

$senior_care_lite_custom_style .='}';

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

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

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

$senior_care_lite_custom_style .='}';
}

//---------------------------------------------------------------------------------

$senior_care_lite_logo_max_height = get_theme_mod('senior_care_lite_logo_max_height'.'100');

if($senior_care_lite_logo_max_height != false){

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

	$senior_care_lite_custom_style .='max-height: '.esc_html($senior_care_lite_logo_max_height).'px;';

$senior_care_lite_custom_style .='}';
}


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

$senior_care_lite_text_transform = get_theme_mod( 'senior_care_lite_menu_text_transform','CAPITALISE');
if($senior_care_lite_text_transform == 'CAPITALISE'){

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

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

$senior_care_lite_custom_style .='}';

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

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

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

$senior_care_lite_custom_style .='}';

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

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

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

$senior_care_lite_custom_style .='}';
}

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

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

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

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

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

$senior_care_lite_custom_style .='}';

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

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

    $senior_care_lite_custom_style .='right: 30%; left: 15%';
    
$senior_care_lite_custom_style .='} }';

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

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

    $senior_care_lite_custom_style .='right: 25%; left: 15%';
    
$senior_care_lite_custom_style .='} }';


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

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

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

$senior_care_lite_custom_style .='}';


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

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

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

$senior_care_lite_custom_style .='}';

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

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

    $senior_care_lite_custom_style .='right: 15%; left: 30%';
    
$senior_care_lite_custom_style .='} }';

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

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

    $senior_care_lite_custom_style .='right: 15%; left: 25%';
    
$senior_care_lite_custom_style .='} }';

}

//------------sticky-header------------

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

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

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

if (get_option('senior_care_lite_sticky_header', 'off') !== 'off') {
    $senior_care_lite_custom_style .= '.fixed_header.fixed {';
    $senior_care_lite_custom_style .= 'position: fixed; background: #fbf7f7; padding: 10px;';
    $senior_care_lite_custom_style .= '}';

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

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

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

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

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

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

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

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

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

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

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

$senior_care_lite_custom_style .='}';

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

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

$senior_care_lite_custom_style .='}';


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

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

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

$senior_care_lite_custom_style .='}';


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

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

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

$senior_care_lite_custom_style .='}';

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

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

$senior_care_lite_custom_style .='}';

}

// slider button
$mobile_button_setting = get_option('senior_care_lite_slider_button_mobile_show_hide', '1');
$main_button_setting = get_option('senior_care_lite_slider_button_show_hide', '1');

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

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

$senior_care_lite_custom_style .= '}';

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


// scroll button
$mobile_scroll_setting = get_option('senior_care_lite_scroll_enable_mobile', '1');
$main_scroll_setting = get_option('senior_care_lite_scroll_enable', '1');

$senior_care_lite_custom_style .= '.scrollup {';

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

$senior_care_lite_custom_style .= '}';

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

// theme breadcrumb
$mobile_breadcrumb_setting = get_option('senior_care_lite_enable_breadcrumb_mobile', '1');
$main_breadcrumb_setting = get_option('senior_care_lite_enable_breadcrumb', '1');

$senior_care_lite_custom_style .= '.archieve_breadcrumb {';

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

$senior_care_lite_custom_style .= '}';

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

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

$senior_care_lite_custom_style .= '.single_breadcrumb {';

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

$senior_care_lite_custom_style .= '}';

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

// woocommerce breadcrumb
$mobile_woo_breadcrumb_setting = get_option('senior_care_lite_woocommerce_enable_breadcrumb_mobile', '1');
$main_woo_breadcrumb_setting = get_option('senior_care_lite_woocommerce_enable_breadcrumb', '1');

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

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

$senior_care_lite_custom_style .= '}';

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

//colors
$color = get_theme_mod('senior_care_lite_primary_color', '#f97d4d');
$color_heading = get_theme_mod('senior_care_lite_heading_color', '#1f294b');
$color_text = get_theme_mod('senior_care_lite_text_color', '#73789a');
$color_fade = get_theme_mod('senior_care_lite_primary_fade', '#f7e2da');
$color_footer_bg = get_theme_mod('senior_care_lite_footer_bg', '#1f294b');
$color_post_bg = get_theme_mod('senior_care_lite_post_bg', '#ffffff');
$slider_overlay = get_theme_mod( 'senior_care_lite_slider_overlay','#ffffff');


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

$senior_care_lite_slider_opacity = get_theme_mod( 'senior_care_lite_slider_opacity','0.6');

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

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

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

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

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

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

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

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

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

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

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

}

$senior_care_lite_slider_heading_color = get_theme_mod( 'senior_care_lite_slider_heading_color','#1f294b');
$senior_care_lite_custom_style .='#slider .carousel-caption h2 {';
$senior_care_lite_custom_style .='color: '.esc_attr($senior_care_lite_slider_heading_color).';';
$senior_care_lite_custom_style .='}';

$senior_care_lite_slider_sub_heading_color = get_theme_mod( 'senior_care_lite_slider_sub_heading_color','#1f294b');
$senior_care_lite_custom_style .='#slider .carousel-caption h3 {';
$senior_care_lite_custom_style .='color: '.esc_attr($senior_care_lite_slider_sub_heading_color).';';
$senior_care_lite_custom_style .='}';

$senior_care_lite_slider_excerpt_color = get_theme_mod( 'senior_care_lite_slider_excerpt_color','#1f294b');
$senior_care_lite_custom_style .='#slider .slider-excerpt {';
$senior_care_lite_custom_style .='color: '.esc_attr($senior_care_lite_slider_excerpt_color).';';
$senior_care_lite_custom_style .='}';

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

if($senior_care_lite_site_title_fontsize != false){

$senior_care_lite_custom_style .='.senior-care-lite-logo h1,.site-title,.site-title a,.senior-care-lite-logo h1 a{';

    $senior_care_lite_custom_style .='font-size: '.esc_html($senior_care_lite_site_title_fontsize).'px;';

$senior_care_lite_custom_style .='}';
}

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

if($senior_care_lite_site_tagline_fontsize != false){

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

    $senior_care_lite_custom_style .='font-size: '.esc_html($senior_care_lite_site_tagline_fontsize).'px;';

$senior_care_lite_custom_style .='}';
}

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

if($senior_care_lite_menu_fontsize != false){

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

    $senior_care_lite_custom_style .='font-size: '.esc_html($senior_care_lite_menu_fontsize).'px;';

$senior_care_lite_custom_style .='}';
}

//-------------------first-letter-capital----//
if (false === get_option('senior_care_lite_first_letter_capital_enable')) {
    add_option('senior_care_lite_first_letter_capital_enable', 'of');
}
if (get_option('senior_care_lite_first_letter_capital_enable') === 'off') {
    $senior_care_lite_custom_style .= '.entry-content > p:first-of-type:first-letter {';
    $senior_care_lite_custom_style .= 'font-size: 16px; float: none; line-height: unset; padding: 0; display: flex; justify-content: center !important;';
    $senior_care_lite_custom_style .= '}';
}