<?php

$kids_toy_center_custom_css = "";

$kids_toy_center_primary_color = get_theme_mod('kids_toy_center_primary_color');
$kids_toy_center_second_color = get_theme_mod('kids_toy_center_second_color');
$kids_toy_center_third_color = get_theme_mod('kids_toy_center_third_color');

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

if ($kids_toy_center_primary_color) {
  $kids_toy_center_custom_css .= ':root {';
  $kids_toy_center_custom_css .= '--primary-color: ' . esc_attr($kids_toy_center_primary_color) . ' !important;';
  $kids_toy_center_custom_css .= '} ';
}

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

if ($kids_toy_center_second_color) {
  $kids_toy_center_custom_css .= ':root {';
  $kids_toy_center_custom_css .= '--secondary-color: ' . esc_attr($kids_toy_center_second_color) . ' !important;';
  $kids_toy_center_custom_css .= '} ';
}

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

if ($kids_toy_center_third_color) {
  $kids_toy_center_custom_css .= ':root {';
  $kids_toy_center_custom_css .= '--tertiary-color: ' . esc_attr($kids_toy_center_third_color) . ' !important;';
  $kids_toy_center_custom_css .= '} ';
}

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

$kids_toy_center_theme_width = get_theme_mod( 'kids_toy_center_theme_width','full-width');

if($kids_toy_center_theme_width == 'full-width'){
$kids_toy_center_custom_css .='body{';
	$kids_toy_center_custom_css .='max-width: 100% !important;';
$kids_toy_center_custom_css .='}';
$kids_toy_center_custom_css .='.sticky-head{';
$kids_toy_center_custom_css .='left: 0;';
$kids_toy_center_custom_css .='}';
}else if($kids_toy_center_theme_width == 'container'){
$kids_toy_center_custom_css .='body{';
	$kids_toy_center_custom_css .='width: 80% !important; padding-right: 15px; padding-left: 15px;  margin-right: auto !important; margin-left: auto !important;';
$kids_toy_center_custom_css .='}';
$kids_toy_center_custom_css .='.sticky-head{';
$kids_toy_center_custom_css .='left: 0;';
$kids_toy_center_custom_css .='}';
}else if($kids_toy_center_theme_width == 'container-fluid'){
$kids_toy_center_custom_css .='body{';
	$kids_toy_center_custom_css .='width: 95% !important;padding-right: 15px;padding-left: 15px;margin-right: auto;margin-left: auto;';
$kids_toy_center_custom_css .='}';
$kids_toy_center_custom_css .='.sticky-head{';
$kids_toy_center_custom_css .='left: 0;';
$kids_toy_center_custom_css .='}';
}

/*-------------------- Single Post Alignment-------------------*/

$kids_toy_center_single_post_align = get_theme_mod( 'kids_toy_center_single_post_align','left-align');

if($kids_toy_center_single_post_align == 'left-align'){
$kids_toy_center_custom_css .='body:not(.hide-post-meta) .post{';
	$kids_toy_center_custom_css .='text-align: left';
$kids_toy_center_custom_css .='}';
}else if($kids_toy_center_single_post_align == 'right-align'){
$kids_toy_center_custom_css .='body:not(.hide-post-meta) .post{';
	$kids_toy_center_custom_css .='text-align: right';
$kids_toy_center_custom_css .='}';
}else if($kids_toy_center_single_post_align == 'center-align'){
$kids_toy_center_custom_css .='body:not(.hide-post-meta) .post{';
	$kids_toy_center_custom_css .='text-align: center';
$kids_toy_center_custom_css .='}';
}

/*-------------------- Scroll Top Alignment-------------------*/

$kids_toy_center_scroll_top_alignment = get_theme_mod( 'kids_toy_center_scroll_top_alignment','right-align');

if($kids_toy_center_scroll_top_alignment == 'right-align'){
$kids_toy_center_custom_css .='#button{';
	$kids_toy_center_custom_css .='right: 5%;';
$kids_toy_center_custom_css .='}';
}else if($kids_toy_center_scroll_top_alignment == 'center-align'){
$kids_toy_center_custom_css .='#button{';
	$kids_toy_center_custom_css .='right:0; left:0; margin: 0 auto;';
$kids_toy_center_custom_css .='}';
}else if($kids_toy_center_scroll_top_alignment == 'left-align'){
$kids_toy_center_custom_css .='#button{';
	$kids_toy_center_custom_css .='left: 5%;';
$kids_toy_center_custom_css .='}';
}

/*-------------------- Archive Page Pagination Alignment-------------------*/

$kids_toy_center_archive_pagination_alignment = get_theme_mod( 'kids_toy_center_archive_pagination_alignment','left-align');

if($kids_toy_center_archive_pagination_alignment == 'right-align'){
$kids_toy_center_custom_css .='.pagination{';
	$kids_toy_center_custom_css .='justify-content: end;';
$kids_toy_center_custom_css .='}';
}else if($kids_toy_center_archive_pagination_alignment == 'center-align'){
$kids_toy_center_custom_css .='.pagination{';
	$kids_toy_center_custom_css .='justify-content: center;';
$kids_toy_center_custom_css .='}';
}else if($kids_toy_center_archive_pagination_alignment == 'left-align'){
$kids_toy_center_custom_css .='.pagination{';
	$kids_toy_center_custom_css .='justify-content: start;';
$kids_toy_center_custom_css .='}';
}

/*-------------------- Scroll Top Responsive-------------------*/

$kids_toy_center_resp_scroll_top = get_theme_mod( 'kids_toy_center_resp_scroll_top',true);
if($kids_toy_center_resp_scroll_top == true && get_theme_mod( 'kids_toy_center_scroll_to_top',true) != true){
	$kids_toy_center_custom_css .='#button.show{';
		$kids_toy_center_custom_css .='visibility:hidden !important;';
	$kids_toy_center_custom_css .='} ';
}
if($kids_toy_center_resp_scroll_top == true){
	$kids_toy_center_custom_css .='@media screen and (max-width:575px) {';
	$kids_toy_center_custom_css .='#button.show{';
		$kids_toy_center_custom_css .='visibility:visible !important;';
	$kids_toy_center_custom_css .='} }';
}else if($kids_toy_center_resp_scroll_top == false){
	$kids_toy_center_custom_css .='@media screen and (max-width:575px){';
	$kids_toy_center_custom_css .='#button.show{';
		$kids_toy_center_custom_css .='visibility:hidden !important;';
	$kids_toy_center_custom_css .='} }';
}

/*-------------------- Preloader Responsive-------------------*/

	$kids_toy_center_resp_loader = get_theme_mod('kids_toy_center_resp_loader',false);
	if($kids_toy_center_resp_loader == true && get_theme_mod('kids_toy_center_preloader_setting',false) == false){
		$kids_toy_center_custom_css .='@media screen and (min-width:575px){
			.preloader{';
			$kids_toy_center_custom_css .='display:none !important;';
		$kids_toy_center_custom_css .='} }';
	}

	if($kids_toy_center_resp_loader == false){
		$kids_toy_center_custom_css .='@media screen and (max-width:575px){
			.preloader{';
			$kids_toy_center_custom_css .='display:none !important;';
		$kids_toy_center_custom_css .='} }';
	}

// Scroll to top button shape 

$kids_toy_center_scroll_border_radius = get_theme_mod( 'kids_toy_center_scroll_to_top_radius','curved-box');
if($kids_toy_center_scroll_border_radius == 'box'){
	$kids_toy_center_custom_css .='#button{';
		$kids_toy_center_custom_css .='border-radius: 0px;';
	$kids_toy_center_custom_css .='}';
}else if($kids_toy_center_scroll_border_radius == 'curved-box'){
	$kids_toy_center_custom_css .='#button{';
		$kids_toy_center_custom_css .='border-radius: 4px;';
	$kids_toy_center_custom_css .='}';
}
else if($kids_toy_center_scroll_border_radius == 'circle'){
	$kids_toy_center_custom_css .='#button{';
		$kids_toy_center_custom_css .='border-radius: 50%;';
	$kids_toy_center_custom_css .='}';
}

// Footer Background Image Attachment 

$kids_toy_center_footer_attachment = get_theme_mod( 'kids_toy_center_background_attachment','scroll');
if($kids_toy_center_footer_attachment == 'fixed'){
	$kids_toy_center_custom_css .='.site-footer{';
		$kids_toy_center_custom_css .='background-attachment: fixed;';
	$kids_toy_center_custom_css .='}';
}elseif ($kids_toy_center_footer_attachment == 'scroll'){
	$kids_toy_center_custom_css .='.site-footer{';
		$kids_toy_center_custom_css .='background-attachment: scroll;';
	$kids_toy_center_custom_css .='}';
}

// Menu Hover Style	

$kids_toy_center_menus_item = get_theme_mod( 'kids_toy_center_menus_style','None');
if($kids_toy_center_menus_item == 'None'){
	$kids_toy_center_custom_css .='#site-navigation .menu ul li a:hover, .main-navigation .menu li a:hover{';
		$kids_toy_center_custom_css .='';
	$kids_toy_center_custom_css .='}';
}else if($kids_toy_center_menus_item == 'Zoom In'){
	$kids_toy_center_custom_css .='#site-navigation .menu ul li a:hover, .main-navigation .menu li a:hover{';
	$kids_toy_center_custom_css .= 'transition: all 0.3s ease-in-out !important; transform: scale(1.2) !important;';
	$kids_toy_center_custom_css .= '}';
	
	$kids_toy_center_custom_css .= '.main-navigation ul ul li a:hover {';
	$kids_toy_center_custom_css .= 'margin-left: 20px;';
	$kids_toy_center_custom_css .= '}';
}	
