<?php

$farm_adventure_resort_custom_css = "";
$farm_adventure_resort_primary_color = get_theme_mod('farm_adventure_resort_primary_color');
$farm_adventure_resort_secondary_color = get_theme_mod('farm_adventure_resort_secondary_color');

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/*-------------------- Slider -------------------*/

$farm_adventure_resort_slider_setting = get_theme_mod('farm_adventure_resort_slider_setting', false);
if($farm_adventure_resort_slider_setting != true){
	$farm_adventure_resort_custom_css .='.page-template-template-home .head_bg{';
		$farm_adventure_resort_custom_css .='position: static; margin-bottom: 20px; background-color: var(--primary-color);';
	$farm_adventure_resort_custom_css .='}';
	$farm_adventure_resort_custom_css .='.page-template-template-home .main-header .header-bg:before{';
		$farm_adventure_resort_custom_css .='content: none;';
	$farm_adventure_resort_custom_css .='}';
}