.kdc-cpm-root,
.kdc-cpm-root *,
.kdc-cpm-root *::before,
.kdc-cpm-root *::after {
	box-sizing: border-box;
}

.kdc-cpm-root[hidden] {
	display: none !important;
}

.kdc-cpm-root {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: grid;
	place-items: center;
	padding: 16px;
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.45;
	color: #15213a;
	isolation: isolate;
}

.kdc-cpm-overlay {
	position: absolute;
	inset: 0;
	background: rgba(19, 29, 52, 0.34);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 180ms ease;
}

.kdc-cpm-dialog {
	position: relative;
	z-index: 1;
	width: min(416px, calc(100vw - 24px));
	max-height: calc(100vh - 24px);
	overflow-x: hidden;
	overflow-y: auto;
	padding: 26px 42px 18px;
	background:
		radial-gradient(circle at 50% 25%, rgba(255, 247, 235, 0.68) 0, rgba(255, 255, 255, 0) 36%),
		#ffffff;
	border: 1px solid rgba(225, 229, 238, 0.9);
	border-radius: 12px;
	box-shadow: 0 24px 70px rgba(22, 33, 57, 0.24), 0 4px 14px rgba(22, 33, 57, 0.08);
	text-align: center;
	transform: translateY(12px) scale(0.985);
	opacity: 0;
	transition: transform 180ms ease, opacity 180ms ease;
	-webkit-font-smoothing: antialiased;
}

.kdc-cpm-root.is-open .kdc-cpm-overlay {
	opacity: 1;
}

.kdc-cpm-root.is-open .kdc-cpm-dialog {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.kdc-cpm-close {
	all: unset;
	position: absolute;
	top: 16px;
	right: 16px;
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	color: #4a566e;
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.kdc-cpm-close:hover {
	background: #f2f4f8;
	color: #18243c;
}

.kdc-cpm-close:focus-visible {
	outline: 3px solid rgba(73, 98, 214, 0.28);
	outline-offset: 2px;
}

.kdc-cpm-close:active {
	transform: scale(0.94);
}

.kdc-cpm-close svg {
	display: block;
	width: 23px;
	height: 23px;
	fill: currentColor;
}

.kdc-cpm-art {
	width: 176px;
	height: 154px;
	margin: -4px auto 6px;
	display: grid;
	place-items: center;
}

.kdc-cpm-art img {
	display: block;
	width: 176px;
	height: 154px;
	max-width: none;
	object-fit: contain;
}

.kdc-cpm-heading,
.kdc-cpm-subheading,
.kdc-cpm-description,
.kdc-cpm-note,
.kdc-cpm-status {
	margin: 0;
	padding: 0;
	border: 0;
	font: inherit;
}

.kdc-cpm-heading {
	font-size: 31px;
	font-weight: 760;
	letter-spacing: -0.9px;
	line-height: 1.12;
	color: #142039;
}

.kdc-cpm-subheading {
	margin-top: 8px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.28;
	color: #f2a64b;
}

.kdc-cpm-description {
	max-width: 315px;
	margin: 8px auto 0;
	font-size: 14.5px;
	font-weight: 450;
	line-height: 1.42;
	color: #5d6880;
}

.kdc-cpm-offer {
	width: 100%;
	min-height: 67px;
	margin-top: 14px;
	padding: 10px 16px;
	display: grid;
	grid-template-columns: minmax(112px, 1fr) 1px minmax(125px, 1.18fr);
	align-items: center;
	gap: 16px;
	border: 1px solid #f2d1a7;
	border-radius: 8px;
	background: linear-gradient(180deg, rgba(255, 253, 250, 0.95), rgba(255, 250, 245, 0.72));
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
	text-align: left;
}

.kdc-cpm-price-wrap {
	display: flex;
	align-items: baseline;
	justify-content: flex-start;
	gap: 5px;
	white-space: nowrap;
}

.kdc-cpm-price {
	font-size: 30px;
	font-weight: 780;
	line-height: 1;
	letter-spacing: -0.6px;
	color: #142039;
}

.kdc-cpm-price .woocommerce-Price-amount,
.kdc-cpm-price .amount,
.kdc-cpm-price bdi {
	font: inherit;
	color: inherit;
}

.kdc-cpm-price del {
	display: none;
}

.kdc-cpm-price ins {
	text-decoration: none;
}

.kdc-cpm-currency {
	font-size: 12px;
	font-weight: 550;
	line-height: 1;
	color: #68738a;
}

.kdc-cpm-offer-divider {
	width: 1px;
	height: 38px;
	background: #d9dce4;
}

.kdc-cpm-plan {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	line-height: 1.25;
}

.kdc-cpm-plan strong,
.kdc-cpm-plan span {
	display: block;
	margin: 0;
	padding: 0;
	font-family: inherit;
}

.kdc-cpm-plan strong {
	font-size: 15.5px;
	font-weight: 750;
	color: #1f2a42;
}

.kdc-cpm-plan span {
	font-size: 13.5px;
	font-weight: 450;
	color: #657087;
}

.kdc-cpm-rule {
	width: 100%;
	margin: 8px 0 2px;
	display: grid;
	grid-template-columns: 1fr 34px 1fr;
	align-items: center;
	gap: 10px;
}

.kdc-cpm-rule span {
	height: 1px;
	background: #dfe3ec;
}

.kdc-cpm-rule img {
	display: block;
	width: 34px;
	height: 34px;
}

.kdc-cpm-note {
	margin: 0 auto 6px;
	font-size: 12.5px;
	line-height: 1.35;
	color: #68738a;
}

.kdc-cpm-note[hidden] {
	display: none !important;
}

.kdc-cpm-status {
	min-height: 17px;
	margin: 0 2px 5px;
	font-size: 12px;
	line-height: 1.35;
	color: #667188;
}

.kdc-cpm-status.is-error {
	color: #b42318;
}

.kdc-cpm-status.is-loading {
	color: #56637b;
}

.kdc-cpm-status.is-success {
	color: #147a4b;
}

.kdc-cpm-buy {
	all: unset;
	position: relative;
	width: 100%;
	height: 53px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 13px;
	border-radius: 10px;
	background: linear-gradient(180deg, #5268dd 0%, #3450bd 100%);
	box-shadow: 0 8px 16px rgba(52, 80, 189, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.19);
	color: #ffffff;
	font-size: 18px;
	font-weight: 650;
	line-height: 1;
	cursor: pointer;
	user-select: none;
	transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.kdc-cpm-buy:hover:not(:disabled) {
	filter: brightness(1.045);
	box-shadow: 0 10px 20px rgba(52, 80, 189, 0.29), inset 0 1px 0 rgba(255, 255, 255, 0.2);
	transform: translateY(-1px);
}

.kdc-cpm-buy:active:not(:disabled) {
	transform: translateY(0);
}

.kdc-cpm-buy:focus-visible {
	outline: 3px solid rgba(73, 98, 214, 0.3);
	outline-offset: 3px;
}

.kdc-cpm-buy:disabled {
	cursor: not-allowed;
	opacity: 0.72;
}

.kdc-cpm-buy-icon {
	display: grid;
	place-items: center;
	width: 25px;
	height: 25px;
}

.kdc-cpm-buy-icon svg {
	display: block;
	width: 25px;
	height: 25px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.55;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.kdc-cpm-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: kdc-cpm-spin 700ms linear infinite;
}

.kdc-cpm-buy.is-loading .kdc-cpm-buy-icon {
	display: none;
}

.kdc-cpm-buy.is-loading .kdc-cpm-spinner {
	display: block;
}

.kdc-cpm-test-button {
	appearance: none;
	border: 0;
	border-radius: 8px;
	padding: 11px 18px;
	background: #4057c7;
	color: #ffffff;
	font: 600 15px/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	cursor: pointer;
}

.kdc-cpm-test-button:hover {
	background: #354bb6;
}

@keyframes kdc-cpm-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
	.kdc-cpm-root {
		padding: 8px;
	}

	.kdc-cpm-dialog {
		width: min(100%, 410px);
		max-height: calc(100vh - 16px);
		padding: 22px 32px 16px;
		border-radius: 11px;
	}

	.kdc-cpm-close {
		top: 12px;
		right: 12px;
	}

	.kdc-cpm-art {
		width: 154px;
		height: 136px;
		margin-top: -2px;
		margin-bottom: 4px;
	}

	.kdc-cpm-art img {
		width: 154px;
		height: 136px;
	}

	.kdc-cpm-heading {
		font-size: clamp(25px, 7.4vw, 29px);
	}

	.kdc-cpm-subheading {
		font-size: 15px;
	}

	.kdc-cpm-description {
		font-size: 13.5px;
	}

	.kdc-cpm-offer {
		grid-template-columns: minmax(98px, 1fr) 1px minmax(112px, 1.12fr);
		gap: 12px;
		padding: 10px 13px;
	}

	.kdc-cpm-price {
		font-size: clamp(25px, 8vw, 29px);
	}

	.kdc-cpm-plan strong {
		font-size: 14.5px;
	}

	.kdc-cpm-plan span {
		font-size: 12.5px;
	}
}

@media (max-width: 350px) {
	.kdc-cpm-dialog {
		padding-left: 20px;
		padding-right: 20px;
	}

	.kdc-cpm-offer {
		gap: 9px;
		padding-left: 10px;
		padding-right: 10px;
	}

	.kdc-cpm-price {
		font-size: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kdc-cpm-overlay,
	.kdc-cpm-dialog,
	.kdc-cpm-close,
	.kdc-cpm-buy {
		transition: none !important;
	}

	.kdc-cpm-spinner {
		animation-duration: 1.4s;
	}
}

/* Universal legacy replacement: only applied after a configured limit phrase or
   kdc_credit_required response is detected. */
.kdc-cpm-suppressed-by-manager {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}
