<?php

$electrician_company_custom_css = "";

	$electrician_company_theme_pagination_options_alignment = get_theme_mod('electrician_company_theme_pagination_options_alignment', 'Center');
	if ($electrician_company_theme_pagination_options_alignment == 'Center') {
		$electrician_company_custom_css .= '.navigation.pagination,.navigation.posts-navigation .nav-links{';
		$electrician_company_custom_css .= 'justify-content: center;margin: 0 auto;';
		$electrician_company_custom_css .= '}';
	} else if ($electrician_company_theme_pagination_options_alignment == 'Right') {
		$electrician_company_custom_css .= '.navigation.pagination,.navigation.posts-navigation .nav-links{';
		$electrician_company_custom_css .= 'justify-content: right;margin: 0 0 0 auto;';
		$electrician_company_custom_css .= '}';
	} else if ($electrician_company_theme_pagination_options_alignment == 'Left') {
		$electrician_company_custom_css .= '.navigation.pagination,.navigation.posts-navigation .nav-links{';
		$electrician_company_custom_css .= 'justify-content: left;margin: 0 auto 0 0;';
		$electrician_company_custom_css .= '}';
	}

	$electrician_company_theme_breadcrumb_enable = get_theme_mod('electrician_company_theme_breadcrumb_enable',true);
    if($electrician_company_theme_breadcrumb_enable != true){
        $electrician_company_custom_css .='nav.breadcrumb-trail.breadcrumbs,nav.woocommerce-breadcrumb{';
            $electrician_company_custom_css .='display: none;';
        $electrician_company_custom_css .='}';
    }

	$electrician_company_theme_breadcrumb_options_alignment = get_theme_mod('electrician_company_theme_breadcrumb_options_alignment', 'Left');
	if ($electrician_company_theme_breadcrumb_options_alignment == 'Center') {
	    $electrician_company_custom_css .= '.breadcrumbs ul,nav.woocommerce-breadcrumb{';
	    $electrician_company_custom_css .= 'text-align: center !important;';
	    $electrician_company_custom_css .= '}';
	} else if ($electrician_company_theme_breadcrumb_options_alignment == 'Right') {
	    $electrician_company_custom_css .= '.breadcrumbs ul,nav.woocommerce-breadcrumb{';
	    $electrician_company_custom_css .= 'text-align: Right !important;';
	    $electrician_company_custom_css .= '}';
	} else if ($electrician_company_theme_breadcrumb_options_alignment == 'Left') {
	    $electrician_company_custom_css .= '.breadcrumbs ul,nav.woocommerce-breadcrumb{';
	    $electrician_company_custom_css .= 'text-align: Left !important;';
	    $electrician_company_custom_css .= '}';
	}

	$electrician_company_single_page_content_alignment = get_theme_mod('electrician_company_single_page_content_alignment', 'left');
	if ($electrician_company_single_page_content_alignment == 'left') {
	    $electrician_company_custom_css .= '#single-page .type-page,section.theme-custom-block.theme-error-sectiontheme-error-section.error-block-middle,section.theme-custom-block.theme-error-section.error-block-heading .theme-area-header{';
	    $electrician_company_custom_css .= 'text-align: left !important;';
	    $electrician_company_custom_css .= '}';
	} else if ($electrician_company_single_page_content_alignment == 'center') {
	    $electrician_company_custom_css .= '#single-page .type-page,section.theme-custom-block.theme-error-sectiontheme-error-section.error-block-middle,section.theme-custom-block.theme-error-section.error-block-heading .theme-area-header{';
	    $electrician_company_custom_css .= 'text-align: center !important;';
	    $electrician_company_custom_css .= '}';
	} else if ($electrician_company_single_page_content_alignment == 'right') {
	    $electrician_company_custom_css .= '#single-page .type-page,section.theme-custom-block.theme-error-sectiontheme-error-section.error-block-middle,section.theme-custom-block.theme-error-section.error-block-heading .theme-area-header{';
	    $electrician_company_custom_css .= 'text-align: right !important;';
	    $electrician_company_custom_css .= '}';
	}

	$electrician_company_single_post_content_alignment = get_theme_mod('electrician_company_single_post_content_alignment', 'left');
	if ($electrician_company_single_post_content_alignment == 'left') {
	    $electrician_company_custom_css .= '#single-page .type-post,#single-page .type-post .entry-meta,#single-page .type-post .is-layout-flex{';
	    $electrician_company_custom_css .= 'text-align: left !important;justify-content: left;';
	    $electrician_company_custom_css .= '}';
	} else if ($electrician_company_single_post_content_alignment == 'center') {
	    $electrician_company_custom_css .= '#single-page .type-post,#single-page .type-post .entry-meta,#single-page .type-post .is-layout-flex{';
	    $electrician_company_custom_css .= 'text-align: center !important;justify-content: center;';
	    $electrician_company_custom_css .= '}';
	} else if ($electrician_company_single_post_content_alignment == 'right') {
	    $electrician_company_custom_css .= '#single-page .type-post,#single-page .type-post .entry-meta,#single-page .type-post .is-layout-flex{';
	    $electrician_company_custom_css .= 'text-align: right !important;justify-content: right;';
	    $electrician_company_custom_css .= '}';
	}

	$electrician_company_menu_text_transform = get_theme_mod('electrician_company_menu_text_transform', 'Capitalize');
	if ($electrician_company_menu_text_transform == 'Capitalize') {
	    $electrician_company_custom_css .= '.site-navigation .primary-menu > li a{';
	    $electrician_company_custom_css .= 'text-transform: Capitalize !important;';
	    $electrician_company_custom_css .= '}';
	} else if ($electrician_company_menu_text_transform == 'uppercase') {
	    $electrician_company_custom_css .= '.site-navigation .primary-menu > li a{';
	    $electrician_company_custom_css .= 'text-transform: uppercase !important;';
	    $electrician_company_custom_css .= '}';
	} else if ($electrician_company_menu_text_transform == 'lowercase') {
	    $electrician_company_custom_css .= '.site-navigation .primary-menu > li a{';
	    $electrician_company_custom_css .= 'text-transform: lowercase !important;';
	    $electrician_company_custom_css .= '}';
	}

	$electrician_company_footer_widget_title_alignment = get_theme_mod('electrician_company_footer_widget_title_alignment', 'left');
	if ($electrician_company_footer_widget_title_alignment == 'left') {
	    $electrician_company_custom_css .= 'h2.widget-title{';
	    $electrician_company_custom_css .= 'text-align: left !important;';
	    $electrician_company_custom_css .= '}';
	} else if ($electrician_company_footer_widget_title_alignment == 'center') {
	    $electrician_company_custom_css .= 'h2.widget-title{';
	    $electrician_company_custom_css .= 'text-align: center !important;';
	    $electrician_company_custom_css .= '}';
	} else if ($electrician_company_footer_widget_title_alignment == 'right') {
	    $electrician_company_custom_css .= 'h2.widget-title{';
	    $electrician_company_custom_css .= 'text-align: right !important;';
	    $electrician_company_custom_css .= '}';
	}

    $electrician_company_show_hide_related_product = get_theme_mod('electrician_company_show_hide_related_product',true);
    if($electrician_company_show_hide_related_product != true){
        $electrician_company_custom_css .='.related.products{';
            $electrician_company_custom_css .='display: none;';
        $electrician_company_custom_css .='}';
    }

	$electrician_company_sticky_sidebar = get_theme_mod('electrician_company_sticky_sidebar',true);
    if($electrician_company_sticky_sidebar != true){
        $electrician_company_custom_css .='.widget-area-wrapper{';
            $electrician_company_custom_css .='position: relative !important;';
        $electrician_company_custom_css .='}';
    }

	/*-------------------- Global First Color -------------------*/

	$electrician_company_global_color = get_theme_mod('electrician_company_global_color', '#2457AA'); // Add a fallback if the color isn't set

	if ($electrician_company_global_color) {
		$electrician_company_custom_css .= ':root {';
		$electrician_company_custom_css .= '--global-color: ' . esc_attr($electrician_company_global_color) . ';';
		$electrician_company_custom_css .= '}';
	}

	/*-------------------- Global First Color -------------------*/

	$electrician_company_secondary_color = get_theme_mod('electrician_company_secondary_color', '#FFD200'); // Add a fallback if the color isn't set

	if ($electrician_company_secondary_color) {
		$electrician_company_custom_css .= ':root {';
		$electrician_company_custom_css .= '--secondary-color: ' . esc_attr($electrician_company_secondary_color) . ';';
		$electrician_company_custom_css .= '}';
	}

	/*-------------------- Content Font -------------------*/

	$electrician_company_content_typography_font = get_theme_mod('electrician_company_content_typography_font', 'roboto'); // Add a fallback if the color isn't set

	if ($electrician_company_content_typography_font) {
		$electrician_company_custom_css .= ':root {';
		$electrician_company_custom_css .= '--font-main: ' . esc_attr($electrician_company_content_typography_font) . ';';
		$electrician_company_custom_css .= '}';
	}

	/*-------------------- Heading Font -------------------*/

	$electrician_company_heading_typography_font = get_theme_mod('electrician_company_heading_typography_font', 'roboto'); // Add a fallback if the color isn't set

	if ($electrician_company_heading_typography_font) {
		$electrician_company_custom_css .= ':root {';
		$electrician_company_custom_css .= '--font-head: ' . esc_attr($electrician_company_heading_typography_font) . ';';
		$electrician_company_custom_css .= '}';
	}

	$electrician_company_columns = get_theme_mod('electrician_company_posts_per_columns', 3);
	$electrician_company_columns = absint($electrician_company_columns);
	if ( $electrician_company_columns < 1 || $electrician_company_columns > 6 ) {
		$electrician_company_columns = 3;
	}
	$electrician_company_custom_css .= "
		.site-content .article-wraper-archive {
			grid-template-columns: repeat({$electrician_company_columns}, 1fr);
		}
	";

	$electrician_company_copyright_alignment = get_theme_mod( 'electrician_company_copyright_alignment', 'Default' );
	if ( $electrician_company_copyright_alignment === 'Reverse' ) {
		$electrician_company_custom_css .= '.site-info .column-row { flex-direction: row-reverse; }';
		$electrician_company_custom_css .= '.footer-credits { justify-content: flex-end; }';
		$electrician_company_custom_css .= '.footer-copyright { text-align: right; }';
		$electrician_company_custom_css .= '.site-info .column.column-3 { text-align: left; }';
	} elseif ( $electrician_company_copyright_alignment === 'Center' ) {
		$electrician_company_custom_css .= '.site-info .column-row { flex-direction: column; align-items: center; gap: 15px; }';
		$electrician_company_custom_css .= '.footer-credits { justify-content: center; }';
		$electrician_company_custom_css .= '.footer-copyright { text-align: center; }';
		$electrician_company_custom_css .= '.site-info .column.column-3 { text-align: center; }';
	}

	$electrician_company_footer_widget_background_color = get_theme_mod('electrician_company_footer_widget_background_color');
	if ($electrician_company_footer_widget_background_color) {

		$electrician_company_custom_css .= "
			.footer-widgetarea {
				background-color: ". esc_attr($electrician_company_footer_widget_background_color) .";
			}
		";
	}

	$electrician_company_footer_widget_background_image = get_theme_mod('electrician_company_footer_widget_background_image');
	if ($electrician_company_footer_widget_background_image) {
		$electrician_company_custom_css .= "
			.footer-widgetarea {
				background-image: url(" . esc_url($electrician_company_footer_widget_background_image) . ");
			}
		";
	}

	$electrician_company_copyright_font_size = get_theme_mod('electrician_company_copyright_font_size');
	if ($electrician_company_copyright_font_size) {

		$electrician_company_custom_css .= "
			.footer-copyright {
				font-size: ". esc_attr($electrician_company_copyright_font_size) ."px;
			}
		";
	}

	/*-------------------- Menu Color CSS -------------------*/

	$electrician_company_header_menus_color = get_theme_mod('electrician_company_header_menus_color');
	if($electrician_company_header_menus_color != false){
		$electrician_company_custom_css .='.site-navigation .primary-menu a{';
			$electrician_company_custom_css .='color: '.esc_attr($electrician_company_header_menus_color).'!important;';
		$electrician_company_custom_css .='}';
	}

	$electrician_company_header_menus_hover_color = get_theme_mod('electrician_company_header_menus_hover_color');
	if($electrician_company_header_menus_hover_color != false){
		$electrician_company_custom_css .='.site-navigation .primary-menu a:hover{';
			$electrician_company_custom_css .='color: '.esc_attr($electrician_company_header_menus_hover_color).'!important;';
		$electrician_company_custom_css .='}';
	}

	$electrician_company_header_submenus_color = get_theme_mod('electrician_company_header_submenus_color');
	if($electrician_company_header_submenus_color != false){
		$electrician_company_custom_css .='.site-navigation .primary-menu li ul li a{';
			$electrician_company_custom_css .='color: '.esc_attr($electrician_company_header_submenus_color).'!important;';
		$electrician_company_custom_css .='}';
	}

	$electrician_company_header_submenus_hover_color = get_theme_mod('electrician_company_header_submenus_hover_color');
	if($electrician_company_header_submenus_hover_color != false){
		$electrician_company_custom_css .='.site-navigation .primary-menu li ul li a:hover{';
			$electrician_company_custom_css .='color: '.esc_attr($electrician_company_header_submenus_hover_color).'!important;';
		$electrician_company_custom_css .='}';
	}