<?php

function newshit_custom_style() {

	if ( true === get_theme_mod( 'primary_color_enable', false ) && !empty( get_theme_mod( 'theme_primary_color' ) ) ) {
		?>
            <style>
            input[type=submit],button[type=submit],.theme-button,.wp-block-calendar caption,.calendar_wrap caption,.wp-block-button .wp-block-button__link:hover,.wp-block-button.is-style-outline .wp-block-button__link:hover,.to-top,::-webkit-scrollbar-thumb,.newshit-section-title::after,.newshit-section-title::before,.header-menu-wrapper,.header-search-popup .header-search-overlay,.header-search-popup .header-search-overlay .closes-button a,::-webkit-scrollbar-thumb,span.tags-links a,.post-thumbnail-wrapper .video-button,.post-slider-box .post-image-with-content .newshit-table .newshit-table-cell .post-slide-content .category ul li a,nav.navigation.pagination ul li a:hover,.pagination-area ul li a:hover,nav.navigation.comments-pagination ul li a:hover,nav.navigation.pagination ul li span.page-numbers.current,nav.navigation.pagination ul li span.current,nav.navigation.pagination ul li a.current,nav.navigation.pagination ul li span,.pagination-area ul li span.page-numbers.current,.pagination-area ul li span.current,.pagination-area ul li a.current,.pagination-area ul li span,nav.navigation.comments-pagination ul li span.page-numbers.current,nav.navigation.comments-pagination ul li span.current,nav.navigation.comments-pagination ul li a.current,nav.navigation.comments-pagination ul li span,.page-links span.current,.page-links span:hover,.page-links a:hover,.comments-area a.page-numbers:hover,.newshit-post-item .newshit-post-catagory ul li a,.newshit-section-arrows button.custom-arrow:hover,.banner-tab-wrapper .tab-title.active,.newshit-front-recent-post-item .newshit-post-item-content .post-readmore a:hover,.sidebar-widget-area.home-widget-area section.widget .widget-title::after, .sidebar-widget-area.home-widget-area section.widget label.wp-block-search__label::after,.sidebar-widget-area.home-widget-area section.widget .widget-title::before, .sidebar-widget-area.home-widget-area section.widget label.wp-block-search__label::before,.sidebar-widget-area.home-widget-area section.widget_newshit_about_info_widget .social-links ul li a,section.widget_newshit_company_info_widget .social-links ul li a,.widget_newshit_social_media_widget ul.newshit-social-media-widget li .newshit-social-link a,.newshit-newsletter-box,.footer-wrapper .copyright-area,.widget button[type="submit"].wp-block-search__button,.post-details-wrapper article .entry-content .wp-block-button__link:hover,.post-details-wrapper article .entry-content .wp-block-file .wp-block-file__button:hover,.woocommerce-info,.woocommerce-noreviews,p.no-comments,.woo-single-item-warpper .product-item .product-img .product-overlay:before,.woo-single-item-warpper .product-item .product-img .product-overlay .product-content a,.woocommerce ul.products li.product .onsale,.woocommerce #respond input#submit.alt,.woocommerce a.button.alt,.woocommerce button.button.alt,.woocommerce input.button.alt,.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover,.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.woocommerce a.remove:hover,#add_payment_method #payment div.payment_box,.woocommerce-cart #payment div.payment_box,.woocommerce-checkout #payment div.payment_box,p.woocommerce-notice.woocommerce-notice--success.woocommerce-thankyou-order-received,.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,.woocommerce nav.woocommerce-pagination ul li a:focus,.woocommerce nav.woocommerce-pagination ul li a:hover,.woocommerce nav.woocommerce-pagination ul li span.current,.woocommerce nav.woocommerce-pagination ul li a,.woocommerce nav.woocommerce-pagination ul li span,.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span.page-numbers.current,.woocommerce .widget_price_filter .ui-slider .ui-slider-range,a.mini-cart-button label,p.woocommerce-mini-cart__buttons.buttons a,.woo-product-small-img ul.slick-dots .slick-active button,.newshit-mini-cart-items li.woocommerce-mini-cart-item.mini_cart_item a.remove.remove_from_cart_button {
                background-color: <?php echo esc_attr( get_theme_mod( 'theme_primary_color' ) ); ?>;
            }

            .title-48 span,.page-title-wrapper .page-title-inner ul li a,.wp-block-calendar #today,.calendar_wrap #today,.wp-block-calendar a,.calendar_wrap a,.wp-block-calendar a:hover,.calendar_wrap a:hover,.header-top-wrapper .header-top-inner .header-top-menu ul li a:hover,.header-top-wrapper .header-top-inner .header-top-social ul li a:hover,.right-section .switch-dark-lite .switch .slider::before,.right-section .switch-dark-lite .switch .slider::after,.right-section .notification-icon a,.right-section .header-search-box a,.mini-cart-header span.fa-shopping-cart,.single-post-item .sticky .single-post-wrapper::after,.single-post-item article .post-content-wrapper .post-title a:hover,.single-post-item article .post-content-wrapper .post-footer .post-read-more a:hover,.single-post-item article .post-content-wrapper .post-footer .post-read-more a i,.post-meta ul li a:hover,.post-thumbnail-wrapper .video-button:hover,.author-info-wrapper .author-info-box .author-info h2 a:hover,.post-slider-box .post-image-with-content .newshit-table .newshit-table-cell .post-slide-content .post-title a:hover,.post-slider-box .post-image-with-content .newshit-table .newshit-table-cell .post-slide-content .post-meta ul li a:hover,ul.newshit-recent-post-widget li .newshit-recent-post-title-and-date h6 a:hover,.newshit-post-navication-single .nav-links .post-single-nav .nav-title a:hover,.newshit-news-sticker-wrapper .acme-news-ticker .acme-news-ticker-box ul li a:hover,.newshit-post-item .newshit-post-meta ul li a:hover,.newshit-post-item.muckup-two .newshit-post-title a:hover,.newshit-post-item.muckup-two .newshit-post-meta ul li i,.newshit-post-item.muckup-two .newshit-post-meta ul li a:hover,.newshit-banner-slide-wrapper .newshit-section-arrows .custom-arrow,.post-small-item .post-small-content .post-small-meta ul li i,.post-small-item .post-small-content .post-small-title a:hover,.category-menu-wrapper ul li:hover,.category-menu-wrapper ul li.active,.newshit-video-section-wrapper .newshit-video-section-inner .video-section-box .nav-pills button.nav-link .post-small-content .post-small-meta ul li i,.screen-reader-text:focus,.sidebar-widget-area .widget .wp-block-categories li a:hover,.sidebar-widget-area .widget .wp-block-archives li a:hover,.sidebar-widget-area .widget.widget_categories a:hover,.sidebar-widget-area .widget.widget_archive li:hover a,.sidebar-widget-area .widget.widget_pages li a:hover,.sidebar-widget-area .widget.widget_meta li a:hover,.sidebar-widget-area .widget.widget_nav_menu li a:hover,
.sidebar-widget-area .widget.widget_nav_menu li.current-menu-item a,.sidebar-widget-area .widget.widget_categories a:hover+.post-count-number,
.sidebar-widget-area .widget.widget_archive li:hover .post-count-number,.sidebar-widget-area .widget .wp-block-categories li a:hover+.post-count-number,.sidebar-widget-area .widget .wp-block-archives li a:hover+.post-count-number,.sidebar-widget-area .widget.widget_recent_entries li a:hover,.sidebar-widget-area .wp-block-latest-posts li a:hover,.sidebar-widget-area .widget.widget_recent_comments li a:hover,.sidebar-widget-area .wp-block-latest-comments__comment a:hover,.widget_block.widget_recent_comments li .wp-block-latest-comments__comment-meta time,.widget.widget_rss ul li a,.widget.widget_tag_cloud a,.wp-block-tag-cloud a,.footer-widget-area .widget.widget_rss .rss-date,.widget .wp-block-calendar a,.post-details-wrapper article .entry-content a:hover,.comment-content a:hover,.comment-body a:hover,.footer-widget-area .widget_archive ul li a:hover,.footer-widget-area .wp-block-archives-list li a:hover,.footer-widget-area .widget_categories ul li a:hover,.footer-widget-area .wp-block-categories-list li a:hover,.footer-widget-area .widget_pages ul li a:hover,.footer-widget-area .widget_meta ul li a:hover,.footer-widget-area .widget_nav_menu ul li a:hover,.footer-widget-area .widget_recent_comments li a:hover, .footer-widget-area .widget_recent_entries li a:hover, .footer-widget-area .wp-block-latest-posts__list li a:hover, .footer-widget-area .wp-block-pages-list__item__link:hover,.footer-widget-area .widget.widget_rss ul li a:hover,.footer-widget-area .widget_newshit_nav_menu ul li a:hover,.woocommerce .star-rating span::before,.woocommerce .star-rating::before,.woo-single-item-warpper .product-item .product-info .product-holder .woocommerce-loop-product__title:hover,.woocommerce p.stars a,.woocommerce ul.products li.product .price,.woocommerce ul.product_list_widget li ins,.woocommerce div.product p.price del,.woocommerce div.product span.price del,.woocommerce div.product p.price ins,.woocommerce div.product span.price ins,.woocommerce-message::before,#newshit-shop-view-mode li:hover,.woocommerce div.product p.price,.woocommerce div.product span.price,.newshit-product-list-view .woocommerce ul.products li.product .price,.woocommerce-MyAccount-content p a,form.woocommerce-product-search button,li.newshit-mini-cart-items li.woocommerce-mini-cart-item.mini_cart_item a,.newshit-hmini a span {
                color: <?php echo esc_attr( get_theme_mod( 'theme_primary_color' ) ); ?>;
            }

            .page-title-wrapper .page-title-inner,.wp-block-button.is-style-outline .wp-block-button__link:hover,.preloader-area .preloader-inner .theme-loader::after,.post-slider-box .slick-arrow,.page-links span,.page-links a,.newshit-banner-slide-wrapper .newshit-section-arrows .custom-arrow,blockquote.wp-block-quote,blockquote,.wp-block-quote.is-large,.wp-block-quote.is-style-large,.wp-block-quote.is-large:not(.is-style-plain),.wp-block-quote.is-style-large:not(.is-style-plain),.post-details-wrapper article .entry-content a:hover,.woocommerce-message,#add_payment_method #payment div.payment_box::before,.woocommerce-cart #payment div.payment_box::before,.woocommerce-checkout #payment div.payment_box::before,.woocommerce ul.order_details li{
                border-color:<?php echo esc_attr( get_theme_mod( 'theme_primary_color' ) ); ?>;
            }
            </style>
        <?php 
    }

    if ( true === get_theme_mod( 'secondary_color_enable', false ) && !empty( get_theme_mod( 'theme_secondary_color' ) ) ) {
		?>
            <style>
                input[type=submit]:hover,button[type=submit]:hover,.theme-button:hover,.slick-slider .slick-arrow:hover,.preloader-area,.header-top-wrapper,.main-navigation .navbar-collapse.nav-menu ul li a:hover,.right-section .notification-icon a:hover,.right-section .header-search-box a:hover,.header-search-popup .header-search-popup-content form button[type=submit],.header-search-popup .header-search-overlay .closes-button a:hover,.mini-cart-header span.fa-shopping-cart:hover,  div#mobile .slicknav_menu ul, div#topheader .slicknav_menu ul,span.tags-links a:hover,.newshit-news-sticker-wrapper .acme-news-ticker .acme-news-ticker-label,.newshit-news-sticker-wrapper .acme-news-ticker .acme-news-ticker-label::after,.banner-tab-wrapper .tab-title,.newshit-video-section-wrapper .newshit-video-section-inner .video-section-box,.newshit-newsletter-box .newshit-newsletter-form input[type=submit],.footer-wrapper::after,.widget.widget_tag_cloud a:hover,.wp-block-tag-cloud a:hover,.post-details-wrapper article .entry-content .wp-block-button__link,.post-details-wrapper article .entry-content .wp-block-file .wp-block-file__button,.woo-single-item-warpper .product-item .product-img .product-overlay .product-content a:hover,.woocommerce #respond input#submit.alt:hover,.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,.woocommerce div.product .woocommerce-tabs ul.tabs li a,.woocommerce #respond input#submit:hover,.woocommerce a.button:hover,.woocommerce button.button:hover,.woocommerce input.button:hover,.woocommerce #respond input#submit.disabled:hover,
.woocommerce #respond input#submit:disabled:hover,.woocommerce #respond input#submit:disabled[disabled]:hover,.woocommerce a.button.disabled:hover,.woocommerce a.button:disabled:hover,.woocommerce a.button:disabled[disabled]:hover,.woocommerce button.button.disabled:hover,.woocommerce button.button:disabled:hover,.woocommerce button.button:disabled[disabled]:hover,.woocommerce input.button.disabled:hover,.woocommerce input.button:disabled:hover,.woocommerce input.button:disabled[disabled]:hover,.woocommerce nav.woocommerce-pagination ul li a:hover,.woocommerce-pagination ul li a:hover,div .woocommerce-pagination ul li span.page-numbers.current,.woocommerce .widget_price_filter .ui-slider .ui-slider-handle,.woo-product-small-img ul.slick-dots button,ul.newshit-hmini span.count {
                    background-color: <?php echo esc_attr( get_theme_mod( 'theme_secondary_color' ) ); ?>;
                }

                
                a,h1,h2,h3,h4,h5,h6,strong,dt,th,.comment-meta .fn,.comment-reply-link,.no-comments,a:focus,a:active,input[type=text]:focus,input[type=email]:focus,input[type=url]:focus,input[type=password]:focus,input[type=search]:focus,input[type=number]:focus,input[type=tel]:focus,input[type=range]:focus,input[type=date]:focus,input[type=month]:focus,input[type=week]:focus,input[type=time]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=color]:focus,textarea:focus, .theme-button:focus, select:focus,.page-title-wrapper .page-title-inner ul li,.wp-block-calendar th,.calendar_wrap th,.wp-block-calendar td,.calendar_wrap td,.wp-block-button.is-style-outline .wp-block-button__link,.newshit-section-title span,.single-post-item article .post-content-wrapper .post-title a,.single-post-item article .post-content-wrapper .post-footer span.tag-title,.author-info-wrapper .author-info-box .author-info h2 a,ul.newshit-recent-post-widget li .newshit-recent-post-title-and-date h6 a,nav.navigation.pagination ul li a,nav.navigation.pagination ul li span,nav.navigation.pagination ul li span.page-numbers.current,.pagination-area ul li a,.pagination-area ul li span,.pagination-area ul li span.page-numbers.current,nav.navigation.comments-pagination ul li a,nav.navigation.comments-pagination ul li span,nav.navigation.comments-pagination ul li span.page-numbers.current,.page-links span,.page-links a,.newshit-post-item.muckup-two .newshit-post-title a,.newshit-post-item.muckup-two .newshit-post-meta ul li,.newshit-post-item.muckup-two .newshit-post-meta ul li a,.post-small-item .post-small-content .post-small-title a,.category-menu-wrapper ul li,.newshit-front-recent-post-item .newshit-post-item-content .post-readmore a,.widget_newshit_social_media_widget ul.newshit-social-media-widget li .newshit-social-follower span,.newshit-newsletter-box .newshit-newsletter-form input[type=submit]:hover,.footer-wrapper .copyright-area .copyright-inner .site-info a:hover,.footer-wrapper .copyright-area .copyright-inner .copyright-menu ul li a:hover,input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],input[type="number"],input[type="tel"],input[type="range"],input[type="date"],input[type="month"],input[type="week"],input[type="time"],input[type="datetime"],input[type="datetime-local"],input[type="color"],textarea,.sidebar-widget-area .widget-title,.widget label.wp-block-search__label,.sidebar-widget-area .widget-title a,.sidebar-widget-area .widget .post-count-number,.sidebar-widget-area .widget.widget_recent_comments li,.sidebar-widget-area .wp-block-latest-comments__comment,.sidebar-widget-area .widget.widget_recent_comments li,.sidebar-widget-area .widget.widget_recent_comments li a,.widget.widget_rss ul li a:hover,.widget.widget_rss .rss-date,.widget.widget_rss cite,.sidebar-widget-area .widget.widget_block h2,blockquote.wp-block-quote,blockquote,blockquote.has-text-color.has-light-gray-color,blockquote cite,.wp-block-quote__citation,.wp-block-quote cite,.wp-block-quote footer,.wp-block-pullquote__citation,.wp-block-pullquote cite,.wp-block-pullquote footer,.post-details-wrapper strong,.post-details-wrapper b,figcaption,em.comment-awaiting-moderation,.comments-area .reply a,.comment-respond,.comment-form input,
.comment-form textarea,.blocks-gallery-caption,.wp-block-embed figcaption,.wp-block-image figcaption,figcaption,.footer-widget-area .widget.widget_tag_cloud a:hover, .footer-widget-area .wp-block-tag-cloud a:hover,.woo-single-item-warpper .product-item .product-info .product-holder .woocommerce-loop-product__title,.woo-single-item-warpper .product-item .product-info .product-holder .woocommerce-loop-product__title,div.woocommerce-info a.showcoupon:hover,#newshit-shop-view-mode li,.woocommerce-ordering select.orderby,.woocommerce-MyAccount-content p a:hover,.woocommerce-MyAccount-content .woocommerce-message.woocommerce-message--info.woocommerce-Message.woocommerce-Message--info.woocommerce-info,li.newshit-mini-cart-items li.woocommerce-mini-cart-item.mini_cart_item a:hover,.post-small-item .post-small-content .post-small-title a {
                    color: <?php echo esc_attr( get_theme_mod( 'theme_secondary_color' ) ); ?>;
                }
           
                .wp-block-search input[type=search]:focus,nav.navigation.pagination .nav-links ul.page-numbers li a:focus-visible,.wp-block-search .wp-block-search__button:focus-visible,.wp-block-button.is-style-outline .wp-block-button__link,.woocommerce-info,p.woocommerce-notice.woocommerce-notice--success.woocommerce-thankyou-order-received {
                    border-color:<?php echo esc_attr( get_theme_mod( 'theme_secondary_color' ) ); ?>;
                }
            </style>
        <?php
    }

    if( !empty( get_theme_mod( 'post_image_bg_color' ) ) ){
        $colors = get_theme_mod( 'post_image_bg_color' );
        ?>
        <style>
            .newshit-gradent::after{
                background:linear-gradient(180deg, <?php echo esc_attr( $colors['start'] ); ?> 22.92%, <?php echo esc_attr( $colors['end'] ); ?> 60.84%);
            }
        </style>
        <?php 
    }

}
add_action( 'wp_head', 'newshit_custom_style', 10, 0 );