<?php

$artist_painter_custom_css = "";


$artist_painter_primary_color = get_theme_mod('artist_painter_primary_color');
$artist_painter_second_color = get_theme_mod('artist_painter_second_color');

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// Scroll to top button shape 

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

// Footer Background Image Attachment 

$artist_painter_footer_attachment = get_theme_mod( 'artist_painter_background_attachment','scroll');
if($artist_painter_footer_attachment == 'fixed'){
	$artist_painter_custom_css .='.site-footer{';
		$artist_painter_custom_css .='background-attachment: fixed;';
	$artist_painter_custom_css .='}';
}elseif ($artist_painter_footer_attachment == 'scroll'){
	$artist_painter_custom_css .='.site-footer{';
		$artist_painter_custom_css .='background-attachment: scroll;';
	$artist_painter_custom_css .='}';
}

// Menu Hover Style	

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

// Post Content Alignment

$artist_painter_blog_layout_option = get_theme_mod( 'artist_painter_blog_layout_option','Left');
if($artist_painter_blog_layout_option == 'Left'){
	$artist_painter_custom_css .='.post{';
		$artist_painter_custom_css .='text-align: left;';
	$artist_painter_custom_css .='}';
}elseif ($artist_painter_blog_layout_option == 'Right'){
	$artist_painter_custom_css .='.post{';
		$artist_painter_custom_css .='text-align: right;';
	$artist_painter_custom_css .='}';
}elseif ($artist_painter_blog_layout_option == 'Center'){
	$artist_painter_custom_css .='.post{';
		$artist_painter_custom_css .='text-align: center;';
	$artist_painter_custom_css .='}';
}