<?php
// if( class_exists( 'SFWD_LMS' ) ) :
    $edumodo_ld_excerpt_padding = get_theme_mod('edumodo_ld_excerpt_padding',[]);
    $edumodo_primary_color = get_theme_mod('primary_color');
    $edumodo_secondary_color = get_theme_mod('secondary_color');
    
    $ld_typo_title_value = get_theme_mod('ld_course_archive_title',[]);
    $ld_typo_selector = [
        '.post-type-archive-sfwd-courses h3.entry-title'
    ];
    $edumodo_primarycolor__color_selector_for_ld = [
        '#ld_course_list .btn, .ld_course_grid_button .btn,.ld-course-list-items .ld_course_grid .btn-primary,.ld-course-list-items .ld_course_grid .thumbnail.course a.btn-primary,.edumodo-header .edumodo-navbar .navigation-main li a:hover', '.leaarndash-releted-course-two .lp-enroll', ''
    ];
    $edumodo_primarycolor__background_color_selector_for_ld = [
        '.btn-join, #btn-join, .learndash_checkout_buttons input.btn-join[type="button"], a#quiz_continue_link', '.btn-join:hover, #btn-join:hover, .learndash_checkout_buttons input.btn-join[type="button"]:hover, a#quiz_continue_link:hover', '#ld_course_list .btn-primary:hover, 
        .ld_course_grid_button .btn-primary:hover,
        .ld-course-list-items .ld_course_grid .btn-primary:hover', '.learndash-pager a', '#ld_course_list .thumbnail.course .ld_course_grid_price, .ld_course_grid_button .thumbnail.course .ld_course_grid_price, #ld_course_list .thumbnail.course .ld_course_grid_price.ribbon-enrolled, .ld_course_grid .thumbnail.course .ld_course_grid_price.ribbon-enrolled', '.leaarndash-releted-course-two .title:hover,.ld_course_grid .entry-title:hover', '.sfwd-courses .ld_course_grid_price',
    ];
    $edumodo_primarycolor__border_color_selector_for_ld = [
        '#ld_course_list .btn-primary, .ld_course_grid_button .btn-primary,.edumodo-header .edumodo-navbar .navigation-main li ul', '#ld_course_list .btn-primary:hover, 
        .ld_course_grid_button .btn-primary:hover,
        .ld-course-list-items .ld_course_grid .btn-primary:hover',
    ];
    $edumodo_secondarycolor__background_color_selector_for_ld = [
        '.btn-join:hover, #btn-join:hover, .learndash_checkout_buttons input.btn-join[type="button"]:hover, a#quiz_continue_link:hover',
    ];

?>
<style id="edumodo-learndash-style">
    <?php 
        edumodo_parse_typography_to_selectors($ld_typo_title_value, edumodo_parse_selector_as_string($ld_typo_selector));
        /**
         * primary color
         */
        edumodo_style_property_parser(edumodo_parse_selector_as_string($edumodo_primarycolor__color_selector_for_ld), 'color', $edumodo_primary_color);
        edumodo_style_property_parser(edumodo_parse_selector_as_string($edumodo_primarycolor__background_color_selector_for_ld), 'background-color', $edumodo_primary_color);
        edumodo_style_property_parser(edumodo_parse_selector_as_string($edumodo_primarycolor__border_color_selector_for_ld), 'border-color', $edumodo_primary_color);
        /**
         * secondary color
         */
        edumodo_style_property_parser(edumodo_parse_selector_as_string($edumodo_secondarycolor__background_color_selector_for_ld), 'background-color', $edumodo_secondary_color);
        /**
         * excerpt
         */
        # leandash course archive excerpt padding
            if( !empty( $edumodo_ld_excerpt_padding ) ): ?>
                .post-type-archive-sfwd-courses .ld_course_grid .entry-content {padding: <?php echo $edumodo_ld_excerpt_padding['top'].' ' .$edumodo_ld_excerpt_padding['right'].' ' .$edumodo_ld_excerpt_padding['bottom'].' ' .$edumodo_ld_excerpt_padding['left'] ; ?>;}
            <?php endif;
        # end of ld course archive excerpt padding
    ?>
    #ld_course_list .thumbnail.course .ld_course_grid_price:before, .ld_course_grid_button .thumbnail.course .ld_course_grid_price:before,
    .ld_course_grid .ld_course_grid_price:before {
    border-top-color: <?php echo esc_attr($edumodo_primary_color);?> !important;
    border-right-color: <?php echo esc_attr($edumodo_primary_color);?> !important;
    }
    
</style>
<?php
// endif;
?>