<?php

$travel_planning_custom_css = "";


$travel_planning_primary_color = get_theme_mod('travel_planning_primary_color');
$travel_planning_second_color = get_theme_mod('travel_planning_second_color');

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// Scroll to top button shape 

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

// Footer Background Image Attachment 

$travel_planning_footer_attachment = get_theme_mod( 'travel_planning_background_attachment','scroll');
if($travel_planning_footer_attachment == 'fixed'){
	$travel_planning_custom_css .='.site-footer{';
		$travel_planning_custom_css .='background-attachment: fixed;';
	$travel_planning_custom_css .='}';
}elseif ($travel_planning_footer_attachment == 'scroll'){
	$travel_planning_custom_css .='.site-footer{';
		$travel_planning_custom_css .='background-attachment: scroll;';
	$travel_planning_custom_css .='}';
}

// Menu Hover Style	

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

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