<?php

$plumber_workshop_custom_css = "";

$plumber_workshop_primary_color = get_theme_mod('plumber_workshop_primary_color');
$plumber_workshop_second_color = get_theme_mod('plumber_workshop_second_color');

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

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

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

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

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

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

if($plumber_workshop_theme_width == 'full-width'){
$plumber_workshop_custom_css .='body{';
	$plumber_workshop_custom_css .='max-width: 100% !important;';
$plumber_workshop_custom_css .='}';
}else if($plumber_workshop_theme_width == 'container'){
$plumber_workshop_custom_css .='body{';
	$plumber_workshop_custom_css .='width: 85% !important; padding-right: 15px; padding-left: 15px;  margin-right: auto !important; margin-left: auto !important;';
$plumber_workshop_custom_css .='}';
$plumber_workshop_custom_css .='.page-template-template-home .site-header, .sticky-head{';
	$plumber_workshop_custom_css .='width: 83%; left: 0; right: 0; margin: 0 auto;';
$plumber_workshop_custom_css .='}';
}else if($plumber_workshop_theme_width == 'container-fluid'){
$plumber_workshop_custom_css .='body{';
	$plumber_workshop_custom_css .='width: 95% !important;padding-right: 15px;padding-left: 15px;margin-right: auto;margin-left: auto;';
$plumber_workshop_custom_css .='}';
$plumber_workshop_custom_css .='.page-template-template-home .site-header, .sticky-head{';
	$plumber_workshop_custom_css .='width: 93%; left: 0; right: 0; margin: 0 auto;';
$plumber_workshop_custom_css .='}';
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// Scroll to top button shape 

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

// Footer Background Image Attachment 

$plumber_workshop_footer_attachment = get_theme_mod( 'plumber_workshop_background_attachment','scroll');
if($plumber_workshop_footer_attachment == 'fixed'){
	$plumber_workshop_custom_css .='.site-footer{';
		$plumber_workshop_custom_css .='background-attachment: fixed;';
	$plumber_workshop_custom_css .='}';
}elseif ($plumber_workshop_footer_attachment == 'scroll'){
	$plumber_workshop_custom_css .='.site-footer{';
		$plumber_workshop_custom_css .='background-attachment: scroll;';
	$plumber_workshop_custom_css .='}';
}

// Menu Hover Style	

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