/* function */
.sfwd-courses-template-default .content-container {
	max-width: var(--global-content-width) !important;

	.learndash_post_sfwd-courses>.learndash-wrapper>div:not(:last-child) {
		max-width: var(--global-content-narrow-width);
		margin-inline: auto;
	}

	.learndash_post_sfwd-courses>.learndash-wrapper>div:last-child {
		margin-top: 5rem;
	}
}

:is(#important, .learndash-wrapper) .ld-item-list {

	/*Removes the program content heading*/
	.ld-section-heading {
		display: none;
	}

	.ld-item-list-section-heading {
		margin-top: 2rem;
		border-bottom: 1px solid var(--brand-c-primary, #30dba6);
	}

	.ld-item-list-items {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
		gap: 1rem;
	}

	.ld-item-list-section-heading {
		grid-column: 1 / -1;
		color: var(--brand-c-secondary, #1c4c8a);
	}

	.ld-item-list-item {
		margin-block: 0;
	}

	.ld-item-list-item-preview.ld-item-list-item-preview {
		flex-direction: column;
		align-items: start;
		height: 100%;
	}

	.ld-item-category {
		margin-bottom: 0.5rem;
	}

	.ld-item-category-item {
		display: flex;
		font-weight: 500;
		align-items: center;
		gap: 0.5rem;
		font-size: 0.75rem;
		text-transform: uppercase;
		background: #cbd5e055;
		padding: 0.125rem 0.5rem 0.125rem 0.125rem;
		border-radius: 0.25rem;

		color: var(--brand-c-secondary, #237590);

		.ld-item-category-item-icon {
			fill: var(--brand-c-secondary, #237590);
			border-radius: 0.25rem;
			display: inline-flex;
			width: 1.5rem;
			height: 1.5rem;
			padding: 0.25rem;
			background: #cbd5e077;

			svg {
				height: auto;
				fill: currentColor;

				path {
					fill: currentColor;
				}
			}
		}
	}

	.ld-item-name {
		max-height: fit-content;
		margin-bottom: 0.25em;
		gap: 0.5rem;
		align-items: start;

		.ld-status-icon {
			margin: 0;
		}

		.ld-status-icon.ld-status-complete {
			background-color: #cbd5e033 !important;
			font-size: 0.8rem;
			color: #30dba6;
		}

		.ld-item-title {
			margin-top: 0.16em;
		}
	}

	.ld-item-title {
		line-height: 1.2;
		font-family: "Space Grotesk", sans-serif;
	}

	.ld-item-details {
		flex-direction: column;
		align-items: start;
		flex: 1;
		height: 100%;

		p:empty {
			display: block !important;
		}

		@media (max-width: 640px) {
			margin-inline: 0;
		}

		p {
			font-size: 0.8rem;
			flex: 1;
		}

		.button {
			padding: 0.5rem 1rem;
			background: #cbd5e077;
			font-size: 1rem;

			&:hover {
				background: var(--brand-c-primary, #30dba6);
				color: inherit;
			}
		}
	}

	/* RESOURCES ONLY */
	&.ld-course-content-1273 {
		.ld-status-icon {
			display: none;
		}
	}
}

/*helpers*/
.grotesk {
	font-family: "Space Grotesk", sans-serif;
}

.ld-course-list-items .ld_course_grid .thumbnail.course a.btn-primary {
	background: var(--brand-c-secondary);

	&:hover {
		background: var(--brand-c-secondary-shade-1);
	}
}

:is(#override, .ribbon) {
	background: var(--brand-c-secondary);

	&:before {
		border-top-color: var(--brand-c-secondary-shade-1);
		border-right-color: var(--brand-c-secondary-shade-1);
	}
}

:is(#override, .ribbon.enrolled) {
	background: var(--brand-c-secondary);

	&:before {
		border-top-color: var(--brand-c-secondary-shade-1);
		border-right-color: var(--brand-c-secondary-shade-1);
	}
}

@media(max-width:767px) {
	:is(#override, .ld-course-list-items.row) {
		justify-content: center;
	}
}

:is(#override, .ld_course_grid)>article {
	height: 100%;
	display: flex;
	flex-direction: column;
}

:is(#override, .ld_course_grid) .caption {
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: space-between;
}

:is(#override, .single-sfwd-courses, .aim-template) .ld-course-status {
	display: none;
}

:is(#override, .entry.single-entry) {
	box-shadow: none;
}

/* Removes the Mark as Viewed Button */
:is(#override, .type-sfwd-lessons, .aim-template) .sfwd-mark-complete {
	display: none;
}

/* rearrange the buttons */
:is(#override, .type-sfwd-lessons, .aim-template) .ld-content-actions {

	@media(max-width:638px) {
		flex-direction: row;
		flex-wrap: wrap;

		.ld-content-action {
			order: unset;
			padding: 10px;
		}

		.ld-content-action:has(.sfwd-mark-complete) {
			order: 2;
			/*ensures last*/
			min-width: 100%;
			width: 100%;
		}

		.ld-empty {
			display: none;
		}
	}

}

:is(#override, .type-sfwd-lessons, .aim-template) .ld-status-progress {
	display: none;
}

:is(#override, .type-sfwd-lessons, .aim-template) .learndash-shortcode-wrap {
	margin-bottom: 0;
}

:is(#override, .type-sfwd-lessons, .aim-template) .learndash-shortcode-wrap+.ld-tabs {
	margin-top: 0;
}

:is(#override, .type-sfwd-lessons, .aim-template) .learndash-shortcode-wrap .ld-breadcrumbs {
	padding-inline: 0;
}

p:empty {
	display: none;
}

/* LOGIN PAGES */
.elementor-element:has(> .elementor-widget-container .elementor-shortcode > .uo_loginForm) {
	min-width: 100%;
	padding: 0 10%;
}

/* Navigation & Main Header*/
@media(max-width:767px) {
	.kadence-sticky-header .brand.has-logo-image img {
		padding-block: 6px;
	}
}

/* BUTTONS */
.button.button-style-gradient--primary {
	background-color: var(--brand-c-primary);
	text-shadow: 0px 3px 4px rgba(0, 0, 0, 0.14);
	color: white;
	background-image: radial-gradient(at top left, var(--brand-c-primary) 0%, var(--brand-c-transition-green) 100%);
	transition-duration: 0.2s;
	padding: 24px 47px 24px 47px;
}

.button.button-style-gradient--primary:hover {
	background-color: transparent;
	background-image: radial-gradient(at top left, var(--brand-c-primary) 0%, var(--brand-c-transition-green) 83%);
}

.wrap-on-mobile {
	@media(max-width:767px) {
		display: flex;
		flex-direction: column;
		align-items: center;
	}
}
