/**
 * Module cards and grid.
 *
 * The card rules are the ones written for the Elementor template, moved in
 * here so the plugin ships its own look. Colours still come from the theme
 * globals, so a palette change in Elementor carries through.
 *
 * The bullet list uses .module-point* rather than Elementor's icon list
 * classes, which were only present because the design was built with that
 * widget.
 */

/* Card ------------------------------------------------------------------ */

.module-card {
	border-radius: 32px;
	border: 1px solid color-mix(in srgb, var(--e-global-color-cd032c6) 80%, var(--e-global-color-3dbc0c7));
	background-color: var(--e-global-color-cd032c6);
}

.module-img {
	position: relative;
	overflow: hidden;
	aspect-ratio: 79 / 37;
	border-radius: 33px 33px 0px 0px;
}

.module-img-inner {
	position: absolute;
	inset: 0;
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: scroll;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

.module-card:hover .module-img-inner {
	transform: scale(1.06);
}

.module-content {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 24px 24px 32px 24px;
	gap: 24px;
	align-self: stretch;
}

.module-content-inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.module-content .subtitle {
	color: var(--e-global-color-primary);
	text-align: left;
	padding: 4px 8px;
	border-radius: 6px;
	background: color-mix(in srgb, var(--e-global-color-primary) 5%, transparent);
}

.module-sub-content {
	display: flex;
	flex-direction: column;
	gap: 16px;
	border-radius: 8px;
	border: 1px solid color-mix(in srgb, var(--e-global-color-cd032c6) 80%, var(--e-global-color-3dbc0c7));
	padding: 16px 24px;
}

.module-sub-content h6 {
	color: var(--e-global-color-primary);
}

/* The shapes are targeted as well as the root: an exported icon usually
   carries its own fill attribute, which beats an inherited fill. */
.module-card .module-point-icon svg,
.module-card .module-point-icon svg *,
.module-card .module-point-icon img {
	fill: var(--e-global-color-primary);
	background-color: color-mix(in srgb, var(--e-global-color-primary) 10%, transparent);
	padding: 6px;
	border-radius: 50%;
}

.module-content h5 {
	margin: 0px;
}

.module-content p {
	margin: 0px;
}

@media (max-width: 1024px) {
	.module-card {
		border-radius: 24px;
	}
	.module-img {
		aspect-ratio: 4 / 3;
		border-radius: 25px 25px 0px 0px;
	}
	.module-btns .custom-btn-3, .module-btns .custom-btn-3-lite, .elementor-button {
		width: 100%;
	}
}

@media (max-width: 767px) {
	.module-content {
		padding: 24px 16px 24px 16px;
	}
	.module-btns .custom-btn-3, .module-btns .custom-btn-3-lite, .elementor-button {
		width: 100%;
	}
}

/* Bullet list ----------------------------------------------------------- */

.module-points {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

.module-point {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
}

.module-point-icon {
	display: inline-flex;
	flex: 0 0 auto;
	margin-top: 3px;
}

.module-point-icon svg, .module-point-icon img {
	width: 11px;
	height: 11px;
	display: block;
	box-sizing: content-box;
}

/* Grid ------------------------------------------------------------------ */

.module-grid {
	display: grid;
	grid-template-columns: repeat(var(--module-cols, 2), minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
}

@media (max-width: 1024px) {
	.module-grid {
		gap: 18px;
	}
}

@media (max-width: 767px) {
	.module-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}
}

/* Card scaffolding the Elementor container used to provide -------------- */

.module-grid .module-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.module-grid .module-content {
	flex: 1 1 auto;
}

/* .module-content-inner aligns children to flex-start, which sizes each one
   to its own text. Elementor's containers and widgets were full width, so
   the panel and the copy spanned the card. Plain divs need that said. */
.module-content-inner > h5,
.module-content-inner > p,
.module-content-inner > .module-sub-content {
	align-self: stretch;
}

/* The panel carries padding, so it has to measure itself border-box or it
   overflows the card on themes without a global reset. */
.module-sub-content {
	box-sizing: border-box;
}

/* The original stylesheet zeroes h5 and p but not the panel heading, which
   was a separate Elementor widget with its own reset. */
.module-sub-content > h6 {
	margin: 0;
}

.module-btns {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	width: 100%;
}

/* Buttons size to their own text and sit side by side, wrapping only when
   the card gets too narrow. Their look comes from the site's own
   custom-btn-3 rules. */
.module-btns > div {
	flex: 0 0 auto;
}

/* Locked button --------------------------------------------------------- */

.module-btn-locked {
	cursor: not-allowed;
}
.module-btn-locked .elementor-button {
	opacity: 0.5;
	pointer-events: none;
}
.module-btn-locked .elementor-button svg {
	margin-left: 8px;
	vertical-align: middle;
	fill: currentColor;
}

/* Completed and Not Completed ------------------------------------------- */

.module-status {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 1;
	display: flex;
	padding: 8px 16px;
	justify-content: center;
	align-items: center;
	gap: 8px;
	border-radius: 500px;
	background: var(--e-global-color-cd032c6);
}
.module-status .module-status-text {
	color: var(--e-global-color-f11010d);
}
