.kn-soft-paywall {
	position: relative;
}

.kn-soft-paywall__preview > *:last-child {
	margin-bottom: 0;
}

.kn-soft-paywall__locked {
	position: relative;
	max-height: 560px;
	overflow: hidden;
	margin-top: 28px;
	border-radius: 24px;
}

.kn-soft-paywall__blurred {
	filter: blur(5px);
	user-select: none;
	pointer-events: none;
	transform: scale(1.01);
	transform-origin: top center;
	padding: 8px 12px 120px;
}

.kn-soft-paywall__locked::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 100%;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.2) 0%,
		rgba(255, 255, 255, 0.78) 42%,
		rgba(255, 255, 255, 0.98) 100%
	);
}

.kn-soft-paywall__overlay {
	position: absolute;
	left: 0;
	right: 0;
	top: 120px;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 28px;
	pointer-events: none;
}

.kn-soft-paywall__box {
	width: min(100%, 520px);
	background: #191919;
	border: 1px solid rgba(17, 24, 39, 0.08);
	border-radius: 20px;
	box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
	padding: 32px;
	text-align: center;
	pointer-events: auto;
	user-select: none;
}

.kn-soft-paywall__box h3 {
	margin: 0 0 12px;
	font-size: clamp(1.35rem, 2vw, 1.8rem);
	line-height: 1.2;
	color: #fff !important;
	font-family: 'Inter Tight' !important;
}

.kn-soft-paywall__box p {
	margin: 0 0 22px;
	font-size: 1rem;
	line-height: 1.55;
	color: #fff !important;
	font-family: 'Inter Tight' !important;
}

.kn-soft-paywall__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border-radius: 16px;
	font-family: 'Inter Tight' !important;
	background: #fff;
	color: #191919 !important;
	font-weight: 700;
	text-decoration: none !important;
}

.kn-soft-paywall__button:hover,
.kn-soft-paywall__button:focus {
	color: #191919 !important;
	opacity: 0.92;
}

body.bb-dark-theme .kn-soft-paywall__box,
body.dark-mode .kn-soft-paywall__box {
	background: #111827;
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.12);
}

body.bb-dark-theme .kn-soft-paywall__locked::after,
body.dark-mode .kn-soft-paywall__locked::after {
	background: linear-gradient(
		to bottom,
		rgba(17, 24, 39, 0.2) 0%,
		rgba(17, 24, 39, 0.78) 42%,
		rgba(17, 24, 39, 0.98) 100%
	);
}

body.single-sfwd-lessons .kn-soft-paywall,
body.single-sfwd-topic .kn-soft-paywall {
	width: 100%;
	max-width: 100%;
	clear: both;
}

.kn-soft-paywall__preview p:empty,
.kn-soft-paywall__locked p:empty,
.kn-soft-paywall__preview p:has(> br:only-child),
.kn-soft-paywall__locked p:has(> br:only-child) {
	display: none !important;
}

.kn-soft-paywall-dummy {
	pointer-events: none;
}

.kn-soft-paywall-dummy-card {
	margin: 28px 0;
	padding: 22px;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid rgba(17, 24, 39, 0.08);
}

.kn-soft-paywall-dummy-card-title {
	font-weight: 800;
	margin-bottom: 8px;
}

/* Safety: hide LearnDash completion/nav UI if it somehow still appears inside preview output. */
.kn-soft-paywall ~ .learndash_next_prev_link,
.kn-soft-paywall ~ .ld-course-step-back,
.kn-soft-paywall ~ .ld-content-actions,
.kn-soft-paywall ~ .ld-button,
.kn-soft-paywall ~ .ld-focus-comments {
	display: none !important;
}

.lms-topic-sidebar-wrapper .kn-coming-soon-disabled-link {
	cursor: not-allowed !important;
	opacity: 0.55;
}

.lms-topic-sidebar-wrapper .kn-coming-soon-lock {
	pointer-events: auto !important;
	cursor: default !important;
}

.lms-topic-sidebar-wrapper .kn-coming-soon-disabled-item > .bb-lesson-head,
.lms-topic-sidebar-wrapper .kn-coming-soon-disabled-item > .bb-lms-title-wrap,
.lms-topic-sidebar-wrapper .kn-coming-soon-disabled-item .bb-lms-title-wrap {
	opacity: 0.55;
}

.lms-topic-sidebar-wrapper .kn-coming-soon-lock {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin-left: 8px;
	color: currentColor;
}

.lms-topic-sidebar-wrapper .kn-coming-soon-lock i,
.lms-topic-sidebar-wrapper .kn-coming-soon-lock i:before {
	color: currentColor !important;
}

@media (max-width: 640px) {
	.kn-soft-paywall__locked {
		max-height: 500px;
	}

	.kn-soft-paywall__overlay {
		padding: 18px;
	}

	.kn-soft-paywall__box {
		padding: 24px 20px;
	}
}