<?php 
// if( class_exists( 'LifterLMS' ) ):
$edumodo_primary_color = get_theme_mod('primary_color');
$edumodo_secondary_color = get_theme_mod('secondary_color');
$body_typo = get_theme_mod( 'body_typo', [] );
# lifter archive settings
$edumodo__lifter_course_archive_column_gap = get_theme_mod('edumodo__lifter_course_archive_column_gap',[]);
$edumodo__lifter_archive_price_spacing_bottom = get_theme_mod('edumodo__lifter_archive_price_spacing_bottom',[]);
$edumodo__lifter_archive_excerpt_margin = get_theme_mod('edumodo__lifter_archive_excerpt_margin',[]);
$edumodo__lifter_course_archive_card_border_radius = get_theme_mod('edumodo__lifter_course_archive_card_border_radius',[]);
$edumodo__lifter_archive_content_spacing = get_theme_mod('edumodo__lifter_archive_content_spacing',[]);
$edumodo__lifter_archive_content_background = get_theme_mod('edumodo__lifter_archive_content_background',[]);
$edumodo__lifter_archive_content_alignment = get_theme_mod('edumodo__lifter_archive_content_alignment',[]);
$edumodo__lifter_archive_pregressbar = get_theme_mod('edumodo__lifter_archive_pregressbar',[]);
/**
 * price
 */
$edumodo__lifter_archive_price_typo = get_theme_mod('edumodo__lifter_archive_price_typo',[]);
$edumodo__lifter_archive_price_selector = [
    '.lifter-archive-card  .course-price'
];
/**
 * title
 */
$edumodo__lifter_archive_title_typo = get_theme_mod('edumodo__lifter_archive_title_typo',[]);
$edumodo__lifter_title_selector = [
    '.lifter-archive-card  .course-title'
];
/**
 * excerpt
 */
$edumodo__lifter_archive_excerpt_typo = get_theme_mod('edumodo__lifter_archive_excerpt_typo',[]);
$edumodo__lifter_archive_excerpt_selector = [
    '.lifter-archive-card  .course-excerpt'
];
/**
 * meta
 */
$edumodo__lifter_archive_meta_typo = get_theme_mod('edumodo__lifter_archive_meta_typo',[]);
$edumodo__lifter_archive_meta_selector = [
    '.lifter-archive-card  .course-meta'
];

$edumodo_primarycolor__color_selector_for_lp = [
    '.lifter-conent-area .lifter-single-course-post .entry-content .llms-syllabus-wrapper .llms-lesson-preview.is-complete .llms-lesson-complete', '.lifter-conent-area .lifter-single-course-post a:hover', '.lifter-conent-area .lifter-single-course-post .entry-content .llms-syllabus-wrapper .llms-lesson-preview .llms-lesson-link:hover .llms-lesson-title', '.lifter-conent-area .lifter-single-course-post .entry-footer-body .social-share a:hover', '.lifter-conent-area .lifter-single-course-post .entry-content .llms-access-plan .llms-access-plan-restrictions a', '.lifter-conent-area .lifer-sidebar-wrapper .widget a:hover'
];
$edumodo_primarycolor__background_selector_for_lp = [
    '.lifter-conent-area .lifter-single-course-post .entry-content .llms-progress .llms-progress-bar .progress-bar-complete', '.lifter-conent-area .lifter-single-course-post .entry-content .llms-course-continue-button', '.llms-lesson-preview .llms-icon-free', '.lifter-conent-area .lifter-single-course-post .entry-content .llms-access-plan .llms-access-plan-footer a.button', '.llms-access-plan.featured .llms-access-plan-featured', '.lifter-conent-area .lifter-single-course-post .entry-content .llms-access-plan .llms-access-plan-content .stamp, .lifter-conent-area .lifter-single-course-post .entry-content .llms-access-plan .llms-access-plan-footer .stamp', '.lifter-conent-area .lifter-single-course-post input[type="submit"]',
];
$edumodo_primarycolor__border_left_selector_for_lp = [
    '.lifter-conent-area .llms-meta-info'
];
$edumodo_secondarycolor__color_selector_for_lp = [
    '.lifter-conent-area .lifter-single-course-post .entry-content .llms-syllabus-wrapper .llms-section-title', '.lifter-conent-area .lifter-single-course-post .entry-content .llms-access-plan .llms-access-plan-content .llms-access-plan-title', '.lifter-conent-area .lifer-sidebar-wrapper .widget .widgettitle', 
];
$edumodo_body__color_selector_for_lp = [
    '.lifter-conent-area .lifter-single-course-post .entry-content .llms-meta-title', '.lifter-conent-area .lifter-single-course-post a', '.lifter-conent-area .lifter-single-course-post .entry-content .llms-syllabus-wrapper .llms-lesson-preview .llms-lesson-link .llms-main .llms-lesson-title', '.lifter-conent-area .lifter-single-course-post .entry-content .llms-syllabus-wrapper a', '.lifter-conent-area #old_reviews h3', '.lifter-conent-area .lifer-sidebar-wrapper .widget .section-header', 'lifter-conent-area .lifer-sidebar-wrapper .widget a', '.lifter-conent-area .lifer-sidebar-wrapper .widget a', '.lifter-conent-area .lifer-sidebar-wrapper .widget_display_stats dl dt, .lifter-conent-area .lifer-sidebar-wrapper .widget_display_stats dl dd, .lifter-conent-area .lifer-sidebar-wrapper .widget_display_stats dl strong', '.lifter-conent-area .lifer-sidebar-wrapper .widget_display_search form div .button'
];

?>
<style id="edumodo-lifter-style">
    <?php 

    edumodo_parse_typography_to_selectors($edumodo__lifter_archive_price_typo, edumodo_parse_selector_as_string($edumodo__lifter_archive_price_selector));
    edumodo_parse_typography_to_selectors($edumodo__lifter_archive_title_typo, edumodo_parse_selector_as_string($edumodo__lifter_title_selector));
    edumodo_parse_typography_to_selectors($edumodo__lifter_archive_excerpt_typo, edumodo_parse_selector_as_string($edumodo__lifter_archive_excerpt_selector));
    edumodo_parse_typography_to_selectors($edumodo__lifter_archive_meta_typo, edumodo_parse_selector_as_string($edumodo__lifter_archive_meta_selector));
    /**
     * style
     */
    edumodo_style_property_parser(edumodo_parse_selector_as_string($edumodo_primarycolor__color_selector_for_lp), 'color', $edumodo_primary_color);
    edumodo_style_property_parser(edumodo_parse_selector_as_string($edumodo_primarycolor__background_selector_for_lp), 'background-color', $edumodo_primary_color);
    edumodo_style_property_parser(edumodo_parse_selector_as_string($edumodo_primarycolor__border_left_selector_for_lp), 'border-left-color', $edumodo_primary_color);
    edumodo_style_property_parser(edumodo_parse_selector_as_string($edumodo_secondarycolor__color_selector_for_lp), 'color', $edumodo_secondary_color);
    edumodo_style_property_parser(edumodo_parse_selector_as_string($edumodo_body__color_selector_for_lp), 'color', $body_typo ? $body_typo['color'] : 'inherit');
    
    ?>
    /**
	sync customizer color with lifter
	*/
    /* body typo */
    <?php if( isset( $body_typo['font-family'] ) && ! ($body_typo['font-family'] == 'inherit' )): ?>
        .lifter-conent-area .lifter-single-course-post{
            font-family: <?php echo $body_typo['font-family']; ?>
        }
        .lifter-conent-area .lifter-single-course-post .entry-content .llms-syllabus-wrapper .llms-lesson-preview .llms-lesson-link .llms-main .llms-lesson-title{
            font-family: <?php echo $body_typo['font-family']; ?>
        }
    <?php endif;?>

    <?php 
        # start price
            if( !empty( $edumodo__lifter_archive_price_spacing_bottom ) ): ?>
                .lifter-archive-card .course-price {margin-bottom: <?php echo $edumodo__lifter_archive_price_spacing_bottom; ?> !important;}
            <?php endif;
        # end price 

        # start excerpt
            if( !empty( $edumodo__lifter_archive_excerpt_margin ) ): ?>
                .lifter-archive-card  .course-excerpt {margin: <?php echo $edumodo__lifter_archive_excerpt_margin['top'] . ' 0px '.$edumodo__lifter_archive_excerpt_margin['bottom'].' 0px '; ?> !important;}
            <?php endif;
        # end excerpt

        # start column
            if( !empty( $edumodo__lifter_course_archive_column_gap ) ): ?>
                .course-archieve-loop .llms-loop .llms-loop-list {grid-gap: <?php echo $edumodo__lifter_course_archive_column_gap . 'px' ; ?> !important;}
            <?php endif;
        # end column

        # start content
            if( !empty( $edumodo__lifter_course_archive_card_border_radius ) ): ?>
                .course-archieve-loop .llms-loop .llms-loop-list .llms-loop-item {border-radius: <?php echo $edumodo__lifter_course_archive_card_border_radius.'px'; ?>}
            <?php endif;
            if( !empty( $edumodo__lifter_archive_content_spacing ) ): ?>
                .lifter-archive-card {padding: <?php echo $edumodo__lifter_archive_content_spacing['top'].' ' .$edumodo__lifter_archive_content_spacing['right'].' ' .$edumodo__lifter_archive_content_spacing['bottom'].' ' .$edumodo__lifter_archive_content_spacing['left']; ?> !important;}
            <?php endif;
            if( !empty( $edumodo__lifter_archive_content_background ) ): ?>
                .course-archieve-loop .llms-loop-item-content, .course-archieve-loop .llms-progress-bar, .course-archieve-loop .lifter-archive-card{background: <?php echo $edumodo__lifter_archive_content_background; ?> !important;}
            <?php endif;
            if( !empty( $edumodo__lifter_archive_pregressbar ) ): ?>
                .course-archieve-loop .progress-bar-complete {background: <?php echo $edumodo__lifter_archive_pregressbar; ?> !important;}
            <?php endif;
            
            if( !empty( $edumodo__lifter_archive_content_alignment ) ): ?>
                .lifter-archive-card {text-align: <?php echo $edumodo__lifter_archive_content_alignment; ?>;}
            <?php endif;
        # end content
        ?>
    
</style>
<?php 
// endif;
?>