<?php 

	$party_villa_custom_style = '';

	// Logo Size
	$party_villa_logo_top_margin = get_theme_mod('party_villa_logo_top_margin');
	$party_villa_logo_bottom_margin = get_theme_mod('party_villa_logo_bottom_margin');
	$party_villa_logo_left_margin = get_theme_mod('party_villa_logo_left_margin');
	$party_villa_logo_right_margin = get_theme_mod('party_villa_logo_right_margin');

	if( $party_villa_logo_top_margin != '' || $party_villa_logo_bottom_margin != '' || $party_villa_logo_left_margin != '' || $party_villa_logo_right_margin != ''){
		$party_villa_custom_style .=' .logo {';
			$party_villa_custom_style .=' margin-top: '.esc_attr($party_villa_logo_top_margin).'px ;
			margin-bottom: '.esc_attr($party_villa_logo_bottom_margin).'px ;
			margin-left: '.esc_attr($party_villa_logo_left_margin).'px ;
			margin-right: '.esc_attr($party_villa_logo_right_margin).'px ;';
		$party_villa_custom_style .=' }';
	}

	$party_villa_logo_size = get_theme_mod('party_villa_logo_size');
	if( $party_villa_logo_size != '') {
		if($party_villa_logo_size == 100) {
			$party_villa_custom_style .=' .custom-logo-link img {';
				$party_villa_custom_style .=' width: 350px;';
			$party_villa_custom_style .=' }';
		} else if($party_villa_logo_size >= 10 && $party_villa_logo_size < 100) {
			$party_villa_custom_style .=' .custom-logo-link img {';
				$party_villa_custom_style .=' width: '.esc_attr($party_villa_logo_size).'%;';
			$party_villa_custom_style .=' }';
		}
	}

	// Site Title Font Size
	$party_villa_site_title_font_size = get_theme_mod('party_villa_site_title_font_size');
	if( $party_villa_site_title_font_size != ''){
		$party_villa_custom_style .=' .logo h1.site-title, .logo p.site-title {';
			$party_villa_custom_style .=' font-size: '.esc_attr($party_villa_site_title_font_size).'px;';
		$party_villa_custom_style .=' }';
	}

	$party_villa_site_title_color = get_theme_mod('party_villa_site_title_color');
	if ( $party_villa_site_title_color != '') {
		$party_villa_custom_style .=' h1.site-title a, p.site-title a{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_site_title_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_site_tagline_font_size = get_theme_mod('party_villa_site_tagline_font_size');
	if( $party_villa_site_tagline_font_size != ''){
		$party_villa_custom_style .=' p.site-description {';
			$party_villa_custom_style .=' font-size: '.esc_attr($party_villa_site_tagline_font_size).'px;';
		$party_villa_custom_style .=' }';
	}

	$party_villa_site_tagline_color = get_theme_mod('party_villa_site_tagline_color');
	if ( $party_villa_site_tagline_color != '') {
		$party_villa_custom_style .=' p.site-description{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_site_tagline_color).';';
		$party_villa_custom_style .=' }';
	}

	//layout width
	$party_villa_boxfull_width = get_theme_mod('party_villa_boxfull_width');
	if ($party_villa_boxfull_width !== '') {
		switch ($party_villa_boxfull_width) {
			case 'container':
				$party_villa_custom_style .= ' body, #header, .bottom-header {
					max-width: 1140px;
					width: 100%;
					padding-right: 15px;
					padding-left: 15px;
					margin-right: auto;
					margin-left: auto;
					}';
				break;
			case 'container-fluid':
				$party_villa_custom_style .= ' body, #header, .bottom-header { 
					width: 100%;
					padding-right: 15px;
					padding-left: 15px;
					margin-right: auto;
					margin-left: auto;
					}';
				break;
			case 'none':
				// No specific width specified, so no additional style needed.
				break;
			default:
				// Handle unexpected values.
				break;
		}
	}

	//Menu animation
	$party_villa_dropdown_anim = get_theme_mod('party_villa_dropdown_anim');

	if ( $party_villa_dropdown_anim != '') {
		$party_villa_custom_style .=' .nav-menu ul ul {';
			$party_villa_custom_style .=' animation:'.esc_attr($party_villa_dropdown_anim).' 1s ease;';
		$party_villa_custom_style .=' }';
	}

	// Header Image
	$header_image_url = party_villa_banner_image( $image_url = '' );
	if( $header_image_url != ''){
		$party_villa_custom_style .=' #inner-pages-header {';
			$party_villa_custom_style .=' background-image: url('. esc_url( $header_image_url ).'); background-size: cover; background-repeat: no-repeat; background-attachment: fixed;';
		$party_villa_custom_style .=' }';
		$party_villa_custom_style .=' .header-overlay {';
			$party_villa_custom_style .=' position: absolute; 	width: 100%; height: 100%; 	top: 0; left: 0; background: #000; opacity: 0.3;';
		$party_villa_custom_style .=' }';
	} else {
		$party_villa_custom_style .=' #inner-pages-header {';
			$party_villa_custom_style .=' background: linear-gradient(0deg,#ccc,#ccc 80%) no-repeat; ';
		$party_villa_custom_style .=' }';
	}

	$party_villa_phone_color = get_theme_mod('party_villa_phone_color');
	$party_villa_phonebdr_color = get_theme_mod('party_villa_phonebdr_color');
	if ( $party_villa_phone_color != '') {
		$party_villa_custom_style .=' #header a.phoneno {';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_phone_color).'; border-color:'.esc_attr($party_villa_phonebdr_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_menu_color = get_theme_mod('party_villa_menu_color');
	if ( $party_villa_menu_color != '') {
		$party_villa_custom_style .=' .nav-menu ul li a{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_menu_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_menuhvr_color = get_theme_mod('party_villa_menuhvr_color');
	if ( $party_villa_menuhvr_color != '') {
		$party_villa_custom_style .=' .nav-menu ul li a:hover{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_menuhvr_color).';';
		$party_villa_custom_style .=' }';
	}

	//slider color
	$party_villa_slider_hide_show = get_theme_mod('party_villa_slider_hide_show',false);
	if( $party_villa_slider_hide_show == true){
		$party_villa_custom_style .=' .page-template-custom-home-page #inner-pages-header {';
			$party_villa_custom_style .=' display:none;';
		$party_villa_custom_style .=' }';
	}

	$party_villa_slider_font_size = get_theme_mod('party_villa_slider_font_size');
	if( $party_villa_slider_font_size != ''){
		$party_villa_custom_style .=' #slider h2 {';
			$party_villa_custom_style .=' font-size: '.esc_attr($party_villa_slider_font_size).'px;';
		$party_villa_custom_style .=' }';
	}

	$party_villa_slider_text_font_size = get_theme_mod('party_villa_slider_text_font_size');
	if( $party_villa_slider_text_font_size != ''){
		$party_villa_custom_style .=' #slider p {';
			$party_villa_custom_style .=' font-size: '.esc_attr($party_villa_slider_text_font_size).'px;';
		$party_villa_custom_style .=' }';
	}

	$party_villa_slider_opacity = get_theme_mod('party_villa_slider_opacity');
	if ( $party_villa_slider_opacity != '') {
		$party_villa_custom_style .=' #slider img{';
			$party_villa_custom_style .=' opacity:'.esc_attr($party_villa_slider_opacity).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_slider_title_color = get_theme_mod('party_villa_slider_title_color');
	if ( $party_villa_slider_title_color != '') {
		$party_villa_custom_style .=' #slider h2 a{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_slider_title_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_slider_text_color = get_theme_mod('party_villa_slider_text_color');
	if ( $party_villa_slider_text_color != '') {
		$party_villa_custom_style .=' #slider p{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_slider_text_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_slider_btn_color = get_theme_mod('party_villa_slider_btn_color');
	$party_villa_slider_btnbg_color = get_theme_mod('party_villa_slider_btnbg_color');
	if ( $party_villa_slider_btn_color != '') {
		$party_villa_custom_style .=' #slider a.read-btn{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_slider_btn_color).'; background-color:'.esc_attr($party_villa_slider_btnbg_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_slider_btnhvr_color = get_theme_mod('party_villa_slider_btnhvr_color');
	$party_villa_slider_btnhvrbg_color = get_theme_mod('party_villa_slider_btnhvrbg_color');
	if ( $party_villa_slider_btnhvr_color != '') {
		$party_villa_custom_style .=' #slider a.read-btn:hover{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_slider_btnhvr_color).'; background-color:'.esc_attr($party_villa_slider_btnhvrbg_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_slider_np_color = get_theme_mod('party_villa_slider_np_color');
	if ( $party_villa_slider_np_color != '') {
		$party_villa_custom_style .=' #slider .carousel-control-prev-icon i, #slider .carousel-control-next-icon i{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_slider_np_color).'; border-color:'.esc_attr($party_villa_slider_np_color).';';
		$party_villa_custom_style .=' }';
	}

	//service color
	$party_villa_section_title_font_size = get_theme_mod('party_villa_section_title_font_size');
	if( $party_villa_section_title_font_size != ''){
		$party_villa_custom_style .=' #service-section h3 {';
			$party_villa_custom_style .=' font-size: '.esc_attr($party_villa_section_title_font_size).'px;';
		$party_villa_custom_style .=' }';
	}

	$party_villa_service_color = get_theme_mod('party_villa_service_color');
	if ( $party_villa_service_color != '') {
		$party_villa_custom_style .=' #service-section h3{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_service_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_servicebdr_color = get_theme_mod('party_villa_servicebdr_color');
	if ( $party_villa_servicebdr_color != '') {
		$party_villa_custom_style .=' #service-section h3:after, #service-section h3:before{';
			$party_villa_custom_style .=' background:'.esc_attr($party_villa_servicebdr_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_service_title_color = get_theme_mod('party_villa_service_title_color');
	if ( $party_villa_service_title_color != '') {
		$party_villa_custom_style .=' #service-section .service-box h4 a{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_service_title_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_service_text_color = get_theme_mod('party_villa_service_text_color');
	if ( $party_villa_service_text_color != '') {
		$party_villa_custom_style .=' #service-section .service-box p{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_service_text_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_service_btn_color = get_theme_mod('party_villa_service_btn_color');
	$party_villa_service_btnbg_color = get_theme_mod('party_villa_service_btnbg_color');
	if ( $party_villa_service_btn_color != '') {
		$party_villa_custom_style .=' #service-section a.read-btn{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_service_btn_color).'; background-color:'.esc_attr($party_villa_service_btnbg_color).';';
		$party_villa_custom_style .=' }';
	}

	// footer css
	$party_villa_copyright_padding = get_theme_mod('party_villa_copyright_padding');
	if( $party_villa_copyright_padding != ''){
		$party_villa_custom_style .=' .site-info {';
			$party_villa_custom_style .=' padding-top: '.esc_attr($party_villa_copyright_padding).'px; padding-bottom: '.esc_attr($party_villa_copyright_padding).'px;';
		$party_villa_custom_style .=' }';
	}

	$party_villa_tbtext_color = get_theme_mod('party_villa_tbtext_color');
	$party_villa_tbbg_color = get_theme_mod('party_villa_tbbg_color');
	if ( $party_villa_tbtext_color != '') {
		$party_villa_custom_style .=' .back-to-top{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_tbtext_color).'; background-color:'.esc_attr($party_villa_tbbg_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_footer_widget_color = get_theme_mod('party_villa_footer_widget_color');
	if ( $party_villa_footer_widget_color != '') {
		$party_villa_custom_style .=' .site-footer h2.widget-title{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_footer_widget_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_footer_widget_menu_color = get_theme_mod('party_villa_footer_widget_menu_color');
	if ( $party_villa_footer_widget_menu_color != '') {
		$party_villa_custom_style .=' .widget ul li a, .site-footer .widget-area ul li a, .site-footer .widget-area ul li a{';
			$party_villa_custom_style .=' color:'.esc_attr($party_villa_footer_widget_menu_color).';';
		$party_villa_custom_style .=' }';
	}

	$party_villa_footerbg_color = get_theme_mod('party_villa_footerbg_color');
	if ( $party_villa_footerbg_color != '') {
		$party_villa_custom_style .=' .footer-overlay{';
			$party_villa_custom_style .=' background-color:'.esc_attr($party_villa_footerbg_color).';';
		$party_villa_custom_style .=' }';
	}