/**
 * Styles for reusable Aimade Fun template parts
 */

/* Module icon with lock overlay (locked state) */
.mod-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.mod-icon-wrap.mod-icon-locked {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.mod-icon-lock {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

/* Sidebar nav item as link (lesson/topic steps) */
.sidebar .nav-item .nav-item-link {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	padding: 10px 18px;
	margin: -10px -18px;
	text-decoration: none;
	color: inherit;
}

/* Module card as link (course overview) */
.mod-card-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* Topic complete shortcode [aimadefun_topic_complete] */
.aimadefun-topic-complete-wrap {
	margin: 1.25rem 0;
	text-align: center;
}
.aimadefun-topic-complete-wrap .topic-complete-before,
.aimadefun-topic-complete-wrap .topic-complete-after {
	font-size: 1rem;
	font-weight: 700;
	color: var(--text-mid, #484848);
	line-height: 1.5;
	margin-bottom: 0.75rem;
}
.aimadefun-topic-complete-wrap .topic-complete-after {
	margin-top: 0.75rem;
	margin-bottom: 0;
}
.aimadefun-topic-complete-wrap .topic-complete-btn-wrap {
	margin: 0.5rem 0;
}
.complete-btn.aimadefun-topic-complete-btn {
	background: linear-gradient(135deg, var(--brand), var(--teal));
	border: none;
	border-radius: var(--radius-pill, 50px);
	padding: 12px 28px;
	font-size: 1rem;
	font-weight: 800;
	font-family: inherit;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(104, 63, 160, 0.3);
	transition: transform 0.2s, box-shadow 0.2s;
}
.complete-btn.aimadefun-topic-complete-btn:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(104, 63, 160, 0.4);
}
.complete-btn.aimadefun-topic-complete-btn:disabled,
.complete-btn.aimadefun-topic-complete-btn.marked-complete {
	cursor: default;
	opacity: 0.95;
}
.complete-btn.aimadefun-topic-complete-btn:focus {
	outline: 2px solid var(--brand-light);
	outline-offset: 2px;
}

/* Show success block when topic is complete (on load or after mark complete) */
.main-area.topic-is-complete .success,
.activity-card .success.show {
	display: block !important;
}
.marked-complete.complete-btn{
	background: linear-gradient(135deg, rgb(34, 197, 94), rgb(13, 191, 176))!important;
}

/* Next topic link (shown only after topic is complete) */
.aimadefun-next-topic--before {
	margin-bottom: 1.25rem;
	text-align: right;
	padding: 20px!important;
}
.aimadefun-next-topic--after {
	margin-bottom: 0;
	margin-top: -35px !important;
	text-align: center;
	padding:0 20px 20px !important;
}
.aimadefun-next-topic__link {
	display: inline-block;
	font-weight: 700;
	color: var(--brand, #683fa0);
	text-decoration: none;
}
.aimadefun-next-topic__link:hover {
	text-decoration: underline;
}

/* Linear progression: info alert when user opens a lesson/topic without completing the previous step */
.aimadefun-progression-alert {
	padding: 1.25rem 1.5rem;
	border-radius: var(--radius-lg, 8px);
	border: 1px solid transparent;
	background: var(--gold-light);
	border-color: var(--gold);
	color: #0c4a6e;
	max-width: 780px;
    margin: 40px auto;
}
.aimadefun-progression-alert--info {
	background: var(--gold-light);
	border-color: var(--gold);
	color: #0c4a6e;
}
.aimadefun-progression-alert__message {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
}
.aimadefun-progression-alert__message:last-child {
	margin-bottom: 0;
}
.aimadefun-progression-alert__link {
	display: inline-block;
	padding: 0.5rem 1rem;
	background: var(--teal);
	color: #fff;
	border-radius: var(--radius-pill, 50px);
	font-weight: 700;
	text-decoration: none;
	transition: background 0.2s;
}
.aimadefun-progression-alert__link:hover {
	background:var(--brand);
	color: #fff;
}





/* Back to Course / Back to Dashboard — button only */
.aim-back-to-course {
	display: inline-flex;
	flex: 0 0 auto;
	margin: 0;
}

.aim-back-to-course__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.3rem;
	width: fit-content !important;
	max-width: 100%;
	padding: 0.35rem 0.85rem;
	border: none;
	border-radius: 999px;
	background: #fff;
	color: #5d2f91 !important;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	white-space: nowrap;
	box-sizing: border-box;
	box-shadow: 0 1px 6px rgba(45, 20, 80, 0.12);
}

.aim-back-to-course__btn:hover,
.aim-back-to-course__btn:focus {
	background: #f7f2ff;
	color: #5d2f91 !important;
	outline: none;
}

@media (max-width: 900px) and (min-width: 768px) {
	.aim-back-to-course__btn {
		min-height: 1.85rem;
		padding: 0.3rem 0.75rem;
		font-size: 0.72rem;
		gap: 0.25rem;
	}
}

@media (max-width: 860px) and (min-width: 800px) {
	.aim-back-to-course__btn {
		min-height: 1.8rem;
		padding: 0.28rem 0.7rem;
		font-size: 0.7rem;
	}
}

@media (max-width: 600px) {
	.aim-back-to-course__btn {
		min-height: 1.9rem;
		padding: 0.35rem 0.8rem;
		font-size: 0.74rem;
	}
}