<?php
Kirki::add_section( 'digital_marketing_blog_theme_color', array(
    'title'          => esc_html__( 'Color Settings', 'digital-marketing-blog' ),
    'description'    => esc_html__( 'Customize the colors of your website.', 'digital-marketing-blog' ),
    'panel'          => 'digital_marketing_blog_global_panel',
) );

Kirki::add_field( 'digital_marketing_blog_config', [
	'type'        => 'color',
	'settings'    => 'primary_color',
	'label'       => __( 'Primary Background Color', 'digital-marketing-blog' ),
	'section'     => 'digital_marketing_blog_theme_color',
	'default'     => '#8574E9',
	'transport'   => 'auto',
	'output' => array(
		array(
			'element'  => '.digital-marketing-blog-standard-post__blog-meta .cat-links a, .post_categories_on_thumbnail .cat-links a',
			'property' => 'border-color',
		),
	),
] );

Kirki::add_field( 'digital_marketing_blog_config', [
	'type'        => 'color',
	'settings'    => 'primary_text_color',
	'label'       => __( 'Primary Text Color', 'digital-marketing-blog' ),
	'section'     => 'digital_marketing_blog_theme_color',
	'transport'   => 'auto',
	'default'     => '#8574E9',
	'output' => array(
		array(
			'element'  => '.digital-marketing-blog-standard-post__blog-meta>span.posted_by a i, .digital-marketing-blog-standard-post__blog-meta>span.posted-on a, .widget-area .widget.widget_rss a.rsswidget, .widget ul li a:hover, .widget ul li a:visited, .widget ul li a:focus, .widget ul li a:active, .widget ol li a:hover, .widget ol li a:visited, .widget ol li a:focus, .widget ol li a:active, .digital-marketing-blog-standard-post .digital-marketing-blog-standard-post__full-summery a, a:hover, a:focus, a:active, span.opacity-none:before, .woocommerce div.product p.price, .woocommerce div.product span.price, .woocommerce ul.products li.product .price, span.opacity-none a:before',
			'property' => 'color',
		),
		array(
			'element'  => '.digital-marketing-blog-standard-post__blog-meta>span.posted-on i.line',
			'property' => 'background-color',
		),
	),
] );

Kirki::add_field( 'digital_marketing_blog_config', [
	'type'        => 'color',
	'settings'    => 'footer_bg_color',
	'label'       => __( 'Footer Background Color', 'digital-marketing-blog' ),
	'section'     => 'digital_marketing_blog_theme_color',
	'default'     => '#740dc3',
	'transport'   => 'auto',
	'output' => array(
		array(
			'element'  => 'footer.site-footer .site-copyright',
			'property' => 'background-color',
		),
	),
] );



Kirki::add_field( 'digital_marketing_blog_config', [
	'type'        => 'color',
	'settings'    => 'footer_title_color',
	'label'       => __( 'Footer Title Color', 'digital-marketing-blog' ),
	'section'     => 'digital_marketing_blog_theme_color',
	'default'     => '#5cB85c',
	'transport'   => 'auto',
	'output' => array(
		array(
			'element'  => '.footer-content .widget h2.widget-title.footer-title',
			'property' => 'color',
		),
		array(
			'element'  => '.footer-content .widget h2.widget-title.footer-title:before',
			'property' => 'background-color',
		),
	),
] );

Kirki::add_field( 'digital_marketing_blog_config', [
	'type'        => 'color',
	'settings'    => 'copyright_text_color',
	'label'       => __( 'Copyright Text Color', 'digital-marketing-blog' ),
	'section'     => 'digital_marketing_blog_theme_color',
	'default'     => '#ffffff',
	'transport'   => 'auto',
	'output' => array(
		array(
			'element'  => '.site-copyright',
			'property' => 'color',
		),
	),
] );
