<?php

$plumber_handyman_lite_custom_css = "";

$plumber_handyman_lite_primary_color = get_theme_mod('plumber_handyman_lite_primary_color');
$plumber_handyman_lite_second_color = get_theme_mod('plumber_handyman_lite_second_color');

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

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

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

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

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

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

if($plumber_handyman_lite_scroll_top_alignment == 'right-align'){
$plumber_handyman_lite_custom_css .='#button{';
	$plumber_handyman_lite_custom_css .='right: 3%;';
$plumber_handyman_lite_custom_css .='}';
}else if($plumber_handyman_lite_scroll_top_alignment == 'center-align'){
$plumber_handyman_lite_custom_css .='#button{';
	$plumber_handyman_lite_custom_css .='right:0; left:0; margin: 0 auto;';
$plumber_handyman_lite_custom_css .='}';
}else if($plumber_handyman_lite_scroll_top_alignment == 'left-align'){
$plumber_handyman_lite_custom_css .='#button{';
	$plumber_handyman_lite_custom_css .='left: 3%;';
$plumber_handyman_lite_custom_css .='}';
}

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

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

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

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

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

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

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

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

// Scroll to top button shape 

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

// Footer Background Image Attachment 

$plumber_handyman_lite_footer_attachment = get_theme_mod( 'plumber_handyman_lite_background_attachment','scroll');
if($plumber_handyman_lite_footer_attachment == 'fixed'){
	$plumber_handyman_lite_custom_css .='.site-footer{';
		$plumber_handyman_lite_custom_css .='background-attachment: fixed;';
	$plumber_handyman_lite_custom_css .='}';
}elseif ($plumber_handyman_lite_footer_attachment == 'scroll'){
	$plumber_handyman_lite_custom_css .='.site-footer{';
		$plumber_handyman_lite_custom_css .='background-attachment: scroll;';
	$plumber_handyman_lite_custom_css .='}';
}

// Menu Hover Style	

$plumber_handyman_lite_menus_item = get_theme_mod( 'plumber_handyman_lite_menus_style','None');
if($plumber_handyman_lite_menus_item == 'None'){
	$plumber_handyman_lite_custom_css .='#site-navigation .menu ul li a:hover, .main-navigation .menu li a:hover{';
		$plumber_handyman_lite_custom_css .='';
	$plumber_handyman_lite_custom_css .='}';
}else if($plumber_handyman_lite_menus_item == 'Zoom In'){
	$plumber_handyman_lite_custom_css .='#site-navigation .menu ul li a:hover, .main-navigation .menu li a:hover{';
		$plumber_handyman_lite_custom_css .='transition: all 0.3s ease-in-out !important; transform: scale(1.2) !important;';
	$plumber_handyman_lite_custom_css .='}';

	$plumber_handyman_lite_custom_css .= '.main-navigation ul ul li a:hover {';
	$plumber_handyman_lite_custom_css .= 'margin-left: 20px;';
	$plumber_handyman_lite_custom_css .= '}';
}	
