<?php

$plumbing_technician_custom_css = "";

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

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

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

	$plumbing_technician_single_page_content_alignment = get_theme_mod('plumbing_technician_single_page_content_alignment', 'left');
	if ($plumbing_technician_single_page_content_alignment == 'left') {
	    $plumbing_technician_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{';
	    $plumbing_technician_custom_css .= 'text-align: left !important;';
	    $plumbing_technician_custom_css .= '}';
	} else if ($plumbing_technician_single_page_content_alignment == 'center') {
	    $plumbing_technician_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{';
	    $plumbing_technician_custom_css .= 'text-align: center !important;';
	    $plumbing_technician_custom_css .= '}';
	} else if ($plumbing_technician_single_page_content_alignment == 'right') {
	    $plumbing_technician_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{';
	    $plumbing_technician_custom_css .= 'text-align: right !important;';
	    $plumbing_technician_custom_css .= '}';
	}

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

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

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

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


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

	$plumbing_technician_global_color = get_theme_mod('plumbing_technician_global_color', '#217CDF'); // Add a fallback if the color isn't set

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

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

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

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

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

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

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

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

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

	// FOOTER

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

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

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

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

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

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

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

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

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

	$plumbing_technician_header_submenus_hover_color = get_theme_mod('plumbing_technician_header_submenus_hover_color');
	if($plumbing_technician_header_submenus_hover_color != false){
		$plumbing_technician_custom_css .='.site-navigation .primary-menu > li ul.sub-menu a:hover,.site-navigation .primary-menu li ul li a:hover{';
			$plumbing_technician_custom_css .='color: '.esc_attr($plumbing_technician_header_submenus_hover_color).'!important;';
		$plumbing_technician_custom_css .='}';
	}