<?php

  $property_broker_color_palette_css = '';

	// Global Color

	$property_broker_first_color = property_broker_get_option('property_broker_first_color');
	$property_broker_second_color = property_broker_get_option('property_broker_second_color');

	if($property_broker_first_color != false){
		$property_broker_color_palette_css .=':root {';
			$property_broker_color_palette_css .='--primary-theme-color: '.esc_attr($property_broker_first_color).'!important;';
			$property_broker_color_palette_css .='--secondary-theme-color: '.esc_attr($property_broker_second_color).'!important;';
		$property_broker_color_palette_css .='}';
	}

	// Copyright Background Color
	$property_broker_copyright_background_color = property_broker_get_option('property_broker_copyright_background_color');
	$property_broker_color_palette_css .='#colophon {';
	$property_broker_color_palette_css .='background: '.esc_attr($property_broker_copyright_background_color);
	$property_broker_color_palette_css .='}';

	// Copyright Text Color
	$property_broker_copyright_text_color = property_broker_get_option('property_broker_copyright_text_color');
	$property_broker_color_palette_css .='#colophon a , #colophon{';
	$property_broker_color_palette_css .='color: '.esc_attr($property_broker_copyright_text_color);
	$property_broker_color_palette_css .='}';


	// Site title And tagline Option
	$property_broker_site_title_font_size = property_broker_get_option('property_broker_site_title_font_size');
	$property_broker_site_title_color = property_broker_get_option('property_broker_site_title_color');
	$property_broker_color_palette_css .='.site-title>a , .site-title {';
		$property_broker_color_palette_css .='font-size: '.esc_attr($property_broker_site_title_font_size).'px;';
		$property_broker_color_palette_css .='color: '.esc_attr($property_broker_site_title_color).';';
	$property_broker_color_palette_css .='}';
	
	$property_broker_site_tagline_font_size = property_broker_get_option('property_broker_site_tagline_font_size');
	if($property_broker_site_tagline_font_size != false){
		$property_broker_color_palette_css .='.site-description {';
			$property_broker_color_palette_css .='font-size: '.esc_attr($property_broker_site_tagline_font_size).'px;';
		$property_broker_color_palette_css .='}';
	}

	//First Cap
	$property_broker_show_first_caps = property_broker_get_option('property_broker_show_first_caps', false);
	if($property_broker_show_first_caps == 'true' ){
	$property_broker_color_palette_css .='.blog-content .text-content p:nth-of-type(1)::first-letter{';
	$property_broker_color_palette_css .=' font-size: 50px; font-weight: 600;';
	$property_broker_color_palette_css .=' margin-right: 5px;';
	$property_broker_color_palette_css .=' line-height: 1;';
	$property_broker_color_palette_css .='}';
	}elseif($property_broker_show_first_caps == 'false' ){
	$property_broker_color_palette_css .='.blog-content .text-content p:nth-of-type(1)::first-letter {';
	$property_broker_color_palette_css .='display: none;';
	$property_broker_color_palette_css .='}';
	}

	// preloader background image
	$property_broker_show_preloader_background_image = property_broker_get_option('property_broker_show_preloader_background_image');
	if($property_broker_show_preloader_background_image != false){
		$property_broker_color_palette_css .='#preloader {';
			$property_broker_color_palette_css .='background: url('.esc_attr($property_broker_show_preloader_background_image).');-webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;';
		$property_broker_color_palette_css .='}';
	}

	/* Featured Image Hover Effect */
	$property_broker_hover_effect = property_broker_get_option( 'property_broker_featured_image_hover', 'none' );

	if ( $property_broker_hover_effect !== 'none' ) {

		$property_broker_color_palette_css .= '.blog-post-img{';
		$property_broker_color_palette_css .= 'transition: all 0.4s ease-in-out;';
		$property_broker_color_palette_css .= '}';

		switch ( $property_broker_hover_effect ) {

			case 'zoom-in':
				$property_broker_color_palette_css .= '.blog-post-img:hover{transform:scale(1.2);}';
			break;

			case 'zoom-out':
				$property_broker_color_palette_css .= '.blog-post-img{transform:scale(1.2);}';
				$property_broker_color_palette_css .= '.blog-post-img:hover{transform:scale(1);}';
			break;

			case 'scale':
				$property_broker_color_palette_css .= '.blog-post-img:hover{transform:scale(1.1);}';
			break;

			case 'grayscale':
				$property_broker_color_palette_css .= '.blog-post-img{filter:grayscale(100%);}';
				$property_broker_color_palette_css .= '.blog-post-img:hover{filter:grayscale(0);}';
			break;

			case 'sepia':
				$property_broker_color_palette_css .= '.blog-post-img:hover{filter:sepia(100%);}';
			break;

			case 'blur':
				$property_broker_color_palette_css .= '.blog-post-img:hover{filter:blur(3px);}';
			break;

			case 'bright':
				$property_broker_color_palette_css .= '.blog-post-img:hover{filter:brightness(1.3);}';
			break;

			case 'translate':
				$property_broker_color_palette_css .= '.blog-post-img:hover{transform:translateY(-10px);}';
			break;
		}
	}

	/* Product Featured Image Hover Effect */
	$property_broker_hover_effect = property_broker_get_option( 'property_broker_product_featured_image_hover', 'none' );

	if ( $property_broker_hover_effect !== 'none' ) {

		$property_broker_color_palette_css .= '.product-img{';
		$property_broker_color_palette_css .= 'transition: all 0.4s ease-in-out;';
		$property_broker_color_palette_css .= '}';

		switch ( $property_broker_hover_effect ) {

			case 'zoom-in':
				$property_broker_color_palette_css .= '.product-img:hover{transform:scale(1.2);}';
			break;

			case 'zoom-out':
				$property_broker_color_palette_css .= '.product-img{transform:scale(1.2);}';
				$property_broker_color_palette_css .= '.product-img:hover{transform:scale(1);}';
			break;

			case 'scale':
				$property_broker_color_palette_css .= '.product-img:hover{transform:scale(1.1);}';
			break;

			case 'grayscale':
				$property_broker_color_palette_css .= '.product-img{filter:grayscale(100%);}';
				$property_broker_color_palette_css .= '.product-img:hover{filter:grayscale(0);}';
			break;

			case 'sepia':
				$property_broker_color_palette_css .= '.product-img:hover{filter:sepia(100%);}';
			break;

			case 'blur':
				$property_broker_color_palette_css .= '.product-img:hover{filter:blur(3px);}';
			break;

			case 'bright':
				$property_broker_color_palette_css .= '.product-img:hover{filter:brightness(1.3);}';
			break;

			case 'translate':
				$property_broker_color_palette_css .= '.product-img:hover{transform:translateY(-10px);}';
			break;
		}
	}