<?php

namespace Calio\Widgets;

use Elementor\Controls_Manager;
use Elementor\Group_Control_Border;
use Elementor\Group_Control_Box_Shadow;
use Elementor\Group_Control_Typography;
use Elementor\Repeater;

if (!defined('ABSPATH')) {
    exit;
}

/**
 * Renders media-rich editorial tabs with layered tab labels and animated panels.
 */
class FancyTabsWidget extends BaseWidget
{
    public function get_name(): string
    {
        return 'calio-fancy-tabs';
    }

    public function get_title(): string
    {
        return esc_html__('Fancy Tabs', 'calio-addon');
    }

    public function get_icon(): string
    {
        return 'eicon-tabs';
    }

    public function get_style_depends(): array
    {
        return $this->resolve_widget_style_depends('calio-widget-fancy-tabs');
    }

    public function get_script_depends(): array
    {
        return $this->resolve_widget_script_depends('calio-widget-fancy-tabs');
    }

    /**
     * Registers content and style controls for the Fancy Tabs widget.
     */
    protected function register_controls(): void
    {
        $this->start_controls_section('layout_section', ['label' => esc_html__('Layout', 'calio-addon')]);
        $this->add_control('layout_mode', [
            'label' => esc_html__('Layout Mode', 'calio-addon'),
            'type' => Controls_Manager::SELECT,
            'default' => 'horizontal',
            'options' => [
                'horizontal' => esc_html__('Horizontal', 'calio-addon'),
                'vertical' => esc_html__('Vertical', 'calio-addon'),
            ],
        ]);
        $this->add_control('nav_position', [
            'label' => esc_html__('Navigation Position', 'calio-addon'),
            'type' => Controls_Manager::SELECT,
            'default' => 'top',
            'options' => [
                'top' => esc_html__('Top', 'calio-addon'),
                'left' => esc_html__('Left', 'calio-addon'),
                'right' => esc_html__('Right', 'calio-addon'),
            ],
            'condition' => ['layout_mode' => 'vertical'],
        ]);
        $this->add_control('tab_skin', [
            'label' => esc_html__('Tab Skin', 'calio-addon'),
            'type' => Controls_Manager::SELECT,
            'default' => 'soft',
            'options' => [
                'soft' => esc_html__('Soft', 'calio-addon'),
                'outline' => esc_html__('Outline', 'calio-addon'),
                'underline' => esc_html__('Underline', 'calio-addon'),
                'contrast' => esc_html__('Contrast', 'calio-addon'),
            ],
        ]);
        $this->add_control('panel_skin', [
            'label' => esc_html__('Panel Skin', 'calio-addon'),
            'type' => Controls_Manager::SELECT,
            'default' => 'soft',
            'options' => [
                'none' => esc_html__('None', 'calio-addon'),
                'soft' => esc_html__('Soft', 'calio-addon'),
                'outline' => esc_html__('Outline', 'calio-addon'),
                'contrast' => esc_html__('Contrast', 'calio-addon'),
            ],
        ]);
        $this->add_control('content_preset', [
            'label' => esc_html__('Content Preset', 'calio-addon'),
            'type' => Controls_Manager::SELECT,
            'default' => 'balanced',
            'options' => [
                'balanced' => esc_html__('Balanced', 'calio-addon'),
                'split' => esc_html__('Split Content', 'calio-addon'),
                'spotlight' => esc_html__('Spotlight', 'calio-addon'),
            ],
        ]);
        $this->add_control('icon_position', [
            'label' => esc_html__('Icon Position', 'calio-addon'),
            'type' => Controls_Manager::SELECT,
            'default' => 'left',
            'options' => [
                'left' => esc_html__('Left', 'calio-addon'),
                'top' => esc_html__('Top', 'calio-addon'),
            ],
        ]);
        $this->add_control('show_media', [
            'label' => esc_html__('Show Tab Media', 'calio-addon'),
            'type' => Controls_Manager::SWITCHER,
            'return_value' => 'yes',
            'default' => 'yes',
        ]);
        $this->add_control('show_badge', [
            'label' => esc_html__('Show Badge', 'calio-addon'),
            'type' => Controls_Manager::SWITCHER,
            'return_value' => 'yes',
            'default' => 'yes',
        ]);
        $this->add_control('show_step_numbers', [
            'label' => esc_html__('Show Step Numbers', 'calio-addon'),
            'type' => Controls_Manager::SWITCHER,
            'return_value' => 'yes',
            'default' => '',
        ]);
        $this->add_control('show_indicator', [
            'label' => esc_html__('Show Active Indicator', 'calio-addon'),
            'type' => Controls_Manager::SWITCHER,
            'return_value' => 'yes',
            'default' => 'yes',
        ]);
        $this->add_control('show_panel_button', [
            'label' => esc_html__('Show Panel Button', 'calio-addon'),
            'type' => Controls_Manager::SWITCHER,
            'return_value' => 'yes',
            'default' => 'yes',
        ]);
        $this->add_control('show_panel_checklist', [
            'label' => esc_html__('Show Panel Checklist', 'calio-addon'),
            'type' => Controls_Manager::SWITCHER,
            'return_value' => 'yes',
            'default' => 'yes',
        ]);
        $this->add_control('show_support_chips', [
            'label' => esc_html__('Show Support Chips', 'calio-addon'),
            'type' => Controls_Manager::SWITCHER,
            'return_value' => 'yes',
            'default' => 'yes',
        ]);
        $this->add_control('show_secondary_cta', [
            'label' => esc_html__('Show Secondary CTA', 'calio-addon'),
            'type' => Controls_Manager::SWITCHER,
            'return_value' => 'yes',
            'default' => 'yes',
        ]);
        $this->add_control('show_panel_accent', [
            'label' => esc_html__('Show Panel Accent', 'calio-addon'),
            'type' => Controls_Manager::SWITCHER,
            'return_value' => 'yes',
            'default' => 'yes',
        ]);
        $this->add_control('show_media_overlay', [
            'label' => esc_html__('Show Media Overlay Label', 'calio-addon'),
            'type' => Controls_Manager::SWITCHER,
            'return_value' => 'yes',
            'default' => 'yes',
        ]);
        $this->add_control('panel_motion', [
            'label' => esc_html__('Panel Motion', 'calio-addon'),
            'type' => Controls_Manager::SELECT,
            'default' => 'fade',
            'options' => [
                'fade' => esc_html__('Fade', 'calio-addon'),
                'slide-up' => esc_html__('Slide Up', 'calio-addon'),
                'slide-right' => esc_html__('Slide Right', 'calio-addon'),
                'zoom' => esc_html__('Zoom', 'calio-addon'),
            ],
        ]);
        $this->add_control('mobile_mode', [
            'label' => esc_html__('Mobile Mode', 'calio-addon'),
            'type' => Controls_Manager::SELECT,
            'default' => 'tabs',
            'options' => [
                'tabs' => esc_html__('Keep Tabs', 'calio-addon'),
                'accordion' => esc_html__('Accordion Fallback', 'calio-addon'),
            ],
        ]);
        $this->add_control('activate_first', [
            'label' => esc_html__('Activate First Tab', 'calio-addon'),
            'type' => Controls_Manager::SWITCHER,
            'return_value' => 'yes',
            'default' => 'yes',
        ]);
        $this->add_control('prefer_featured', [
            'label' => esc_html__('Prefer Featured Tab', 'calio-addon'),
            'type' => Controls_Manager::SWITCHER,
            'return_value' => 'yes',
            'default' => 'yes',
        ]);
        $this->end_controls_section();

        $this->start_controls_section('tabs_section', ['label' => esc_html__('Tabs', 'calio-addon')]);
        $repeater = new Repeater();
        $repeater->add_control('title', [
            'label' => esc_html__('Title', 'calio-addon'),
            'type' => Controls_Manager::TEXT,
            'default' => esc_html__('Tab Title', 'calio-addon'),
            'label_block' => true,
        ]);
        $repeater->add_control('subtitle', [
            'label' => esc_html__('Subtitle', 'calio-addon'),
            'type' => Controls_Manager::TEXT,
            'default' => '',
            'label_block' => true,
        ]);
        $repeater->add_control('badge', [
            'label' => esc_html__('Badge', 'calio-addon'),
            'type' => Controls_Manager::TEXT,
            'default' => '',
        ]);
        $repeater->add_control('featured', [
            'label' => esc_html__('Featured Tab', 'calio-addon'),
            'type' => Controls_Manager::SWITCHER,
            'return_value' => 'yes',
            'default' => '',
        ]);
        $repeater->add_control('icon', [
            'label' => esc_html__('Icon', 'calio-addon'),
            'type' => Controls_Manager::ICONS,
        ]);
        $repeater->add_control('media', [
            'label' => esc_html__('Media', 'calio-addon'),
            'type' => Controls_Manager::MEDIA,
            'default' => ['url' => ''],
        ]);
        $repeater->add_control('eyebrow', [
            'label' => esc_html__('Eyebrow', 'calio-addon'),
            'type' => Controls_Manager::TEXT,
            'default' => '',
        ]);
        $repeater->add_control('overlay_label', [
            'label' => esc_html__('Overlay Label', 'calio-addon'),
            'type' => Controls_Manager::TEXT,
            'default' => '',
        ]);
        $repeater->add_control('support_chip', [
            'label' => esc_html__('Support Chip', 'calio-addon'),
            'type' => Controls_Manager::TEXT,
            'default' => '',
        ]);
        $repeater->add_control('meta_note', [
            'label' => esc_html__('Meta Note', 'calio-addon'),
            'type' => Controls_Manager::TEXT,
            'default' => '',
        ]);
        $repeater->add_control('stat_label', [
            'label' => esc_html__('Stat Label', 'calio-addon'),
            'type' => Controls_Manager::TEXT,
            'default' => '',
        ]);
        $repeater->add_control('stat_value', [
            'label' => esc_html__('Stat Value', 'calio-addon'),
            'type' => Controls_Manager::TEXT,
            'default' => '',
        ]);
        $repeater->add_control('content_title', [
            'label' => esc_html__('Panel Title', 'calio-addon'),
            'type' => Controls_Manager::TEXT,
            'default' => esc_html__('Panel Title', 'calio-addon'),
            'label_block' => true,
        ]);
        $repeater->add_control('content', [
            'label' => esc_html__('Content', 'calio-addon'),
            'type' => Controls_Manager::WYSIWYG,
            'default' => esc_html__('Add your panel content here.', 'calio-addon'),
        ]);
        $repeater->add_control('checklist', [
            'label' => esc_html__('Checklist Items', 'calio-addon'),
            'type' => Controls_Manager::TEXTAREA,
            'default' => '',
            'description' => esc_html__('One item per line.', 'calio-addon'),
        ]);
        $repeater->add_control('button_text', [
            'label' => esc_html__('Button Text', 'calio-addon'),
            'type' => Controls_Manager::TEXT,
            'default' => esc_html__('Learn More', 'calio-addon'),
        ]);
        $repeater->add_control('button_url', [
            'label' => esc_html__('Button URL', 'calio-addon'),
            'type' => Controls_Manager::URL,
            'default' => ['url' => ''],
        ]);
        $repeater->add_control('secondary_button_text', [
            'label' => esc_html__('Secondary Button Text', 'calio-addon'),
            'type' => Controls_Manager::TEXT,
            'default' => '',
        ]);
        $repeater->add_control('secondary_button_url', [
            'label' => esc_html__('Secondary Button URL', 'calio-addon'),
            'type' => Controls_Manager::URL,
            'default' => ['url' => ''],
        ]);
        $this->add_control('tabs', [
            'type' => Controls_Manager::REPEATER,
            'fields' => $repeater->get_controls(),
            'title_field' => '{{{ title }}}',
            'default' => $this->get_default_tabs(),
        ]);
        $this->end_controls_section();

        $this->start_controls_section('style_tabs', ['label' => esc_html__('Tabs', 'calio-addon'), 'tab' => Controls_Manager::TAB_STYLE]);
        $this->add_control('tabs_gap', [
            'label' => esc_html__('Gap', 'calio-addon'),
            'type' => Controls_Manager::SLIDER,
            'range' => ['px' => ['min' => 0, 'max' => 32]],
            'selectors' => [
                '{{WRAPPER}} .calio-fancy-tabs-nav' => 'gap: {{SIZE}}{{UNIT}};',
            ],
        ]);
        $this->add_style_heading('fancy_tabs_spacing_heading', esc_html__('Shape & Spacing', 'calio-addon'));
        $this->add_dimensions_control('tab_padding', esc_html__('Padding', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-button', 'padding');
        $this->add_dimensions_control('tab_margin', esc_html__('Margin', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-button', 'margin');
        $this->add_dimensions_control('tab_radius', esc_html__('Radius', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-button', 'border-radius', ['size_units' => ['px', '%']]);
        $this->add_style_heading('fancy_tabs_indicator_heading', esc_html__('Indicator', 'calio-addon'));
        $this->add_control('indicator_width', [
            'label' => esc_html__('Indicator Width', 'calio-addon'),
            'type' => Controls_Manager::SLIDER,
            'range' => ['px' => ['min' => 24, 'max' => 120]],
            'default' => ['unit' => 'px', 'size' => 48],
            'selectors' => [
                '{{WRAPPER}} .calio-fancy-tabs-indicator' => 'width: {{SIZE}}{{UNIT}};',
            ],
            'condition' => ['show_indicator' => 'yes'],
        ]);
        $this->add_control('indicator_height', [
            'label' => esc_html__('Indicator Height', 'calio-addon'),
            'type' => Controls_Manager::SLIDER,
            'range' => ['px' => ['min' => 2, 'max' => 8]],
            'default' => ['unit' => 'px', 'size' => 3],
            'selectors' => [
                '{{WRAPPER}} .calio-fancy-tabs-indicator' => 'height: {{SIZE}}{{UNIT}};',
            ],
            'condition' => ['show_indicator' => 'yes'],
        ]);
        $this->add_style_heading('fancy_tabs_surface_heading', esc_html__('Surface States', 'calio-addon'));
        $this->start_controls_tabs('fancy_tab_state_tabs');
        $this->start_controls_tab('fancy_tab_state_normal', ['label' => esc_html__('Normal', 'calio-addon')]);
        $this->add_text_paint_controls('fancy_tab_text_normal', esc_html__('Text Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-button');
        $this->add_background_type_control('fancy_tab_bg_normal_group', '{{WRAPPER}} .calio-fancy-tabs-button');
        $this->add_border_paint_controls('fancy_tab_border_normal', esc_html__('Border Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-button');
        $this->end_controls_tab();
        $this->start_controls_tab('fancy_tab_state_hover', ['label' => esc_html__('Hover', 'calio-addon')]);
        $this->add_text_paint_controls('fancy_tab_text_hover', esc_html__('Text Color', 'calio-addon'), ['{{WRAPPER}} .calio-fancy-tabs-button:hover', '{{WRAPPER}} .calio-fancy-tabs-button:focus-visible']);
        $this->add_background_type_control('fancy_tab_bg_hover_group', ['{{WRAPPER}} .calio-fancy-tabs-button:hover', '{{WRAPPER}} .calio-fancy-tabs-button:focus-visible']);
        $this->add_border_paint_controls('fancy_tab_border_hover', esc_html__('Border Color', 'calio-addon'), ['{{WRAPPER}} .calio-fancy-tabs-button:hover', '{{WRAPPER}} .calio-fancy-tabs-button:focus-visible']);
        $this->end_controls_tab();
        $this->start_controls_tab('fancy_tab_state_active', ['label' => esc_html__('Active', 'calio-addon')]);
        $this->add_text_paint_controls('fancy_tab_text_active', esc_html__('Text Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-button.is-active');
        $this->add_background_type_control('fancy_tab_bg_active_group', '{{WRAPPER}} .calio-fancy-tabs-button.is-active');
        $this->add_border_paint_controls('fancy_tab_border_active', esc_html__('Border Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-button.is-active');
        $this->end_controls_tab();
        $this->end_controls_tabs();
        $this->add_background_paint_controls('fancy_tab_indicator_active', esc_html__('Indicator Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-button.is-active .calio-fancy-tabs-indicator', ['condition' => ['show_indicator' => 'yes']]);
        $this->add_style_heading('fancy_tabs_shadow_heading', esc_html__('Border Type & Shadow', 'calio-addon'));
        $this->add_group_control(Group_Control_Border::get_type(), [
            'name' => 'fancy_tab_border_group',
            'selector' => '{{WRAPPER}} .calio-fancy-tabs-button',
        ]);
        $this->add_group_control(Group_Control_Box_Shadow::get_type(), [
            'name' => 'fancy_tab_shadow',
            'selector' => '{{WRAPPER}} .calio-fancy-tabs-button',
        ]);
        $this->end_controls_section();

        $this->start_controls_section('style_icon_badge', ['label' => esc_html__('Icon / Badge', 'calio-addon'), 'tab' => Controls_Manager::TAB_STYLE]);
        $this->add_control('icon_size', [
            'label' => esc_html__('Icon Size', 'calio-addon'),
            'type' => Controls_Manager::SLIDER,
            'range' => ['px' => ['min' => 12, 'max' => 40]],
            'selectors' => [
                '{{WRAPPER}} .calio-fancy-tabs-icon' => 'font-size: {{SIZE}}{{UNIT}};',
                '{{WRAPPER}} .calio-fancy-tabs-icon svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
            ],
        ]);
        $this->add_text_paint_controls('fancy_tab_icon_color', esc_html__('Icon Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-icon');
        $this->add_text_paint_controls('fancy_tab_step_text', esc_html__('Step Text', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-step');
        $this->add_background_type_control('fancy_tab_step_bg_group', '{{WRAPPER}} .calio-fancy-tabs-step');
        $this->add_text_paint_controls('fancy_tab_badge_text', esc_html__('Badge Text', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-badge');
        $this->add_background_type_control('fancy_tab_badge_bg_group', '{{WRAPPER}} .calio-fancy-tabs-badge');
        $this->add_text_paint_controls('fancy_tab_featured_text', esc_html__('Featured Text', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-button.is-featured');
        $this->add_background_type_control('fancy_tab_featured_bg_group', '{{WRAPPER}} .calio-fancy-tabs-button.is-featured');
        $this->end_controls_section();

        $this->start_controls_section('style_panel', ['label' => esc_html__('Panel', 'calio-addon'), 'tab' => Controls_Manager::TAB_STYLE]);
        $this->add_style_heading('fancy_panel_spacing_heading', esc_html__('Shape & Spacing', 'calio-addon'));
        $this->add_dimensions_control('panel_padding', esc_html__('Padding', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel', 'padding');
        $this->add_dimensions_control('panel_margin', esc_html__('Margin', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel', 'margin');
        $this->add_dimensions_control('panel_radius', esc_html__('Radius', 'calio-addon'), ['{{WRAPPER}} .calio-fancy-tabs-panel', '{{WRAPPER}} .calio-fancy-tabs-panel-media img'], 'border-radius', ['size_units' => ['px', '%']]);
        $this->add_style_heading('fancy_panel_surface_heading', esc_html__('Surface States', 'calio-addon'));
        $this->start_controls_tabs('fancy_panel_state_tabs');
        $this->start_controls_tab('fancy_panel_state_normal', ['label' => esc_html__('Normal', 'calio-addon')]);
        $this->add_background_type_control('fancy_panel_bg_normal_group', '{{WRAPPER}} .calio-fancy-tabs-panel');
        $this->add_border_paint_controls('fancy_panel_border_normal', esc_html__('Border Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel');
        $this->end_controls_tab();
        $this->start_controls_tab('fancy_panel_state_hover', ['label' => esc_html__('Hover', 'calio-addon')]);
        $this->add_background_type_control('fancy_panel_bg_hover_group', '{{WRAPPER}} .calio-fancy-tabs-panel:hover');
        $this->add_border_paint_controls('fancy_panel_border_hover', esc_html__('Border Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel:hover');
        $this->end_controls_tab();
        $this->start_controls_tab('fancy_panel_state_active', ['label' => esc_html__('Active', 'calio-addon')]);
        $this->add_background_type_control('fancy_panel_bg_active_group', '{{WRAPPER}} .calio-fancy-tabs-panel.is-active');
        $this->add_border_paint_controls('fancy_panel_border_active', esc_html__('Border Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel.is-active');
        $this->end_controls_tab();
        $this->end_controls_tabs();
        $this->add_style_heading('fancy_panel_outline_heading', esc_html__('Outline & Shadow', 'calio-addon'));
        $this->add_group_control(Group_Control_Box_Shadow::get_type(), [
            'name' => 'fancy_panel_shadow',
            'selector' => '{{WRAPPER}} .calio-fancy-tabs-panel',
        ]);
        $this->add_group_control(Group_Control_Border::get_type(), [
            'name' => 'fancy_panel_border',
            'selector' => '{{WRAPPER}} .calio-fancy-tabs-panel',
        ]);
        $this->add_background_paint_controls('fancy_panel_accent_bg', esc_html__('Accent Background', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-accent', ['condition' => ['show_panel_accent' => 'yes']]);
        $this->end_controls_section();

        $this->start_controls_section('style_content', ['label' => esc_html__('Content', 'calio-addon'), 'tab' => Controls_Manager::TAB_STYLE]);
        $this->add_group_control(Group_Control_Typography::get_type(), [
            'name' => 'fancy_tab_title_typography',
            'selector' => '{{WRAPPER}} .calio-fancy-tabs-tab-title, {{WRAPPER}} .calio-fancy-tabs-panel-title',
        ]);
        $this->add_group_control(Group_Control_Typography::get_type(), [
            'name' => 'fancy_tab_subtitle_typography',
            'selector' => '{{WRAPPER}} .calio-fancy-tabs-tab-subtitle, {{WRAPPER}} .calio-fancy-tabs-panel-eyebrow',
        ]);
        $this->add_group_control(Group_Control_Typography::get_type(), [
            'name' => 'fancy_tab_body_typography',
            'selector' => '{{WRAPPER}} .calio-fancy-tabs-panel-copy',
        ]);
        $this->add_text_paint_controls('fancy_tab_heading_text', esc_html__('Heading Color', 'calio-addon'), ['{{WRAPPER}} .calio-fancy-tabs-tab-title', '{{WRAPPER}} .calio-fancy-tabs-panel-title']);
        $this->add_text_paint_controls('fancy_tab_subtitle_text', esc_html__('Subtitle / Eyebrow Color', 'calio-addon'), ['{{WRAPPER}} .calio-fancy-tabs-tab-subtitle', '{{WRAPPER}} .calio-fancy-tabs-panel-eyebrow']);
        $this->add_text_paint_controls('fancy_tab_body_text', esc_html__('Body Text', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-copy');
        $this->add_text_paint_controls('fancy_tab_meta_note', esc_html__('Meta Note', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-meta-note');
        $this->add_text_paint_controls('fancy_tab_stat_text', esc_html__('Stat Value', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-stat-value');
        $this->add_background_type_control('fancy_tab_stat_bg_group', '{{WRAPPER}} .calio-fancy-tabs-stat');
        $this->add_text_paint_controls('fancy_tab_support_chip_text', esc_html__('Support Chip Text', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-support-chip');
        $this->add_background_type_control('fancy_tab_support_chip_bg_group', '{{WRAPPER}} .calio-fancy-tabs-support-chip');
        $this->add_text_paint_controls('fancy_tab_checklist_text', esc_html__('Checklist Text', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-checklist');
        $this->add_text_paint_controls('fancy_tab_check_icon', esc_html__('Checklist Icon', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-checklist-item::before');
        $this->add_text_paint_controls('fancy_tab_overlay_text', esc_html__('Overlay Label Text', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-media-overlay');
        $this->add_background_type_control('fancy_tab_overlay_bg_group', '{{WRAPPER}} .calio-fancy-tabs-media-overlay');
        $this->end_controls_section();

        $this->start_controls_section('style_button', ['label' => esc_html__('Button', 'calio-addon'), 'tab' => Controls_Manager::TAB_STYLE]);
        $this->add_group_control(Group_Control_Typography::get_type(), [
            'name' => 'fancy_panel_button_typography',
            'selector' => '{{WRAPPER}} .calio-fancy-tabs-panel-button',
        ]);
        $this->add_style_heading('fancy_button_surface_heading', esc_html__('Surface States', 'calio-addon'));
        $this->start_controls_tabs('fancy_button_state_tabs');
        $this->start_controls_tab('fancy_button_state_normal', ['label' => esc_html__('Normal', 'calio-addon')]);
        $this->add_text_paint_controls('fancy_button_text_normal', esc_html__('Text Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button');
        $this->add_background_type_control('fancy_button_bg_normal_group', '{{WRAPPER}} .calio-fancy-tabs-panel-button');
        $this->add_border_paint_controls('fancy_button_border_normal', esc_html__('Border Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button');
        $this->end_controls_tab();
        $this->start_controls_tab('fancy_button_state_hover', ['label' => esc_html__('Hover', 'calio-addon')]);
        $this->add_text_paint_controls('fancy_button_text_hover', esc_html__('Text Color', 'calio-addon'), ['{{WRAPPER}} .calio-fancy-tabs-panel-button:hover', '{{WRAPPER}} .calio-fancy-tabs-panel-button:focus-visible']);
        $this->add_background_type_control('fancy_button_bg_hover_group', ['{{WRAPPER}} .calio-fancy-tabs-panel-button:hover', '{{WRAPPER}} .calio-fancy-tabs-panel-button:focus-visible']);
        $this->add_border_paint_controls('fancy_button_border_hover', esc_html__('Border Color', 'calio-addon'), ['{{WRAPPER}} .calio-fancy-tabs-panel-button:hover', '{{WRAPPER}} .calio-fancy-tabs-panel-button:focus-visible']);
        $this->end_controls_tab();
        $this->start_controls_tab('fancy_button_state_active', ['label' => esc_html__('Active', 'calio-addon')]);
        $this->add_text_paint_controls('fancy_button_text_active', esc_html__('Text Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button:active');
        $this->add_background_type_control('fancy_button_bg_active_group', '{{WRAPPER}} .calio-fancy-tabs-panel-button:active');
        $this->add_border_paint_controls('fancy_button_border_active', esc_html__('Border Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button:active');
        $this->end_controls_tab();
        $this->end_controls_tabs();
        $this->add_style_heading('fancy_button_outline_heading', esc_html__('Border Type & Shadow', 'calio-addon'));
        $this->add_group_control(Group_Control_Border::get_type(), [
            'name' => 'fancy_button_border_group',
            'selector' => '{{WRAPPER}} .calio-fancy-tabs-panel-button',
        ]);
        $this->add_group_control(Group_Control_Box_Shadow::get_type(), [
            'name' => 'fancy_button_shadow_group',
            'selector' => '{{WRAPPER}} .calio-fancy-tabs-panel-button',
        ]);
        $this->add_style_heading('fancy_button_spacing_heading', esc_html__('Shape & Spacing', 'calio-addon'));
        $this->add_dimensions_control('fancy_button_padding', esc_html__('Padding', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button', 'padding');
        $this->add_dimensions_control('fancy_button_margin', esc_html__('Margin', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button', 'margin');
        $this->add_dimensions_control('fancy_button_radius', esc_html__('Radius', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button', 'border-radius', ['size_units' => ['px', '%']]);
        $this->end_controls_section();

        $this->start_controls_section('style_secondary_button', ['label' => esc_html__('Secondary Button', 'calio-addon'), 'tab' => Controls_Manager::TAB_STYLE]);
        $this->add_group_control(Group_Control_Typography::get_type(), [
            'name' => 'fancy_secondary_button_typography',
            'selector' => '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary',
        ]);
        $this->add_style_heading('fancy_secondary_button_surface_heading', esc_html__('Surface States', 'calio-addon'));
        $this->start_controls_tabs('fancy_secondary_button_state_tabs');
        $this->start_controls_tab('fancy_secondary_button_state_normal', ['label' => esc_html__('Normal', 'calio-addon')]);
        $this->add_text_paint_controls('fancy_secondary_button_text_normal', esc_html__('Text Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary');
        $this->add_background_type_control('fancy_secondary_button_bg_normal_group', '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary');
        $this->add_border_paint_controls('fancy_secondary_button_border_normal', esc_html__('Border Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary');
        $this->end_controls_tab();
        $this->start_controls_tab('fancy_secondary_button_state_hover', ['label' => esc_html__('Hover', 'calio-addon')]);
        $this->add_text_paint_controls('fancy_secondary_button_text_hover', esc_html__('Text Color', 'calio-addon'), ['{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary:hover', '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary:focus-visible']);
        $this->add_background_type_control('fancy_secondary_button_bg_hover_group', ['{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary:hover', '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary:focus-visible']);
        $this->add_border_paint_controls('fancy_secondary_button_border_hover', esc_html__('Border Color', 'calio-addon'), ['{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary:hover', '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary:focus-visible']);
        $this->end_controls_tab();
        $this->start_controls_tab('fancy_secondary_button_state_active', ['label' => esc_html__('Active', 'calio-addon')]);
        $this->add_text_paint_controls('fancy_secondary_button_text_active', esc_html__('Text Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary:active');
        $this->add_background_type_control('fancy_secondary_button_bg_active_group', '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary:active');
        $this->add_border_paint_controls('fancy_secondary_button_border_active', esc_html__('Border Color', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary:active');
        $this->end_controls_tab();
        $this->end_controls_tabs();
        $this->add_style_heading('fancy_secondary_button_outline_heading', esc_html__('Border Type & Shadow', 'calio-addon'));
        $this->add_group_control(Group_Control_Border::get_type(), [
            'name' => 'fancy_secondary_button_border_group',
            'selector' => '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary',
        ]);
        $this->add_group_control(Group_Control_Box_Shadow::get_type(), [
            'name' => 'fancy_secondary_button_shadow_group',
            'selector' => '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary',
        ]);
        $this->add_style_heading('fancy_secondary_button_spacing_heading', esc_html__('Shape & Spacing', 'calio-addon'));
        $this->add_dimensions_control('fancy_secondary_button_padding', esc_html__('Padding', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary', 'padding');
        $this->add_dimensions_control('fancy_secondary_button_margin', esc_html__('Margin', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary', 'margin');
        $this->add_dimensions_control('fancy_secondary_button_radius', esc_html__('Radius', 'calio-addon'), '{{WRAPPER}} .calio-fancy-tabs-panel-button.is-secondary', 'border-radius', ['size_units' => ['px', '%']]);
        $this->end_controls_section();
    }

    /**
     * Prints the tab buttons and content panels.
     */
    protected function render(): void
    {
        $settings = $this->get_settings_for_display();
        $tabs = $settings['tabs'] ?? [];

        if (!is_array($tabs) || empty($tabs)) {
            echo '<div class="calio-fancy-tabs-empty">' . esc_html__('Add at least one tab item.', 'calio-addon') . '</div>';
            return;
        }

        $widget_id = 'calio-fancy-tabs-' . $this->get_id();
        $layout_mode = sanitize_html_class((string) ($settings['layout_mode'] ?? 'horizontal'));
        $nav_position = sanitize_html_class((string) ($settings['nav_position'] ?? 'top'));
        $tab_skin = sanitize_html_class((string) ($settings['tab_skin'] ?? 'soft'));
        $panel_skin = sanitize_html_class((string) ($settings['panel_skin'] ?? 'soft'));
        $content_preset = sanitize_html_class((string) ($settings['content_preset'] ?? 'balanced'));
        $icon_position = sanitize_html_class((string) ($settings['icon_position'] ?? 'left'));
        $panel_motion = sanitize_html_class((string) ($settings['panel_motion'] ?? 'fade'));
        $mobile_mode = sanitize_html_class((string) ($settings['mobile_mode'] ?? 'tabs'));
        $show_media = ($settings['show_media'] ?? 'yes') === 'yes';
        $show_badge = ($settings['show_badge'] ?? 'yes') === 'yes';
        $show_step_numbers = ($settings['show_step_numbers'] ?? '') === 'yes';
        $show_indicator = ($settings['show_indicator'] ?? 'yes') === 'yes';
        $show_panel_button = ($settings['show_panel_button'] ?? 'yes') === 'yes';
        $show_panel_checklist = ($settings['show_panel_checklist'] ?? 'yes') === 'yes';
        $show_support_chips = ($settings['show_support_chips'] ?? 'yes') === 'yes';
        $show_secondary_cta = ($settings['show_secondary_cta'] ?? 'yes') === 'yes';
        $show_panel_accent = ($settings['show_panel_accent'] ?? 'yes') === 'yes';
        $show_media_overlay = ($settings['show_media_overlay'] ?? 'yes') === 'yes';
        $activate_first = ($settings['activate_first'] ?? 'yes') === 'yes';
        $prefer_featured = ($settings['prefer_featured'] ?? 'yes') === 'yes';
        $featured_index = $prefer_featured ? $this->get_featured_index($tabs) : -1;

        echo '<div id="' . esc_attr($widget_id) . '" class="calio-fancy-tabs layout-' . esc_attr($layout_mode) . ' nav-' . esc_attr($nav_position) . ' tab-skin-' . esc_attr($tab_skin) . ' panel-skin-' . esc_attr($panel_skin) . ' content-preset-' . esc_attr($content_preset) . ' icon-pos-' . esc_attr($icon_position) . ' motion-' . esc_attr($panel_motion) . ' mobile-' . esc_attr($mobile_mode) . ($show_indicator ? ' has-indicator' : ' no-indicator') . ($show_step_numbers ? ' has-steps' : '') . ($show_panel_accent ? ' has-panel-accent' : '') . ($show_media_overlay ? ' has-media-overlay' : '') . '" data-orientation="' . esc_attr($layout_mode === 'vertical' ? 'vertical' : 'horizontal') . '" data-mobile-mode="' . esc_attr($mobile_mode) . '">';
        echo '<div class="calio-fancy-tabs-nav" role="tablist" aria-orientation="' . esc_attr($layout_mode === 'vertical' ? 'vertical' : 'horizontal') . '">';

        foreach (array_values($tabs) as $index => $tab) {
            $tab_id = $widget_id . '-tab-' . $index;
            $panel_id = $widget_id . '-panel-' . $index;
            $is_active = $activate_first ? ($featured_index >= 0 ? $index === $featured_index : $index === 0) : false;
            $is_featured = (($tab['featured'] ?? '') === 'yes');

            echo '<button id="' . esc_attr($tab_id) . '" class="calio-fancy-tabs-button' . ($is_active ? ' is-active' : '') . ($is_featured ? ' is-featured' : '') . '" type="button" role="tab" data-target="' . esc_attr($panel_id) . '" aria-selected="' . esc_attr($is_active ? 'true' : 'false') . '" aria-controls="' . esc_attr($panel_id) . '" tabindex="' . esc_attr($is_active ? '0' : '-1') . '">';
            if ($show_step_numbers) {
                echo '<span class="calio-fancy-tabs-step">' . esc_html(str_pad((string) ($index + 1), 2, '0', STR_PAD_LEFT)) . '</span>';
            }
            if ($show_media && !empty($tab['media']['url'])) {
                echo '<span class="calio-fancy-tabs-tab-media" aria-hidden="true">';
                $this->render_media((array) $tab['media']);
                echo '</span>';
            }
            if (!empty($tab['icon']['value'])) {
                echo '<span class="calio-fancy-tabs-icon" aria-hidden="true">' . wp_kses_post($this->get_icon_markup($tab['icon'])) . '</span>';
            }
            echo '<span class="calio-fancy-tabs-labels">';
            if (!empty($tab['subtitle'])) {
                echo '<span class="calio-fancy-tabs-tab-subtitle">' . esc_html((string) $tab['subtitle']) . '</span>';
            }
            echo '<span class="calio-fancy-tabs-tab-title">' . esc_html((string) ($tab['title'] ?? '')) . '</span>';
            if (!empty($tab['meta_note'])) {
                echo '<span class="calio-fancy-tabs-meta-note">' . esc_html((string) $tab['meta_note']) . '</span>';
            }
            echo '</span>';
            if ($show_badge && !empty($tab['badge'])) {
                echo '<span class="calio-fancy-tabs-badge">' . esc_html((string) $tab['badge']) . '</span>';
            }
            if (!empty($tab['stat_label']) || !empty($tab['stat_value'])) {
                echo '<span class="calio-fancy-tabs-stat">';
                if (!empty($tab['stat_label'])) {
                    echo '<span class="calio-fancy-tabs-stat-label">' . esc_html((string) $tab['stat_label']) . '</span>';
                }
                if (!empty($tab['stat_value'])) {
                    echo '<span class="calio-fancy-tabs-stat-value">' . esc_html((string) $tab['stat_value']) . '</span>';
                }
                echo '</span>';
            }
            if ($show_indicator) {
                echo '<span class="calio-fancy-tabs-indicator" aria-hidden="true"></span>';
            }
            echo '</button>';
        }

        echo '</div>';
        echo '<div class="calio-fancy-tabs-panels">';

        foreach (array_values($tabs) as $index => $tab) {
            $tab_id = $widget_id . '-tab-' . $index;
            $panel_id = $widget_id . '-panel-' . $index;
            $is_active = $activate_first ? ($featured_index >= 0 ? $index === $featured_index : $index === 0) : false;
            $is_featured = (($tab['featured'] ?? '') === 'yes');

            echo '<div id="' . esc_attr($panel_id) . '" class="calio-fancy-tabs-panel' . ($is_active ? ' is-active' : '') . ($is_featured ? ' is-featured' : '') . '" role="tabpanel" aria-labelledby="' . esc_attr($tab_id) . '"' . ($is_active ? '' : ' hidden') . '>';
            echo '<button class="calio-fancy-tabs-mobile-toggle" type="button" data-target="' . esc_attr($panel_id) . '" aria-expanded="' . esc_attr($is_active ? 'true' : 'false') . '">';
            if ($show_step_numbers) {
                echo '<span class="calio-fancy-tabs-step">' . esc_html(str_pad((string) ($index + 1), 2, '0', STR_PAD_LEFT)) . '</span>';
            }
            echo '<span class="calio-fancy-tabs-mobile-toggle-copy">';
            echo '<span class="calio-fancy-tabs-mobile-title">' . esc_html((string) ($tab['title'] ?? '')) . '</span>';
            if (!empty($tab['subtitle'])) {
                echo '<span class="calio-fancy-tabs-mobile-subtitle">' . esc_html((string) $tab['subtitle']) . '</span>';
            }
            echo '</span>';
            if ($show_badge && !empty($tab['badge'])) {
                echo '<span class="calio-fancy-tabs-badge">' . esc_html((string) $tab['badge']) . '</span>';
            }
            echo '</button>';
            if ($show_media && !empty($tab['media']['url'])) {
                echo '<div class="calio-fancy-tabs-panel-media">';
                if ($show_media_overlay && (!empty($tab['overlay_label']) || !empty($tab['badge']))) {
                    echo '<span class="calio-fancy-tabs-media-overlay">' . esc_html((string) (!empty($tab['overlay_label']) ? $tab['overlay_label'] : $tab['badge'])) . '</span>';
                }
                    $this->render_media((array) $tab['media']);
                echo '</div>';
            }
            if ($show_panel_accent) {
                echo '<div class="calio-fancy-tabs-panel-accent" aria-hidden="true"></div>';
            }
            echo '<div class="calio-fancy-tabs-panel-copy">';
            if (!empty($tab['eyebrow'])) {
                echo '<div class="calio-fancy-tabs-panel-eyebrow">' . esc_html((string) $tab['eyebrow']) . '</div>';
            }
            if (!empty($tab['content_title'])) {
                echo '<h3 class="calio-fancy-tabs-panel-title">' . esc_html((string) $tab['content_title']) . '</h3>';
            }
            if (!empty($tab['meta_note']) || !empty($tab['stat_label']) || !empty($tab['stat_value'])) {
                echo '<div class="calio-fancy-tabs-panel-meta">';
                if (!empty($tab['meta_note'])) {
                    echo '<span class="calio-fancy-tabs-meta-note">' . esc_html((string) $tab['meta_note']) . '</span>';
                }
                if (!empty($tab['stat_label']) || !empty($tab['stat_value'])) {
                    echo '<span class="calio-fancy-tabs-stat">';
                    if (!empty($tab['stat_label'])) {
                        echo '<span class="calio-fancy-tabs-stat-label">' . esc_html((string) $tab['stat_label']) . '</span>';
                    }
                    if (!empty($tab['stat_value'])) {
                        echo '<span class="calio-fancy-tabs-stat-value">' . esc_html((string) $tab['stat_value']) . '</span>';
                    }
                    echo '</span>';
                }
                echo '</div>';
            }
            if ($show_support_chips && !empty($tab['support_chip'])) {
                echo '<div class="calio-fancy-tabs-support-chips"><span class="calio-fancy-tabs-support-chip">' . esc_html((string) $tab['support_chip']) . '</span></div>';
            }
            echo '<div class="calio-fancy-tabs-panel-body">' . wp_kses_post((string) ($tab['content'] ?? '')) . '</div>';
            $checklist_items = $this->parse_checklist((string) ($tab['checklist'] ?? ''));
            if ($show_panel_checklist && !empty($checklist_items)) {
                echo '<ul class="calio-fancy-tabs-checklist">';
                foreach ($checklist_items as $checklist_item) {
                    echo '<li class="calio-fancy-tabs-checklist-item">' . esc_html($checklist_item) . '</li>';
                }
                echo '</ul>';
            }
            if (
                ($show_panel_button && !empty($tab['button_text']) && !empty($tab['button_url']['url'])) ||
                ($show_secondary_cta && !empty($tab['secondary_button_text']) && !empty($tab['secondary_button_url']['url']))
            ) {
                echo '<div class="calio-fancy-tabs-cta-row">';
                if ($show_panel_button && !empty($tab['button_text']) && !empty($tab['button_url']['url'])) {
                    echo wp_kses_post($this->build_panel_link(
                        'calio-fancy-tabs-panel-button',
                        (string) $tab['button_text'],
                        (array) $tab['button_url']
                    ));
                }
                if ($show_secondary_cta && !empty($tab['secondary_button_text']) && !empty($tab['secondary_button_url']['url'])) {
                    echo wp_kses_post($this->build_panel_link(
                        'calio-fancy-tabs-panel-button is-secondary',
                        (string) $tab['secondary_button_text'],
                        (array) $tab['secondary_button_url']
                    ));
                }
                echo '</div>';
            }
            echo '</div>';
            echo '</div>';
        }

        echo '</div>';
        echo '</div>';
    }

    /**
     * Returns the first featured tab index, or -1 when none exist.
     *
     * @param array<int, array<string, mixed>> $tabs Tab repeater values.
     */
    private function get_featured_index(array $tabs): int
    {
        foreach (array_values($tabs) as $index => $tab) {
            if (($tab['featured'] ?? '') === 'yes') {
                return $index;
            }
        }

        return -1;
    }

    /**
     * Builds a sanitized panel CTA link.
     *
     * @param array<string, mixed> $url URL control payload.
     */
    private function build_panel_link(string $class_name, string $label, array $url): string
    {
        $rel = [];

        if (!empty($url['is_external'])) {
            $rel[] = 'noopener';
            $rel[] = 'noreferrer';
        }

        if (!empty($url['nofollow'])) {
            $rel[] = 'nofollow';
        }

        $output = '<a class="' . esc_attr($class_name) . '" href="' . esc_url((string) ($url['url'] ?? '')) . '"';
        if (!empty($url['is_external'])) {
            $output .= ' target="' . esc_attr('_blank') . '"';
        }
        if (!empty($rel)) {
            $output .= ' rel="' . esc_attr(implode(' ', array_unique($rel))) . '"';
        }

        return $output . '>' . esc_html($label) . '</a>';
    }

    /**
     * Converts textarea checklist input into a clean item array.
     *
     * @return array<int, string>
     */
    private function parse_checklist(string $value): array
    {
        $items = preg_split('/\r\n|\r|\n/', $value) ?: [];

        return array_values(array_filter(array_map('trim', $items)));
    }

    /**
     * Prints media safely using the attachment renderer when possible.
     *
     * @param array<string, mixed> $media Media control payload.
     */
    private function render_media(array $media): void
    {
        $media_id = isset($media['id']) ? absint($media['id']) : 0;

        if ($media_id > 0) {
            echo wp_kses_post(wp_get_attachment_image($media_id, 'large', false, ['loading' => 'lazy']));
            return;
        }

        if (!empty($media['url'])) {
            echo '<img src="' . esc_url((string) $media['url']) . '" alt="" loading="lazy" />';
        }
    }

    /**
     * Provides richer starter content for the initial widget drop.
     *
     * @return array<int, array<string, mixed>>
     */
    private function get_default_tabs(): array
    {
        return [
            [
                'title' => esc_html__('Experience', 'calio-addon'),
                'subtitle' => esc_html__('Layered UI', 'calio-addon'),
                'badge' => esc_html__('Popular', 'calio-addon'),
                'featured' => 'yes',
                'eyebrow' => esc_html__('Editorial Flow', 'calio-addon'),
                'overlay_label' => esc_html__('Featured', 'calio-addon'),
                'meta_note' => esc_html__('Most selected flow', 'calio-addon'),
                'stat_label' => esc_html__('Depth', 'calio-addon'),
                'stat_value' => esc_html__('12 Blocks', 'calio-addon'),
                'content_title' => esc_html__('Create richer storytelling sections', 'calio-addon'),
                'content' => esc_html__('Use media, layered headings and action links to build more expressive content panels.', 'calio-addon'),
                'checklist' => "Hero-friendly layout\nLayered visual rhythm\nClear CTA hierarchy",
                'button_text' => esc_html__('Explore Layout', 'calio-addon'),
                'secondary_button_text' => esc_html__('Preview Demo', 'calio-addon'),
            ],
            [
                'title' => esc_html__('Workflow', 'calio-addon'),
                'subtitle' => esc_html__('Guided Steps', 'calio-addon'),
                'badge' => esc_html__('New', 'calio-addon'),
                'eyebrow' => esc_html__('Structured Content', 'calio-addon'),
                'overlay_label' => esc_html__('Guide', 'calio-addon'),
                'support_chip' => esc_html__('Onboarding Ready', 'calio-addon'),
                'meta_note' => esc_html__('Best for onboarding', 'calio-addon'),
                'stat_label' => esc_html__('Flow', 'calio-addon'),
                'stat_value' => esc_html__('4 Steps', 'calio-addon'),
                'content_title' => esc_html__('Keep tabs useful instead of decorative', 'calio-addon'),
                'content' => esc_html__('Pair short tab labels with deeper panel content, supporting copy and a clear CTA.', 'calio-addon'),
                'checklist' => "Explain steps clearly\nSupport microcopy\nReduce decision friction",
                'button_text' => esc_html__('View Details', 'calio-addon'),
                'secondary_button_text' => esc_html__('See Structure', 'calio-addon'),
            ],
            [
                'title' => esc_html__('Polish', 'calio-addon'),
                'subtitle' => esc_html__('State Driven', 'calio-addon'),
                'badge' => esc_html__('Pro Feel', 'calio-addon'),
                'eyebrow' => esc_html__('Visual Rhythm', 'calio-addon'),
                'overlay_label' => esc_html__('Preview', 'calio-addon'),
                'support_chip' => esc_html__('Interaction Layer', 'calio-addon'),
                'meta_note' => esc_html__('Most visual preset', 'calio-addon'),
                'stat_label' => esc_html__('States', 'calio-addon'),
                'stat_value' => esc_html__('3 Layers', 'calio-addon'),
                'content_title' => esc_html__('Design for hover, active and focus states', 'calio-addon'),
                'content' => esc_html__('Bring the same state-based care to tabs that we already use across the rest of Calio widgets.', 'calio-addon'),
                'checklist' => "Hover feedback\nActive rhythm\nAccessible focus states",
                'button_text' => esc_html__('See States', 'calio-addon'),
                'secondary_button_text' => esc_html__('Review Motion', 'calio-addon'),
            ],
        ];
    }
}
