
/* === Ensure Divi Builder Layouts look right === */

/* Set the standard learndash components to the standard Divi content width */
.et_pb_pagebuilder_layout.et_full_width_page #learndash_course_status, .et_pb_pagebuilder_layout.et_full_width_page #learndash_course_content {
	width: 80%;
	max-width: 1080px;
	margin: 10px auto;
}

/* Convert span tag items (course status, etc) into block elements so width obeyed */
.et_pb_pagebuilder_layout.et_full_width_page .entry-content > .learndash > span {
	display: block;
}

.et_pb_pagebuilder_layout.et_full_width_page .entry-content > .learndash > br {
	display: none;
}

/* Make the Divi Builder content full-width */
.et_pb_pagebuilder_layout.et_full_width_page .entry-content > .learndash > .learndash_content {
	width: 100%;
	max-width: 100%;
}

/* Set row width on sidebar layouts to match page builder on posts format */
.et_pb_pagebuilder_layout.et_right_sidebar .entry-content > .learndash .et_pb_row, .et_pb_pagebuilder_layout.et_left_sidebar .entry-content > .learndash .et_pb_row, .et_pb_pagebuilder_layout.et_right_sidebar .sfwd-certificates .et_pb_row, .et_pb_pagebuilder_layout.et_left_sidebar .sfwd-certificates .et_pb_row {
	width: 100%;
}

.et_pb_pagebuilder_layout.et_right_sidebar .entry-content > .learndash .et_pb_with_background .et_pb_row, .et_pb_pagebuilder_layout.et_left_sidebar .entry-content > .learndash .et_pb_with_background .et_pb_row, .et_pb_pagebuilder_layout.et_right_sidebar .sfwd-certificates .et_pb_with_background .et_pb_row, .et_pb_pagebuilder_layout.et_left_sidebar .sfwd-certificates .et_pb_with_background .et_pb_row {
	width: 80%;
}

/* Hide post title if necessary */
.dlk_hide_post_title .et_post_meta_wrapper:first-of-type {
	display: none;
}

/* === Improve look of LearnDash shortcode output in Divi ==== */

/* Padding after titles */
.et_pb_ld_course_list h3, .et_pb_ld_lesson_list h3, .et_pb_ld_profile h3, .et_pb_ld_topic_list h3, .et_pb_ld_quiz_list h3, .et_pb_ld_course_progress h3, .et_pb_ld_course_info h3, .et_pb_ld_user_course_points h3, .et_pb_ld_user_groups h3, .et_pb_ld_video h3, .et_pb_ld_payment_buttons h3, .et_pb_ld_course_expire_status h3, .et_pb_ld_course_content h3 {
	padding-bottom: 20px;
}

/* et_pb_ld_course_list */
.et_pb_ld_course_list #ld_course_categorydropdown, .et_pb_ld_lesson_list #ld_lesson_categorydropdown, .et_pb_ld_quiz_list #ld_quiz_categorydropdown, .et_pb_ld_topic_list #ld_topic_categorydropdown {
	padding-bottom: 20px;
}

.et_pb_ld_course_list .row .ld-entry-content > img.attachment-post-thumbnail {
	margin-left: 0;
	margin-right: 0;
	margin-bottom: 20px;
}

.et_pb_ld_course_list .row {
	margin-bottom: 40px;
}

/* et_pb_ld_course_info */
.et_pb_ld_course_info h2.ld-entry-title {
	font-size: inherit;
}

/* et_pb_ld_course_content */
.et_pb_ld_course_content #learndash_course_content_title {
	display: none !important;
}

/* et_pb_ld_payment_buttons */
.et_pb_ld_payment_buttons .learndash_checkout_buttons {
	display: inline-block;
}

.et_pb_ld_payment_buttons .ld-text a {
	display: inline-block;
	margin-left: 5px;
	text-decoration: underline;
	font-weight: bold;
}

/* === Overwrite unwanted theme styles when using Divi Builder plugin */
#et_builder_outer_content .et_pb_ld_module a {
	border-bottom: 0 !important;
}

/* === CSS for classes added by module options === */

/* et_pb_ld_course_list - put content on new line */
.et_pb_ld_course_list.dlk_content_on_newline .row .ld-entry-content > img.attachment-post-thumbnail + * {
	clear: both;
}

/* Module icons - visual builder */
.et-fb-modules-list li.et_fb_ld_course_list:before, .et-fb-modules-list li.et_fb_ld_lesson_list:before, .et-fb-modules-list li.et_fb_ld_profile:before, .et-fb-modules-list li.et_fb_ld_topic_list:before, .et-fb-modules-list li.et_fb_ld_quiz_list:before, .et-fb-modules-list li.et_fb_ld_course_progress:before, .et-fb-modules-list li.et_fb_ld_course_info:before, .et-fb-modules-list li.et_fb_ld_user_course_points:before, .et-fb-modules-list li.et_fb_ld_user_groups:before, .et-fb-modules-list li.et_fb_ld_video:before, .et-fb-modules-list li.et_fb_ld_payment_buttons:before, .et-fb-modules-list li.et_fb_ld_course_expire_status:before, .et-fb-modules-list li.et_fb_ld_course_content:before, .et-fb-modules-list li.et_fb_ld_course_status:before, .et-fb-modules-list li.et_fb_learndash_modules:before {
	content: "h" !important;
	transform: rotate(-90deg);
	clip-path: polygon(41% 0, 45% 0, 56% 100%, 41% 99%);
}

/* === Fix Divi header overlapping standard LearnDash login modal === */
div.learndash-wrapper div.ld-login-modal {
	z-index: 100000;
}

/* === Modify LD tabs margins so doesn't introduce gaps in Divi pages  === */
.et-db .learndash-wrapper .ld-tabs {
	margin-top: 0;
	margin-bottom: 0;
}

.et-db .learndash-wrapper .ld-tabs .ld-tabs-navigation {
	margin-top: 1em;
}

.et-db .learndash-wrapper .ld-tabs .ld-tabs-content .ld-tab-content {
	padding-top: 0;
	padding-bottom: 0;
}
