<?php

$safety_wear_custom_css = "";

$safety_wear_primary_color = get_theme_mod('safety_wear_primary_color');

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

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

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

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

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

/*-------------------- Post Content Alignment-------------------*/

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

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

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

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

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

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

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

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

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

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

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

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

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

	// Scroll to top button shape 

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

  // Footer Background Image Attatchment 

	$safety_wear_footer_attatchment = get_theme_mod( 'safety_wear_background_attatchment','scroll');
	if($safety_wear_footer_attatchment == 'fixed'){
		$safety_wear_custom_css .='.site-footer{';
			$safety_wear_custom_css .='background-attachment: fixed;';
		$safety_wear_custom_css .='}';
	}elseif ($safety_wear_footer_attatchment == 'scroll'){
		$safety_wear_custom_css .='.site-footer{';
			$safety_wear_custom_css .='background-attachment: scroll;';
		$safety_wear_custom_css .='}';
	}

  // Menu Hover Style	

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