<?php
function mobilerepaircenter_custom_header_setup() {
	add_theme_support( 'custom-header', apply_filters( 'mobilerepaircenter_custom_header_args', array(
		'default-image'          => '',
		'default-text-color'     => 'fff',
		'width'                  => 2000, 
		'height'                 => 200,
		'flex-height'            => true,
		'wp-head-callback'       => 'mobilerepaircenter_header_style',
	) ) );
}
add_action( 'after_setup_theme', 'mobilerepaircenter_custom_header_setup' );

if ( ! function_exists( 'mobilerepaircenter_header_style' ) ) :

function mobilerepaircenter_header_style() {
	$header_text_color = get_header_textcolor();

	$topheader_logowidth = esc_attr(get_theme_mod('topheader_logowidth','auto'));

	$mobilerepaircenter_logo_top_padding = esc_attr(get_theme_mod('mobilerepaircenter_logo_top_padding','2'));
	$mobilerepaircenter_logo_left_padding = esc_attr(get_theme_mod('mobilerepaircenter_logo_left_padding','2'));
	$mobilerepaircenter_logo_bottom_padding = esc_attr(get_theme_mod('mobilerepaircenter_logo_bottom_padding','2'));
	$mobilerepaircenter_logo_right_padding = esc_attr(get_theme_mod('mobilerepaircenter_logo_right_padding','2'));


  	$feature_disable_section = esc_attr(get_theme_mod('feature_disable_section','YES'));
  	$ourservice_disable_section = esc_attr(get_theme_mod('ourservice_disable_section','YES'));
  	$aboutus_disable_section = esc_attr(get_theme_mod('aboutus_disable_section','YES'));


	?>
	<style type="text/css">


		<?php 
		
		?>


		.site-logo img {
			width: <?php echo apply_filters('mobilerepaircenter_topheader', $topheader_logowidth); ?>;
		}

		.site-logo img {
			padding-top: <?php echo apply_filters('mobilerepaircenter_topheader', $mobilerepaircenter_logo_top_padding); ?>px;
			padding-left: <?php echo apply_filters('mobilerepaircenter_topheader', $mobilerepaircenter_logo_left_padding); ?>px;
			padding-bottom: <?php echo apply_filters('mobilerepaircenter_topheader', $mobilerepaircenter_logo_bottom_padding); ?>px;
			padding-right: <?php echo apply_filters('mobilerepaircenter_topheader', $mobilerepaircenter_logo_right_padding); ?>px;
		}


		header.site-header .site-title {
			color: <?php echo esc_attr(get_theme_mod('topheader_sitetitlecol')); ?>;
		}

		header.site-header .site-logo a {
			text-decoration-color: <?php echo esc_attr(get_theme_mod('topheader_sitetitlecol')); ?> !important;
		}

		p.site-description {
			color: <?php echo esc_attr(get_theme_mod('topheader_taglinecol')); ?>;
		}
		



		header .tophead, .header-section {
			background: <?php echo esc_attr(get_theme_mod('header_topheadbgcolor')); ?>;
		}
		
		header .tophead p {
			color: <?php echo esc_attr(get_theme_mod('header_topheadtextcolor')); ?>;
		}

		header .detilbx i {
			color: <?php echo esc_attr(get_theme_mod('header_topheadmailtimeiconscolor')); ?>;
		}

		header .detilbx p {
			color: <?php echo esc_attr(get_theme_mod('header_topheadmailtimetextcolor')); ?>;
		}

		header .detil a:hover p {
			color: <?php echo esc_attr(get_theme_mod('header_topheadtexthovercolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li a, .main-header .navbar .navbar-menu ul li.dropdown>a::after {
			color: <?php echo esc_attr(get_theme_mod('header_menuscolor')); ?>;
		}

		.main-header .navbar .navbar-nav > li:hover a, .main-header .navbar .navbar-nav > li.focus a, .main-header .navbar .navbar-nav > li.active a, .main-header .navbar .navbar-nav > li a.active,.main-header .navbar .navbar-menu ul li:hover.dropdown>a::after {
			color: <?php echo esc_attr(get_theme_mod('header_menushovercolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a:not(.remove) {
			color: <?php echo esc_attr(get_theme_mod('header_submenutextcolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu>.dropdown:after {
			color: <?php echo esc_attr(get_theme_mod('header_submenutexticoncolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a {
			background: <?php echo esc_attr(get_theme_mod('header_submenusbgcolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a:not(.remove) {
			border-left-color: <?php echo esc_attr(get_theme_mod('header_submenusbordercolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a:hover {
			background: <?php echo esc_attr(get_theme_mod('header_submenusbghovercolor')); ?> !important;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a:hover{
			color: <?php echo esc_attr(get_theme_mod('header_submenustxthovercolor')); ?>;
		}

		header #formButton:after {
			color: <?php echo esc_attr(get_theme_mod('header_searchicon_color')); ?>;
		}

		header .phonenumber i {
			color: <?php echo esc_attr(get_theme_mod('header_phoneicon_color')); ?>;
		}
	
		header .phonenumber i {
			background: <?php echo esc_attr(get_theme_mod('header_phoneiconbg_color')); ?>;
		}
		
		header .phonenumber p.subtooltiptext {
			color: <?php echo esc_attr(get_theme_mod('header_phonetext_color')); ?>;
		}

		header .phonenumber p.tooltiptext {
			color: <?php echo esc_attr(get_theme_mod('header_phonenumber_color')); ?>;
		}
	




		.hero-style .slide-title h2 {
			color: <?php echo esc_attr(get_theme_mod('slider_titlecolor')); ?> !important;
		}

		.hero-style .slide-text p {
			color: <?php echo esc_attr(get_theme_mod('slider_descriptioncolor')); ?>;
		}

		.hero-style a.contactus {
			color: <?php echo esc_attr(get_theme_mod('slider_btntxt1color')); ?>;
			border-color: <?php echo esc_attr(get_theme_mod('slider_btntxt1color')); ?>;
		}

		.hero-style a.contactus:hover {
			color: <?php echo esc_attr(get_theme_mod('slider_btntxthrvcolor')); ?> !important;
		}

		.hero-style a.ReadMore {
			color: <?php echo esc_attr(get_theme_mod('slider_btntxt2color')); ?>;
			border-color: <?php echo esc_attr(get_theme_mod('slider_btntxt2color')); ?>;
		}

		.hero-style a.ReadMore {
			background: <?php echo esc_attr(get_theme_mod('slider_btn2bgcolor')); ?> !important;
		}

		.hero-style a.ReadMore:hover {
			color: <?php echo esc_attr(get_theme_mod('slider_btn2txthrvcolor')); ?> !important;
		}

		.next-sec-tab a {
			background: <?php echo esc_attr(get_theme_mod('slider_scrolldownarrowbgcolor')); ?> !important;
		}

		.hero-slider .mobile_repair_centerswiper-button-prev i, 
		.hero-slider .mobile_repair_centerswiper-button-next i {
			color: <?php echo esc_attr(get_theme_mod('slider_arrowiconcolor')); ?> !important;
		}

		.hero-slider .mobile_repair_centerswiper-button-prev, 
		.hero-slider .mobile_repair_centerswiper-button-next {
			background: <?php echo esc_attr(get_theme_mod('slider_arrowiconbgcolor')); ?> !important;
		}

		.hero-slider .mobile_repair_centerswiper-button-prev:hover i,
		.hero-slider .mobile_repair_centerswiper-button-next:hover i {
			color: <?php echo esc_attr(get_theme_mod('slider_arrowiconhrvcolor')); ?> !important;
		}


		/* Feature */

		#feature-section .heading h2 {
			color: <?php echo esc_attr(get_theme_mod('feature_headingcolor')); ?>;
		}

		#feature-section .box-space i {
			color: <?php echo esc_attr(get_theme_mod('feature_iconcolor')); ?>;
		}

		#feature-section .box-space h3 {
			color: <?php echo esc_attr(get_theme_mod('feature_titlecolor')); ?>;
		}


		/* Our Service */

		#ourservice-section .heading h2 {
			color: <?php echo esc_attr(get_theme_mod('ourservice_headingcolor')); ?>;
		}

		#ourservice-section .ourtbx .single-ourservice h3 {
			color: <?php echo esc_attr(get_theme_mod('ourservice_boxtitlecolor')); ?>;
		}

		#ourservice-section .sercontbx p {
			color: <?php echo esc_attr(get_theme_mod('ourservice_boxdescriptioncolor')); ?>;
		}


		/* about us */
		
		#aboutus-section .abt-subtitle h4 {
			color: <?php echo esc_attr(get_theme_mod('aboutus_subtitlecolor')); ?>;
		}

		#aboutus-section .abt-subtitle h4:before {
			color: <?php echo esc_attr(get_theme_mod('aboutus_subtitlebordercolor')); ?>;
		}

		#aboutus-section .abt-dbx h2 {
			color: <?php echo esc_attr(get_theme_mod('aboutus_titlecolor')); ?>;
		}

		#aboutus-section .abt-box {
			color: <?php echo esc_attr(get_theme_mod('aboutus_descriptioncolor')); ?>;
		}

		#aboutus-section .lists p i {
			color: <?php echo esc_attr(get_theme_mod('aboutus_listiconcolor')); ?>;
		}

		#aboutus-section .lists p {
			color: <?php echo esc_attr(get_theme_mod('aboutus_listcolor')); ?>;
		}

		#aboutus-section .box2 .text h2 {
			color: <?php echo esc_attr(get_theme_mod('aboutus_boxnumbercolor')); ?>;
		}

		#aboutus-section .box2 .text p {
			color: <?php echo esc_attr(get_theme_mod('aboutus_boxtitle_color')); ?>;
		}

		#aboutus-section .box2 .text {
			background: <?php echo esc_attr(get_theme_mod('aboutus_boxbg_color')); ?>;
		}

		#aboutus-section .deliverybox i {
			color: <?php echo esc_attr(get_theme_mod('aboutus_phonenumiconcolor')); ?>;
		}

		#aboutus-section .deliverybox i {
			background: <?php echo esc_attr(get_theme_mod('aboutus_phonenumiconbgcolor')); ?> !important;
		}

		#aboutus-section .deliverybox p {
			color: <?php echo esc_attr(get_theme_mod('aboutus_phonenumcolor')); ?>;
		}

		#aboutus-section .deliverybox {
			background: <?php echo esc_attr(get_theme_mod('aboutus_phonenumbgcolor')); ?>;
		}


		.footer-area {
			background: <?php echo esc_attr(get_theme_mod('footer_bgcolor')); ?>;
		}

		.copy-right p,.copy-right p a {
			color: <?php echo esc_attr(get_theme_mod('footer_copyrightcolor')); ?>;
		}

		.copy-right {
			border-color: <?php echo esc_attr(get_theme_mod('footer_copyrightbrdcolor')); ?>;
		}

		.footer-area .footer-widget .w-title {
			color: <?php echo esc_attr(get_theme_mod('footer_widgettilecolor')); ?>;
		}

		.footer-area .widget_text, .footer-area .widget_text p, .wp-block-latest-comments__comment-excerpt p, .wp-block-latest-comments__comment-date, .has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt, .has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta,.footer-area .widget_block h1, .footer-area .widget_block h2, .footer-area .widget_block h3, .footer-area .widget_block h4, .footer-area .widget_block h5, .footer-area .widget_block h6,.footer-area .footer-widget .widget:not(.widget_social_widget):not(.widget_tag_cloud) li a {
			color: <?php echo esc_attr(get_theme_mod('footer_textcolor')); ?>;
		}

		.footer-area li:before, .page-template-home-template .footer-area li:before, .page .footer-area li:before, .single .footer-area li:before {
			color: <?php echo esc_attr(get_theme_mod('footer_iconcolor')); ?>;
		}

		.footer-area .footer-widget .widget:not(.widget_social_widget):not(.widget_tag_cloud) li a:hover {
			color: <?php echo esc_attr(get_theme_mod('footer_listhovercolor')); ?>;
		}

		.scroll-top i {
			color: <?php echo esc_attr(get_theme_mod('footer_scrolltotopiconcolor')); ?>;
		}

		.scroll-top {
			background: <?php echo esc_attr(get_theme_mod('footer_scrolltotopiconbgcolor')); ?>;
		}

		.scroll-top:hover {
			background: <?php echo esc_attr(get_theme_mod('footer_scrolltotopiconbghrvcolor')); ?>;
		}

		
	<?php  ?>


	<?php
		if ( ! display_header_text() ) :
	?>
		.site-title,
		.site-description {
			position: absolute;
			clip: rect(1px, 1px, 1px, 1px);
		}
	<?php
		else :
	?>
		.breadcrumb-section h1{
			color: #<?php echo esc_attr( $header_text_color ); ?>;
		}
	<?php endif; ?>



	<?php
        if ($feature_disable_section == 1):
	?>
		#feature-section {
			display: none;
		}
	<?php
		else :
	?>
		#feature-section {
			display: block;
		}
	<?php endif; ?>


	<?php
        if ($ourservice_disable_section == 1):
	?>
		#ourservice-section {
			display: none;
		}
	<?php
		else :
	?>
		#ourservice-section {
			display: block;
		}
	<?php endif; ?>


	<?php
        if ($aboutus_disable_section == 1):
	?>
		#aboutus-section {
			display: none;
		}
	<?php
		else :
	?>
		#aboutus-section {
			display: block;
		}
	<?php endif; ?>



	</style>
	<?php
}
endif;
