<?php

/**
 * Author Kit Kirki Customizer Setup
 */

function author_kit_author_archive_customizer()
{
    // Template option name and default value

    $template_option_name = 'author_kit_author_archive_template';
    $default_template_name = 'archive-template-default';

    // Section: List All Authors Customization
    new \Kirki\Section('author_kit_archive_section', [
        'title'       => esc_html__('Author Archive', 'author-kit'),
        'panel'       => 'author_kit_customizer_panel',
        'priority'    => 10,
    ]);

    // Active template
    $active_template = get_option($template_option_name, $default_template_name);

    // Control class mapping
    $control_classes = [
        'typography'   => \Kirki\Field\Typography::class,
        'text-area'   => \Kirki\Field\Textarea::class,
        'color'        => \Kirki\Field\Color::class,
        'editor'       => \Kirki\Field\Editor::class,
        'dimensions'   => \Kirki\Field\Dimensions::class,
        'dimension'    => \Kirki\Field\Dimension::class,
        'radio-button' => \Kirki\Field\Radio_Buttonset::class,
        'checkbox'     => \Kirki\Field\Checkbox_Switch::class,
        'select'       => \Kirki\Field\Select::class,
        'text'         => \Kirki\Field\Text::class,
        'slider'       => \Kirki\Field\Slider::class,
        'switch'       => \Kirki\Field\Checkbox_Switch::class,
        'number'        => \Kirki\Field\Number::class,
        'divider'      => \Kirki\Pro\Field\Divider::class,
        'headline'     => \Kirki\Pro\Field\Headline::class,
        'margin'       => \Kirki\Pro\Field\Margin::class,
        'padding'      => \Kirki\Pro\Field\Padding::class,
        'pro-slider'   => \Kirki\Pro\Field\InputSlider::class,
    ];



    $template_controls['archive-template-default'] =  [


        // Author Bio Box Heading
        [
            'type'     => 'headline',
            'settings' => 'author_kit_archive_bio_box_heading',
            'label'    => esc_html__('Author Bio Box', 'author-kit'),
            'section'  => 'author_kit_archive_section',
            'priority' => 10,
        ],

        // Padding
        [
            'type'        => 'padding',
            'settings'    => 'author_kit_archive_bio_box_padding',
            'label'       => esc_html__('Padding (px)', 'author-kit'),
            'description' => esc_html__('Inner spacing for bio box.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 12,
            'responsive'  => true,
            'transport'   => 'auto',
            'default'     => [
                'desktop' => [
                    'top'    => '80px',
                    'right'  => '120px',
                    'bottom' => '80px',
                    'left'   => '120px',
                ],
                'mobile' => [
                    'top'    => '30px',
                    'right'  => '20px',
                    'bottom' => '30px',
                    'left'   => '20px',
                ],
            ],
            'output' => [
                [
                    'element'     => '#author-kit-archive-template .author-kit-bio-container',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                    'property'     => 'padding',
                    'value_pattern' => '$px',
                ],
            ],
        ],

        // Background Color
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_bio_box_bg_color',
            'label'     => esc_html__('Background Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 13,
            'default'   => '#F8F8FF',
            'transport' => 'postMessage',
        ],

        // Name Color
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_name_color',
            'label'     => esc_html__('Name Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 14,
            'default'   => '#334155',
            'transport' => 'postMessage',
        ],

        // Job Title Color
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_job_title_color',
            'label'     => esc_html__('Job Title Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 14,
            'default'   => '#5a5a5a',
            'transport' => 'postMessage',
        ],

        // Description Color
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_description_color',
            'label'     => esc_html__('Description Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 14,
            'default'   => '#5a5a5a',
            'transport' => 'postMessage',
        ],
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_avatar_size',
            'label'       => esc_html__('Avatar Size (px)', 'author-kit'),
            'description' => esc_html__('Set avatar image size.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 14,
            'default'     => [
                'desktop' => 200,
                'mobile'  => 120,
            ],
            'choices'     => [
                'min'  => 30,
                'max'  => 250,
                'step' => 1,
            ],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-avatar',
                    'property'    => 'width',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
                [
                    'element'     => '.author-kit-avatar',
                    'property'    => 'height',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],


        // Name Font Size
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_name_size',
            'label'       => esc_html__('Name Font Size (px)', 'author-kit'),
            'description' => esc_html__('Font size for author name.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 15,
            'default'     => [
                'desktop' => 28,
                'mobile'  => 20,
            ],
            'choices'     => [
                'min'  => 10,
                'max'  => 40,
                'step' => 1,
            ],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-name',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],

        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_job_title_size',
            'label'       => esc_html__('Job Title Font Size (px)', 'author-kit'),
            'description' => esc_html__('Set job title size.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 16,
            'default'     => [
                'desktop' => 16,
                'mobile'  => 13,
            ],
            'choices'     => ['min' => 10, 'max' => 30, 'step' => 1],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-job-title',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_description_size',
            'label'       => esc_html__('Description Font Size (px)', 'author-kit'),
            'description' => esc_html__('Controls the description font size.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 16,
            'default'     => [
                'desktop' => 16,
                'mobile'  => 14,
            ],
            'choices'     => ['min' => 10, 'max' => 30, 'step' => 1],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-description',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],


        [
            'type'      =>    'select',
            'settings'    => 'author_kit_archive_icon_style',
            'label'       => esc_html__('Choose Icon Type', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'transport'   => 'postMessage',
            'default'     => 'author-kit-circle',
            'placeholder' => esc_html__('Choose an option', 'author-kit'),
            'priority'    => 17,
            'choices'     => [
                'author-kit-circle' => esc_html__('Circle', 'author-kit'),
                'author-kit-square' => esc_html__('Square', 'author-kit'),
            ]
        ],
        
        
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_social_icons_gap',
            'label'       => esc_html__('Icon Gap (px)', 'author-kit'),
            'description' => esc_html__('Spacing between icons in bio box.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 17,
            'default'     => [
                'desktop' => 10,
                'mobile'  => 5,
            ],
            'choices'     => ['min' => 0, 'max' => 50, 'step' => 1],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '#author-kit-bio-box div.author-kit-social-icons-list',
                    'property'    => 'gap',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_social_icons_size',
            'label'       => esc_html__('Icons Size (px)', 'author-kit'),
            'description' => esc_html__('Adjust the size of social icons in the author bio box', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 18,
            'default'     => [
                'desktop' => 40,
                'mobile'  => 32,
            ],
            'choices'     => ['min' => 20, 'max' => 50, 'step' => 1],
            'transport'   => 'refresh',
            'responsive'  => true,
        
        ],
        
        
        [
            'type'              => 'color',
            'settings'          => 'author_kit_archive_icon_container_color',
            'label'             => esc_html__('Icon Container Color', 'author-kit'),
            'tooltip'           => esc_html__('Use black for default Color. No live preview available.', 'author-kit'),
            'section'           => 'author_kit_archive_section',
            'priority'          => 19,
            'default'           => '#000000',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color',
        ],
        [
            'type'              => 'color',
            'settings'          => 'author_kit_archive_social_icon_color',
            'label'             => esc_html__('Icon Color', 'author-kit'),
            'section'           => 'author_kit_archive_section',
            'priority'          => 19,
            'default'           => '#ffffff',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color',
        ],
        [
            'type'        => 'headline',
            'settings'    => 'author_kit_archive_post_grid_heading',
            'label'       => esc_html__('Post Grid Settings', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 19,
        ],
        [
            'type'        => 'padding',
            'settings'    => 'author_kit_post_grid_padding',
            'label'       => esc_html__('Grid Padding', 'author-kit'),
            'description' => esc_html__('Adjust inner padding of post grid.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 19,
            'responsive'  => true,
            'transport'   => 'auto',
            'default'     => [
                'desktop' => ['top' => '20px', 'right' => '120px', 'bottom' => '40px', 'left' => '120px'],
                'mobile'  => ['top' => '10px', 'right' => '10px', 'bottom' => '40px', 'left' => '10px'],
            ],
            'output' => [
                [
                    'element'       => '#author-kit-archive-template .author-kit-posts, #author-kit-archive-template .author-kit-posts .author-kit-pagination-container',
                    'media_query'   => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                    'property'      => 'padding',
                    'value_pattern' => '$',
                ],
            ],
        ],
        [
            'type'        => 'text',
            'settings'    => 'author_kit_grid_archive_title',
            'label'       => esc_html__('Post Grid Title', 'author-kit'),
            'description' => esc_html__('Enter grid title.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'transport'   => 'postMessage',
            'priority'    => 19,
            'default'     => 'Posts By',
        ],
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_post_grid_title_size',
            'label'       => esc_html__('Grid Title Size (px)', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 19,
            'default'     => [
                'desktop' => 18,
                'mobile'  => 14,
            ],
            'choices'     => ['min' => 10, 'max' => 50, 'step' => 1],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '#author-kit-archive-template .author-kit-posts-title',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        [
            'type'        => 'color',
            'settings'    => 'author_kit_archive_post_grid_title_color',
            'label'       => esc_html__('Grid Title Color', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 19,
            'default'     => '#000000',
            'transport'   => 'postMessage',
        ],
        [
            'type'        => 'radio-button',
            'settings'    => 'author_kit_archive_grid_text_alignment',
            'label'       => esc_html__('Text Alignment', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 19,
            'default'     => 'left',
            'transport'   => 'postMessage',
            'choices'     => [
                'left'   => esc_html__('Left', 'author-kit'),
                'center' => esc_html__('Center', 'author-kit'),
                'right'  => esc_html__('Right', 'author-kit'),
            ],
        ],
        [
            'type'        => 'color',
            'settings'    => 'author_kit_archive_post_grid_bg_color',
            'label'       => esc_html__('Grid Background Color', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 20,
            'default'     => '#FFFFFF',
            'transport'   => 'postMessage',
        ],
        [
            'type'        => 'number',
            'settings'    => 'author_kit_archive_grid_gap',
            'label'       => esc_html__('Grid Gap (px)', 'author-kit'),
            'description' => esc_html__('Space between posts.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 20,
            'default'     => 10,
            'transport'   => 'postMessage',
        ],
        [
            'type'        => 'color',
            'settings'    => 'author_kit_archive_post_card_bg_color',
            'label'       => esc_html__('Card Background Color', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 24,
            'default'     => '#FFFFFF',
            'transport'   => 'postMessage',
        ],
        [
            'type'        => 'number',
            'settings'    => 'author_kit_archive_thumbnail_border_radius',
            'label'       => esc_html__('Thumbnail Radius (px)', 'author-kit'),
            'description' => esc_html__('Thumbnail border radius.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 25,
            'default'     => 8,
            'transport'   => 'postMessage',
        ],  
      //title  Font Size
    [
        'type'        => 'slider',
            'settings'    => 'author_kit_archive_post_title_size',
            'label'       => esc_html__( 'Post Title Size (px)', 'author-kit' ),
            'description' => esc_html__( 'Font size of post title.', 'author-kit' ),
            'section'     => 'author_kit_archive_section',
            'priority'    => 26,
        'default'     => [
            'desktop' => 18,
            'mobile'  => 14,
        ],
        'choices'     => ['min' => 10, 'max' => 30, 'step' => 1],
        'transport'   => 'postMessage',
        'responsive'  => true,
        'output'      => [
            [
                'element'     => 'h4.author-kit-post-title, #author-kit-archive-template h4.author-kit-post-title a',
                'property'    => 'font-size',
                'units'       => 'px',
                'media_query' => [
                    'desktop' => '@media (min-width: 900px)',
                    'mobile'  => '@media (max-width: 899px)',
                ],
            ],
        ],
    ],
        [
            'type'        => 'color',
            'settings'    => 'author_kit_archive_title_color',
            'label'       => esc_html__('Post Title Color', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 27,
            'default'     => '#222222',
            'transport'   => 'postMessage',
        ],
         // Excerpt Font Size
    [
        'type'        => 'slider',
        'settings'    => 'author_kit_archive_excerpt_size',
        'label'       => esc_html__('Excerpt Size', 'author-kit'),
        'description' => esc_html__('Font size for excerpt text.', 'author-kit'),
        'section'     => 'author_kit_archive_section',
        'priority'    => 28,
        'default'     => [
            'desktop' => 14,
            'mobile'  => 12,
        ],
        'choices'     => ['min' => 10, 'max' => 30, 'step' => 1],
        'transport'   => 'postMessage',
        'responsive'  => true,
        'output'      => [
            [
                'element'     => '.author-kit-post-item div.author-kit-post-excerpt',
                'property'    => 'font-size',
                'units'       => 'px',
                'media_query' => [
                    'desktop' => '@media (min-width: 900px)',
                    'mobile'  => '@media (max-width: 899px)',
                ],
            ],
        ],
    ],
        [
            'type'        => 'color',
            'settings'    => 'author_kit_archive_excerpt_color',
            'label'       => esc_html__('Excerpt Color', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 29,
            'default'     => '#555555',
            'transport'   => 'postMessage',
        ],
        [
            'type'        => 'color',
            'settings'    => 'author_kit_archive_post_meta_separator_color',
            'label'       => esc_html__('Meta Separator', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 30,
            'default'     => '#eee',
            'transport'   => 'postMessage',
        ],
          // Meta Font Size
    [
        'type'        => 'slider',
        'settings'    => 'author_kit_archive_post_meta_size',
        'label'       => esc_html__('Meta Text Size', 'author-kit'),
        'description' => esc_html__('Font size for meta text.', 'author-kit'),
        'section'     => 'author_kit_archive_section',
        'priority'    => 30,
        'default'     => [
            'desktop' => 12,
            'mobile'  => 11,
        ],
        'choices'     => ['min' => 10, 'max' => 25, 'step' => 1],
        'transport'   => 'postMessage',
        'responsive'  => true,
        'output'      => [
            [
                'element'     => '.author-kit-post-meta ',
                'property'    => 'font-size',
                'units'       => 'px',
                'media_query' => [
                    'desktop' => '@media (min-width: 900px)',
                    'mobile'  => '@media (max-width: 899px)',
                ],
            ],
        ],
    ],
        [
            'type'        => 'color',
            'settings'    => 'author_kit_archive_post_meta_color',
            'label'       => esc_html__('Meta Text Color', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 31,
            'default'     => '#666666',
            'transport'   => 'postMessage',
        ],
        [
            'type'        => 'headline',
            'settings'    => 'author_kit_archive_post_card_heading',
            'label'       => esc_html__('Pagination', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 31,
        ],
        [
            'type'        => 'radio-button',
            'settings'    => 'author_kit_archive_pagination_alignment',
            'label'       => esc_html__('Pagination Alignment', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 32,
            'default'     => 'center',
            'transport'   => 'postMessage',
            'choices'     => [
                'left'   => esc_html__('Left', 'author-kit'),
                'center' => esc_html__('Center', 'author-kit'),
                'right'  => esc_html__('Right', 'author-kit'),
            ],
        ],
        [
            'type'        => 'color',
            'settings'    => 'author_kit_archive_button_color',
            'label'       => esc_html__('Button background', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 33,
            'default'     => '#0073e6',
            'transport'   => 'postMessage',
        ],
        
        [
            'type'        => 'color',
            'settings'    => 'author_kit_archive_button_hover_color',
            'label'       => esc_html__('Hover background', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 33,
            'default'     => '#005bb5',
            'transport'   => 'postMessage',
        ],
        
        [
            'type'        => 'color',
            'settings'    => 'author_kit_archive_pagination_btn_color',
            'label'       => esc_html__('Button text', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 33,
            'default'     => '#FFFFFF',
            'transport'   => 'postMessage',
        ],

        [
            'type'        => 'color',
            'settings'    => 'author_kit_archive_pagination_number_bg_color',
            'label'       => esc_html__('Number Bg', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 33,
            'default'     => '#FFFFFF',
            'transport'   => 'postMessage',
        ],
        
        [
            'type'        => 'color',
            'settings'    => 'author_kit_archive_pagination_number_color',
            'label'       => esc_html__('Number text', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 33,
            'default'     => '#000000',
            'transport'   => 'postMessage',
        ],

        
        

    ];

    $template_controls['archive-template-scribe'] =  [


// Author Bio Box Heading
[
    'type'     => 'headline',
    'settings' => 'author_kit_archive_bio_box_heading_scribe',
    'label'    => esc_html__('Author Bio Box', 'author-kit'),
    'section'  => 'author_kit_archive_section',
    'priority' => 10,
],

// Padding
[
    'type'        => 'padding',
    'settings'    => 'author_kit_archive_bio_box_padding_scribe',
    'label'       => esc_html__('Padding (px)', 'author-kit'),
    'description' => esc_html__('Inner spacing for bio box.', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 12,
    'responsive'  => true,
    'transport'   => 'auto',
    'default'     => [
        'desktop' => [
            'top'    => '80px',
            'right'  => '120px',
            'bottom' => '80px',
            'left'   => '120px',
        ],
        'mobile' => [
            'top'    => '30px',
            'right'  => '20px',
            'bottom' => '30px',
            'left'   => '20px',
        ],
    ],
    'output' => [
        [
            'element'     => '#author-kit-archive-template .author-kit-bio-container',
            'media_query' => [
                'desktop' => '@media (min-width: 900px)',
                'mobile'  => '@media (max-width: 899px)',
            ],
            'property'      => 'padding',
            'value_pattern' => '$px',
        ],
    ],
],

// Background Color
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_bio_box_bg_color_scribe',
    'label'     => esc_html__('Background Color', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 13,
    'default'   => '#28283c',
    'transport' => 'postMessage',
],

// Name Color
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_name_color_scribe',
    'label'     => esc_html__('Name Color', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 14,
    'default'   => '#ffffff',
    'transport' => 'postMessage',
],

// Job Title Color
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_job_title_color_scribe',
    'label'     => esc_html__('Job Title Color', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 14,
    'default'   => '#dfdfdf',
    'transport' => 'postMessage',
],

// Description Color
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_description_color_scribe',
    'label'     => esc_html__('Description Color', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 14,
    'default'   => '#f8f8f8',
    'transport' => 'postMessage',
],

// Avatar Size
[
    'type'        => 'slider',
    'settings'    => 'author_kit_archive_avatar_size_scribe',
    'label'       => esc_html__('Avatar Size (px)', 'author-kit'),
    'description' => esc_html__('Set avatar image size.', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 14,
    'default'     => [
        'desktop' => 200,
        'mobile'  => 120,
    ],
    'choices'     => [
        'min'  => 30,
        'max'  => 250,
        'step' => 1,
    ],
    'transport'   => 'postMessage',
    'responsive'  => true,
    'output'      => [
        [
            'element'     => '.author-kit-avatar',
            'property'    => 'width',
            'units'       => 'px',
            'media_query' => [
                'desktop' => '@media (min-width: 900px)',
                'mobile'  => '@media (max-width: 899px)',
            ],
        ],
        [
            'element'     => '.author-kit-avatar',
            'property'    => 'height',
            'units'       => 'px',
            'media_query' => [
                'desktop' => '@media (min-width: 900px)',
                'mobile'  => '@media (max-width: 899px)',
            ],
        ],
    ],
],

// Name Font Size
[
    'type'        => 'slider',
    'settings'    => 'author_kit_archive_name_size_scribe',
    'label'       => esc_html__('Name Font Size (px)', 'author-kit'),
    'description' => esc_html__('Font size for author name.', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 15,
    'default'     => [
        'desktop' => 28,
        'mobile'  => 20,
    ],
    'choices'     => [
        'min'  => 10,
        'max'  => 40,
        'step' => 1,
    ],
    'transport'   => 'postMessage',
    'responsive'  => true,
    'output'      => [
        [
            'element'     => '.author-kit-name',
            'property'    => 'font-size',
            'units'       => 'px',
            'media_query' => [
                'desktop' => '@media (min-width: 900px)',
                'mobile'  => '@media (max-width: 899px)',
            ],
        ],
    ],
],

// Job Title Font Size
[
    'type'        => 'slider',
    'settings'    => 'author_kit_archive_job_title_size_scribe',
    'label'       => esc_html__('Job Title Font Size (px)', 'author-kit'),
    'description' => esc_html__('Set job title size.', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 16,
    'default'     => [
        'desktop' => 16,
        'mobile'  => 13,
    ],
    'choices'     => ['min' => 10, 'max' => 30, 'step' => 1],
    'transport'   => 'postMessage',
    'responsive'  => true,
    'output'      => [
        [
            'element'     => '.author-kit-job-title',
            'property'    => 'font-size',
            'units'       => 'px',
            'media_query' => [
                'desktop' => '@media (min-width: 900px)',
                'mobile'  => '@media (max-width: 899px)',
            ],
        ],
    ],
],

[
    'type'        => 'slider',
    'settings'    => 'author_kit_archive_description_size_scribe',
    'label'       => esc_html__('Description Font Size (px)', 'author-kit'),
    'description' => esc_html__('Controls the description font size.', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 16,
    'default'     => [
        'desktop' => 16,
        'mobile'  => 14,
    ],
    'choices'     => ['min' => 10, 'max' => 30, 'step' => 1],
    'transport'   => 'postMessage',
    'responsive'  => true,
    'output'      => [
        [
            'element'     => '.author-kit-description',
            'property'    => 'font-size',
            'units'       => 'px',
            'media_query' => [
                'desktop' => '@media (min-width: 900px)',
                'mobile'  => '@media (max-width: 899px)',
            ],
        ],
    ],
],

[
    'type'        => 'select',
    'settings'    => 'author_kit_archive_icon_style_scribe',
    'label'       => esc_html__('Choose Icon Type', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'transport'   => 'postMessage',
    'default'     => 'author-kit-circle',
    'placeholder' => esc_html__('Choose an option', 'author-kit'),
    'priority'    => 17,
    'choices'     => [
        'author-kit-circle' => esc_html__('Circle', 'author-kit'),
        'author-kit-square' => esc_html__('Square', 'author-kit'),
    ]
],

[
    'type'        => 'slider',
    'settings'    => 'author_kit_archive_social_icons_gap_scribe',
    'label'       => esc_html__('Icon Gap (px)', 'author-kit'),
    'description' => esc_html__('Spacing between icons in bio box.', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 17,
    'default'     => [
        'desktop' => 10,
        'mobile'  => 5,
    ],
    'choices'     => ['min' => 0, 'max' => 50, 'step' => 1],
    'transport'   => 'postMessage',
    'responsive'  => true,
    'output'      => [
        [
            'element'     => '.author-kit-social-icons-list',
            'property'    => 'gap',
            'units'       => 'px',
            'media_query' => [
                'desktop' => '@media (min-width: 900px)',
                'mobile'  => '@media (max-width: 899px)',
            ],
        ],
    ],
],

[
    'type'        => 'slider',
    'settings'    => 'author_kit_archive_social_icons_size_scribe',
    'label'       => esc_html__('Icons Size (px)', 'author-kit'),
    'description' => esc_html__('Adjust the size of social icons in the author bio box', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 18,
    'default'     => [
        'desktop' => 40,
        'mobile'  => 32,
    ],
    'choices'     => ['min' => 20, 'max' => 50, 'step' => 1],
    'transport'   => 'postMessage',
    'responsive'  => true,

],

[
    'type'              => 'color',
    'settings'          => 'author_kit_archive_icon_container_color_scribe',
    'label'             => esc_html__('Icon Container Color', 'author-kit'),
    'tooltip'           => esc_html__('Use black for default Color. No live preview available.', 'author-kit'),
    'section'           => 'author_kit_archive_section',
    'priority'          => 19,
    'default'           => '#3c3c50',
    'transport'         => 'postMessage',
    'sanitize_callback' => 'sanitize_hex_color',
],
[
    'type'              => 'color',
    'settings'          => 'author_kit_archive_social_icon_color_scribe',
    'label'             => esc_html__('Icon Color', 'author-kit'),
    'section'           => 'author_kit_archive_section',
    'priority'          => 19,
    'default'           => '#ffffff',
    'transport'         => 'postMessage',
    'sanitize_callback' => 'sanitize_hex_color',
],
[
    'type'        => 'headline',
    'settings'    => 'author_kit_archive_post_grid_heading_scribe',
    'label'       => esc_html__('Post Grid Settings', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 19,
],
[
    'type'        => 'padding',
    'settings'    => 'author_kit_post_grid_padding_scribe',
    'label'       => esc_html__('Grid Padding', 'author-kit'),
    'description' => esc_html__('Adjust inner padding of post grid.', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 19,
    'responsive'  => true,
    'transport'   => 'auto',
    'default'     => [
        'desktop' => ['top' => '20px', 'right' => '120px', 'bottom' => '40px', 'left' => '120px'],
        'mobile'  => ['top' => '10px', 'right' => '10px', 'bottom' => '40px', 'left' => '10px'],
    ],
    'output' => [
        [
            'element'       => '#author-kit-archive-template .author-kit-posts, #author-kit-archive-template .author-kit-posts .author-kit-pagination-container',
            'media_query'   => [
                'desktop' => '@media (min-width: 900px)',
                'mobile'  => '@media (max-width: 899px)',
            ],
            'property'      => 'padding',
            'value_pattern' => '$',
        ],
    ],
],
[
    'type'        => 'text',
    'settings'    => 'author_kit_grid_archive_title',
    'label'       => esc_html__('Post Grid Title', 'author-kit'),
    'description' => esc_html__('Enter grid title.', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'transport'   => 'postMessage',
    'priority'    => 19,
    'default'     => 'Posts By',
],
[
    'type'        => 'slider',
    'settings'    => 'author_kit_archive_post_grid_title_size_scribe',
    'label'       => esc_html__('Grid Title Size (px)', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 19,
    'default'     => [
        'desktop' => 18,
        'mobile'  => 14,
    ],
    'choices'     => ['min' => 10, 'max' => 50, 'step' => 1],
    'transport'   => 'postMessage',
    'responsive'  => true,
    'output'      => [
        [
            'element'     => '#author-kit-archive-template .author-kit-posts-title',
            'property'    => 'font-size',
            'units'       => 'px',
            'media_query' => [
                'desktop' => '@media (min-width: 900px)',
                'mobile'  => '@media (max-width: 899px)',
            ],
        ],
    ],
],
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_post_grid_title_color_scribe',
    'label'     => esc_html__('Grid Title Color', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 19,
    'default'   => '#c2c2c2',
    'transport' => 'postMessage',
],
[
    'type'      => 'radio-button',
    'settings'  => 'author_kit_archive_grid_text_alignment_scribe',
    'label'     => esc_html__('Text Alignment', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 19,
    'default'   => 'center',
    'transport' => 'postMessage',
    'choices'   => [
        'left'   => esc_html__('Left', 'author-kit'),
        'center' => esc_html__('Center', 'author-kit'),
        'right'  => esc_html__('Right', 'author-kit'),
    ],
],
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_post_grid_bg_color_scribe',
    'label'     => esc_html__('Grid Background Color', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 20,
    'default'   => '#3c3c50',
    'transport' => 'postMessage',
],
[
    'type'        => 'number',
    'settings'    => 'author_kit_archive_grid_gap_scribe',
    'label'       => esc_html__('Grid Gap (px)', 'author-kit'),
    'description' => esc_html__('Space between posts.', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 20,
    'default'     => 10,
    'transport'   => 'postMessage',
],
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_post_card_bg_color_scribe',
    'label'     => esc_html__('Card Background Color', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 24,
    'default'   => '#28283c',
    'transport' => 'postMessage',
],
[
    'type'        => 'number',
    'settings'    => 'author_kit_archive_thumbnail_border_radius_scribe',
    'label'       => esc_html__('Thumbnail Radius (px)', 'author-kit'),
    'description' => esc_html__('Thumbnail border radius.', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 25,
    'default'     => 8,
    'transport'   => 'postMessage',
],
[
    'type'        => 'slider',
        'settings'    => 'author_kit_archive_post_title_size_scribe',
        'label'       => esc_html__( 'Post Title Size (px)', 'author-kit' ),
        'description' => esc_html__( 'Font size of post title.', 'author-kit' ),
        'section'     => 'author_kit_archive_section',
        'priority'    => 26,
    'default'     => [
        'desktop' => 18,
        'mobile'  => 14,
    ],
    'choices'     => ['min' => 10, 'max' => 30, 'step' => 1],
    'transport'   => 'postMessage',
    'responsive'  => true,
    'output'      => [
        [
            'element'     => 'h4.author-kit-post-title, #author-kit-archive-template h4.author-kit-post-title a',
            'property'    => 'font-size',
            'units'       => 'px',
            'media_query' => [
                'desktop' => '@media (min-width: 900px)',
                'mobile'  => '@media (max-width: 899px)',
            ],
        ],
    ],
],
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_title_color_scribe',
    'label'     => esc_html__('Post Title Color', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 27,
    'default'   => '#f5f5f5',
    'transport' => 'postMessage',
],
[
    'type'        => 'slider',
    'settings'    => 'author_kit_archive_excerpt_size_scribe',
    'label'       => esc_html__('Excerpt Size', 'author-kit'),
    'description' => esc_html__('Font size for excerpt text.', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 28,
    'default'     => [
        'desktop' => 14,
        'mobile'  => 12,
    ],
    'choices'     => ['min' => 10, 'max' => 30, 'step' => 1],
    'transport'   => 'postMessage',
    'responsive'  => true,
    'output'      => [
        [
            'element'     => '.author-kit-post-item div.author-kit-post-excerpt',
            'property'    => 'font-size',
            'units'       => 'px',
            'media_query' => [
                'desktop' => '@media (min-width: 900px)',
                'mobile'  => '@media (max-width: 899px)',
            ],
        ],
    ],
],
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_excerpt_color_scribe',
    'label'     => esc_html__('Excerpt Color', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 29,
    'default'   => '#b8b8b8',
    'transport' => 'postMessage',
],
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_post_meta_separator_color_scribe',
    'label'     => esc_html__('Meta Separator', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 30,
    'default'   => '#3c3c50',
    'transport' => 'postMessage',
],
[
    'type'        => 'slider',
    'settings'    => 'author_kit_archive_post_meta_size_scribe',
    'label'       => esc_html__('Meta Text Size', 'author-kit'),
    'description' => esc_html__('Font size for meta text.', 'author-kit'),
    'section'     => 'author_kit_archive_section',
    'priority'    => 30,
    'default'     => [
        'desktop' => 12,
        'mobile'  => 11,
    ],
    'choices'     => ['min' => 10, 'max' => 25, 'step' => 1],
    'transport'   => 'postMessage',
    'responsive'  => true,
    'output'      => [
        [
            'element'     => '.author-kit-post-meta',
            'property'    => 'font-size',
            'units'       => 'px',
            'media_query' => [
                'desktop' => '@media (min-width: 900px)',
                'mobile'  => '@media (max-width: 899px)',
            ],
        ],
    ],
],
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_post_meta_color_scribe',
    'label'     => esc_html__('Meta Text Color', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 31,
    'default'   => '#929292',
    'transport' => 'postMessage',
],
[
    'type'     => 'headline',
    'settings' => 'author_kit_archive_post_card_heading_scribe',
    'label'    => esc_html__('Pagination', 'author-kit'),
    'section'  => 'author_kit_archive_section',
    'priority' => 31,
],
[
    'type'      => 'radio-button',
    'settings'  => 'author_kit_archive_pagination_alignment_scribe',
    'label'     => esc_html__('Pagination Alignment', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 32,
    'default'   => 'center',
    'transport' => 'postMessage',
    'choices'   => [
        'left'   => esc_html__('Left', 'author-kit'),
        'center' => esc_html__('Center', 'author-kit'),
        'right'  => esc_html__('Right', 'author-kit'),
    ],
],
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_button_color_scribe',
    'label'     => esc_html__('Button background', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 33,
    'default'   => '#28283c',
    'transport' => 'postMessage',
],
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_button_hover_color_scribe',
    'label'     => esc_html__('Hover background', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 33,
    'default'   => '#3c3c50',
    'transport' => 'postMessage',
],
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_pagination_btn_color_scribe',
    'label'     => esc_html__('Button text', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 33,
    'default'   => '#FFFFFF',
    'transport' => 'postMessage',
],
[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_pagination_number_bg_color_scribe',
    'label'     => esc_html__('Number Bg', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 33,
    'default'   => '#FFFFFF',
    'transport' => 'postMessage',
],

[
    'type'      => 'color',
    'settings'  => 'author_kit_archive_pagination_number_color_scribe',
    'label'     => esc_html__('Number text', 'author-kit'),
    'section'   => 'author_kit_archive_section',
    'priority'  => 33,
    'default'   => '#000000',
    'transport' => 'postMessage',
],








    ];


    $template_controls['archive-template-quill'] =  [

    
    // Author Bio Box Heading
        [
            'type'     => 'headline',
            'settings' => 'author_kit_archive_bio_box_heading_quill',
            'label'    => esc_html__('Author Bio Box', 'author-kit'),
            'section'  => 'author_kit_archive_section',
            'priority' => 10,
        ],
        
        // Padding
        [
            'type'        => 'padding',
            'settings'    => 'author_kit_archive_bio_box_padding_quill',
            'label'       => esc_html__('Padding (px)', 'author-kit'),
            'description' => esc_html__('Inner spacing for bio box.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 12,
            'responsive'  => true,
            'transport'   => 'auto',
            'default'     => [
                'desktop' => [
                    'top'    => '80px',
                    'right'  => '120px',
                    'bottom' => '80px',
                    'left'   => '120px',
                ],
                'mobile' => [
                    'top'    => '30px',
                    'right'  => '20px',
                    'bottom' => '30px',
                    'left'   => '20px',
                ],
            ],
            'output' => [
                [
                    'element'     => '#author-kit-archive-template .author-kit-bio-container',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                    'property'      => 'padding',
                    'value_pattern' => '$px',
                ],
            ],
        ],
        
        // Background Color
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_bio_box_bg_color_quill',
            'label'     => esc_html__('Background Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 13,
            'default'   => '#fdfbee',
            'transport' => 'postMessage',
        ],
        
        // Name Color
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_name_color_quill',
            'label'     => esc_html__('Name Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 14,
            'default'   => '#015551',
            'transport' => 'postMessage',
        ],
        
        // Job Title Color
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_job_title_color_quill',
            'label'     => esc_html__('Job Title Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 14,
            'default'   => '#015551',
            'transport' => 'postMessage',
        ],
        
        // Description Color
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_description_color_quill',
            'label'     => esc_html__('Description Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 14,
            'default'   => '#015551',
            'transport' => 'postMessage',
        ],
        
        // Avatar Size
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_avatar_size_quill',
            'label'       => esc_html__('Avatar Size (px)', 'author-kit'),
            'description' => esc_html__('Set avatar image size.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 14,
            'default'     => [
                'desktop' => 200,
                'mobile'  => 120,
            ],
            'choices'     => [
                'min'  => 30,
                'max'  => 250,
                'step' => 1,
            ],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-avatar',
                    'property'    => 'width',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
                [
                    'element'     => '.author-kit-avatar',
                    'property'    => 'height',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        
        // Name Font Size
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_name_size_quill',
            'label'       => esc_html__('Name Font Size (px)', 'author-kit'),
            'description' => esc_html__('Font size for author name.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 15,
            'default'     => [
                'desktop' => 28,
                'mobile'  => 20,
            ],
            'choices'     => [
                'min'  => 10,
                'max'  => 40,
                'step' => 1,
            ],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-name',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        
        // Job Title Font Size
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_job_title_size_quill',
            'label'       => esc_html__('Job Title Font Size (px)', 'author-kit'),
            'description' => esc_html__('Set job title size.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 16,
            'default'     => [
                'desktop' => 16,
                'mobile'  => 13,
            ],
            'choices'     => ['min' => 10, 'max' => 30, 'step' => 1],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-job-title',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_description_size_quill',
            'label'       => esc_html__('Description Font Size (px)', 'author-kit'),
            'description' => esc_html__('Controls the description font size.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 16,
            'default'     => [
                'desktop' => 16,
                'mobile'  => 14,
            ],
            'choices'     => ['min' => 10, 'max' => 30, 'step' => 1],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-description',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        
        [
            'type'        => 'select',
            'settings'    => 'author_kit_archive_icon_style_quill',
            'label'       => esc_html__('Choose Icon Type', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'transport'   => 'postMessage',
            'default'     => 'author-kit-square',
            'placeholder' => esc_html__('Choose an option', 'author-kit'),
            'priority'    => 17,
            'choices'     => [
                'author-kit-circle' => esc_html__('Circle', 'author-kit'),
                'author-kit-square' => esc_html__('Square', 'author-kit'),
            ]
        ],
        
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_social_icons_gap_quill',
            'label'       => esc_html__('Icon Gap (px)', 'author-kit'),
            'description' => esc_html__('Spacing between icons in bio box.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 17,
            'default'     => [
                'desktop' => 10,
                'mobile'  => 5,
            ],
            'choices'     => ['min' => 0, 'max' => 50, 'step' => 1],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-social-icons-list',
                    'property'    => 'gap',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_social_icons_size_quill',
            'label'       => esc_html__('Icons Size (px)', 'author-kit'),
            'description' => esc_html__('Adjust the size of social icons in the author bio box', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 18,
            'default'     => [
                'desktop' => 40,
                'mobile'  => 32,
            ],
            'choices'     => ['min' => 20, 'max' => 50, 'step' => 1],
            'transport'   => 'refresh',
            'responsive'  => true,
    
        ],
        
        [
            'type'              => 'color',
            'settings'          => 'author_kit_archive_icon_container_color_quill',
            'label'             => esc_html__('Icon Container Color', 'author-kit'),
            'tooltip'           => esc_html__('Use black for default Color. No live preview available.', 'author-kit'),
            'section'           => 'author_kit_archive_section',
            'priority'          => 19,
            'default'           => '#fe4f2d',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color',
        ],
        [
            'type'              => 'color',
            'settings'          => 'author_kit_archive_social_icon_color_quill',
            'label'             => esc_html__('Icon Color', 'author-kit'),
            'section'           => 'author_kit_archive_section',
            'priority'          => 19,
            'default'           => '#ffffff',
            'transport'         => 'postMessage',
            'sanitize_callback' => 'sanitize_hex_color',
        ],
        [
            'type'        => 'headline',
            'settings'    => 'author_kit_archive_post_grid_heading_quill',
            'label'       => esc_html__('Post Grid Settings', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 19,
        ],
        [
            'type'        => 'padding',
            'settings'    => 'author_kit_post_grid_padding_quill',
            'label'       => esc_html__('Grid Padding', 'author-kit'),
            'description' => esc_html__('Adjust inner padding of post grid.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 19,
            'responsive'  => true,
            'transport'   => 'auto',
            'default'     => [
                'desktop' => ['top' => '0px', 'right' => '120px', 'bottom' => '40px', 'left' => '120px'],
                'mobile'  => ['top' => '10px', 'right' => '10px', 'bottom' => '40px', 'left' => '10px'],
            ],
            'output' => [
                [
                    'element'       => '#author-kit-archive-template .author-kit-posts, #author-kit-archive-template .author-kit-posts .author-kit-pagination-container',
                    'media_query'   => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                    'property'      => 'padding',
                    'value_pattern' => '$',
                ],
            ],
        ],
        [
            'type'        => 'text',
            'settings'    => 'author_kit_grid_archive_title',
            'label'       => esc_html__('Post Grid Title', 'author-kit'),
            'description' => esc_html__('Enter grid title.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'transport'   => 'postMessage',
            'priority'    => 19,
            'default'     => 'Posts By',
        ],
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_post_grid_title_size_quill',
            'label'       => esc_html__('Grid Title Size (px)', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 19,
            'default'     => [
                'desktop' => 18,
                'mobile'  => 14,
            ],
            'choices'     => ['min' => 10, 'max' => 50, 'step' => 1],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '#author-kit-archive-template .author-kit-posts-title',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_post_grid_title_color_quill',
            'label'     => esc_html__('Grid Title Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 19,
            'default'   => '#c2c2c2',
            'transport' => 'postMessage',
        ],
        [
            'type'      => 'radio-button',
            'settings'  => 'author_kit_archive_grid_text_alignment_quill',
            'label'     => esc_html__('Text Alignment', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 19,
            'default'   => 'center',
            'transport' => 'postMessage',
            'choices'   => [
                'left'   => esc_html__('Left', 'author-kit'),
                'center' => esc_html__('Center', 'author-kit'),
                'right'  => esc_html__('Right', 'author-kit'),
            ],
        ],
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_post_grid_bg_color_quill',
            'label'     => esc_html__('Grid Background Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 20,
            'default'   => '#fdfbee',
            'transport' => 'postMessage',
        ],
        [
            'type'        => 'number',
            'settings'    => 'author_kit_archive_grid_gap_quill',
            'label'       => esc_html__('Grid Gap (px)', 'author-kit'),
            'description' => esc_html__('Space between posts.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 20,
            'default'     => 10,
            'transport'   => 'postMessage',
        ],

        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_post_card_bg_color_quill',
            'label'     => esc_html__('Card Background Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 24,
            'default'   => '#ffffff',
            'transport' => 'postMessage',
        ],
        [
            'type'        => 'number',
            'settings'    => 'author_kit_archive_thumbnail_border_radius_quill',
            'label'       => esc_html__('Thumbnail Radius (px)', 'author-kit'),
            'description' => esc_html__('Thumbnail border radius.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 25,
            'default'     => 36,
            'transport'   => 'postMessage',
        ],
        [
            'type'        => 'slider',
                'settings'    => 'author_kit_archive_post_title_size_quill',
                'label'       => esc_html__( 'Post Title Size (px)', 'author-kit' ),
                'description' => esc_html__( 'Font size of post title.', 'author-kit' ),
                'section'     => 'author_kit_archive_section',
                'priority'    => 26,
            'default'     => [
                'desktop' => 18,
                'mobile'  => 14,
            ],
            'choices'     => ['min' => 10, 'max' => 30, 'step' => 1],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => 'h4.author-kit-post-title, #author-kit-archive-template h4.author-kit-post-title a',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_title_color_quill',
            'label'     => esc_html__('Post Title Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 27,
            'default'   => '#015551',
            'transport' => 'postMessage',
        ],
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_excerpt_size_quill',
            'label'       => esc_html__('Excerpt Size', 'author-kit'),
            'description' => esc_html__('Font size for excerpt text.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 28,
            'default'     => [
                'desktop' => 14,
                'mobile'  => 12,
            ],
            'choices'     => ['min' => 10, 'max' => 30, 'step' => 1],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-post-item div.author-kit-post-excerpt',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_excerpt_color_quill',
            'label'     => esc_html__('Excerpt Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 29,
            'default'   => '#015551',
            'transport' => 'postMessage',
        ],
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_post_meta_separator_color_quill',
            'label'     => esc_html__('Meta Separator', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 30,
            'default'   => '#015551',
            'transport' => 'postMessage',
        ],
        [
            'type'        => 'slider',
            'settings'    => 'author_kit_archive_post_meta_size_quill',
            'label'       => esc_html__('Meta Text Size', 'author-kit'),
            'description' => esc_html__('Font size for meta text.', 'author-kit'),
            'section'     => 'author_kit_archive_section',
            'priority'    => 30,
            'default'     => [
                'desktop' => 12,
                'mobile'  => 11,
            ],
            'choices'     => ['min' => 10, 'max' => 25, 'step' => 1],
            'transport'   => 'postMessage',
            'responsive'  => true,
            'output'      => [
                [
                    'element'     => '.author-kit-post-meta',
                    'property'    => 'font-size',
                    'units'       => 'px',
                    'media_query' => [
                        'desktop' => '@media (min-width: 900px)',
                        'mobile'  => '@media (max-width: 899px)',
                    ],
                ],
            ],
        ],
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_post_meta_color_quill',
            'label'     => esc_html__('Meta Text Color', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 31,
            'default'   => '#015551',
            'transport' => 'postMessage',
        ],
        [
            'type'     => 'headline',
            'settings' => 'author_kit_archive_post_card_heading_quill',
            'label'    => esc_html__('Pagination', 'author-kit'),
            'section'  => 'author_kit_archive_section',
            'priority' => 31,
        ],
        [
            'type'      => 'radio-button',
            'settings'  => 'author_kit_archive_pagination_alignment_quill',
            'label'     => esc_html__('Pagination Alignment', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 32,
            'default'   => 'center',
            'transport' => 'postMessage',
            'choices'   => [
                'left'   => esc_html__('Left', 'author-kit'),
                'center' => esc_html__('Center', 'author-kit'),
                'right'  => esc_html__('Right', 'author-kit'),
            ],
        ],
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_button_color_quill',
            'label'     => esc_html__('Button background', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 33,
            'default'   => '#fe4f2d',
            'transport' => 'postMessage',
        ],
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_button_hover_color_quill',
            'label'     => esc_html__('Hover background', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 33,
            'default'   => '#fe4f2d',
            'transport' => 'postMessage',
        ],
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_pagination_btn_color_quill',
            'label'     => esc_html__('Button text', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 33,
            'default'   => '#FFFFFF',
            'transport' => 'postMessage',
        ],
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_pagination_number_color_quill',
            'label'     => esc_html__('Number text', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 33,
            'default'   => '#000000',
            'transport' => 'postMessage',
        ],
        [
            'type'      => 'color',
            'settings'  => 'author_kit_archive_pagination_number_bg_color_quill',
            'label'     => esc_html__('Number text', 'author-kit'),
            'section'   => 'author_kit_archive_section',
            'priority'  => 33,
            'default'   => '#FFFFFF',
            'transport' => 'postMessage',
        ],
    

        
    ];

    // Apply controls for the active template
    if (!empty($template_controls[$active_template])) {
        foreach ($template_controls[$active_template] as $control) {
            $control_type = $control['type'] ?? null;

            // Ensure the control type exists and the corresponding class is defined
            if ($control_type && !empty($control_classes[$control_type])) {
                $control_class = $control_classes[$control_type];

                if (class_exists($control_class)) {
                    new $control_class($control);
                } else {
                   continue ;
                }
            }
        }
    }
}

add_action('kirki_config', 'author_kit_author_archive_customizer');
