<?php

  $solar_panel_distributor_color_palette_css = '';

	// Global Color

	$solar_panel_distributor_first_color = solar_panel_distributor_get_option('solar_panel_distributor_first_color');
	$solar_panel_distributor_second_color = solar_panel_distributor_get_option('solar_panel_distributor_second_color');

	if($solar_panel_distributor_first_color != false){
		$solar_panel_distributor_color_palette_css .=':root {';
			$solar_panel_distributor_color_palette_css .='--primary-color: '.esc_attr($solar_panel_distributor_first_color).'!important;';
			$solar_panel_distributor_color_palette_css .='--secondary-color: '.esc_attr($solar_panel_distributor_second_color).'!important;';
		$solar_panel_distributor_color_palette_css .='}';
	}

  /*-------------- Copyright Text Align-------------------*/

	$solar_panel_distributor_copyright_text_align = solar_panel_distributor_get_option('solar_panel_distributor_copyright_text_align');
	$solar_panel_distributor_color_palette_css .='.site-footer{';
	$solar_panel_distributor_color_palette_css .='text-align: '.esc_attr($solar_panel_distributor_copyright_text_align).' !important;';
	$solar_panel_distributor_color_palette_css .='}';
	$solar_panel_distributor_color_palette_css .='
	@media screen and (max-width:575px) {
	.site-footer{';
	$solar_panel_distributor_color_palette_css .='text-align: center !important;';
	$solar_panel_distributor_color_palette_css .='} }';

  // copyright font size
	$solar_panel_distributor_copyright_text_font_size = solar_panel_distributor_get_option('solar_panel_distributor_copyright_text_font_size');
	$solar_panel_distributor_color_palette_css .='#colophon p, #colophon a , #colophon{';
	$solar_panel_distributor_color_palette_css .='font-size: '.esc_attr($solar_panel_distributor_copyright_text_font_size).'px;';
	$solar_panel_distributor_color_palette_css .='}';

	// Copyright Background Color
	$solar_panel_distributor_copyright_background_color = solar_panel_distributor_get_option('solar_panel_distributor_copyright_background_color');
	$solar_panel_distributor_color_palette_css .='#colophon {';
	$solar_panel_distributor_color_palette_css .='background: '.esc_attr($solar_panel_distributor_copyright_background_color);
	$solar_panel_distributor_color_palette_css .='}';

	// Copyright Text Color
	$solar_panel_distributor_copyright_text_color = solar_panel_distributor_get_option('solar_panel_distributor_copyright_text_color');
	$solar_panel_distributor_color_palette_css .='#colophon a , #colophon{';
	$solar_panel_distributor_color_palette_css .='color: '.esc_attr($solar_panel_distributor_copyright_text_color);
	$solar_panel_distributor_color_palette_css .='}';

	// Site title And tagline Option
	$solar_panel_distributor_site_title_font_size = solar_panel_distributor_get_option('solar_panel_distributor_site_title_font_size');
	$solar_panel_distributor_site_title_color = solar_panel_distributor_get_option('solar_panel_distributor_site_title_color');
	$solar_panel_distributor_color_palette_css .='.site-title>a , .site-title {';
		$solar_panel_distributor_color_palette_css .='font-size: '.esc_attr($solar_panel_distributor_site_title_font_size).'px;';
		$solar_panel_distributor_color_palette_css .='color: '.esc_attr($solar_panel_distributor_site_title_color).';';
	$solar_panel_distributor_color_palette_css .='}';
	
	$solar_panel_distributor_site_tagline_font_size = solar_panel_distributor_get_option('solar_panel_distributor_site_tagline_font_size');
	if($solar_panel_distributor_site_tagline_font_size != false){
		$solar_panel_distributor_color_palette_css .='.site-description {';
			$solar_panel_distributor_color_palette_css .='font-size: '.esc_attr($solar_panel_distributor_site_tagline_font_size).'px;';
		$solar_panel_distributor_color_palette_css .='}';
	}

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

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

	// Sticky Copyright

	$solar_panel_distributor_resp_stickycopyright = solar_panel_distributor_get_option( 'solar_panel_distributor_stickycopyright_hide_show',false);
    if($solar_panel_distributor_resp_stickycopyright == true && solar_panel_distributor_get_option( 'solar_panel_distributor_copyright_sticky',false) != true){
        $solar_panel_distributor_color_palette_css  .='.copyright-sticky{';
            $solar_panel_distributor_color_palette_css  .='position:static;';
        $solar_panel_distributor_color_palette_css  .='} ';
    }

	/* Featured Image Hover Effect */
	$solar_panel_distributor_hover_effect = solar_panel_distributor_get_option( 'solar_panel_distributor_featured_image_hover', 'none' );

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

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

		switch ( $solar_panel_distributor_hover_effect ) {

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

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

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

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

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

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

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

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

	/* Product Featured Image Hover Effect */
	$solar_panel_distributor_hover_effect = solar_panel_distributor_get_option( 'solar_panel_distributor_product_featured_image_hover', 'none' );

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

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

		switch ( $solar_panel_distributor_hover_effect ) {

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

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

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

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

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

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

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

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