<?php

$esports_blog_custom_css = "";


$esports_blog_primary_color = get_theme_mod('esports_blog_primary_color');
$esports_blog_second_color = get_theme_mod('esports_blog_second_color');

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// Scroll to top button shape 

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

// Footer Background Image Attachment 

$esports_blog_footer_attachment = get_theme_mod( 'esports_blog_background_attachment','scroll');
if($esports_blog_footer_attachment == 'fixed'){
	$esports_blog_custom_css .='.site-footer{';
		$esports_blog_custom_css .='background-attachment: fixed;';
	$esports_blog_custom_css .='}';
}elseif ($esports_blog_footer_attachment == 'scroll'){
	$esports_blog_custom_css .='.site-footer{';
		$esports_blog_custom_css .='background-attachment: scroll;';
	$esports_blog_custom_css .='}';
}

// Menu Hover Style	

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

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

// Post Content Alignment

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