.sp-product {
	max-width: 40rem;
	margin: 1.5rem 0;
}

.sp-product:has(.sp-product__plans) {
	max-width: 44rem;
}

.sp-product--compact {
	max-width: 28rem;
	margin: 1rem 0;
}

.sp-product--compact .sp-product__title {
	margin: 0.35rem 0 0.35rem;
	font-size: 1.15em;
}

.sp-product--compact .sp-product__description {
	font-size: 0.95em;
}

.sp-product__image img {
	max-width: 100%;
	height: auto;
}

.sp-product__title {
	margin: 0.75rem 0 0.5rem;
}

.sp-product__price {
	font-weight: 600;
}

.sp-product__plans {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin: 1.25rem 0 0;
	align-items: stretch;
}

.sp-product__plan {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	padding: 1.15rem 1.2rem;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	background: #fff;
	box-sizing: border-box;
	min-width: 0;
	height: 100%;
}

.sp-product__plan-eyebrow {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #50575e;
}

.sp-product__plan-price {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.2;
}

.sp-product__plan-desc {
	margin: 0;
	flex: 1 1 auto;
	font-size: 0.95rem;
	line-height: 1.45;
	color: #50575e;
	/* Keep room for ~2 lines so short/long copy still balance. */
	min-height: 2.9em;
}

.sp-product__plan-footer {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: auto;
}

.sp-product__plan .sp-product__actions {
	margin: 0;
}

.sp-product__plan .sp-product__button {
	width: 100%;
}

.sp-product__plan-link {
	margin: 0;
	min-height: 1.4em;
	font-size: 0.95rem;
	line-height: 1.4;
}

.sp-product__plan-link a {
	text-decoration: underline;
}

.wpdude-dd-subscriber-manage__library {
	margin: 0.75rem 0 0;
	font-size: 0.95rem;
	line-height: 1.4;
}

.wpdude-dd-subscriber-manage__library a {
	text-decoration: underline;
}

@media (max-width: 560px) {
	.sp-product__plans {
		grid-template-columns: 1fr;
	}
}

.sp-product__button {
	cursor: pointer;
}

.sp-product__button:disabled {
	opacity: 0.6;
	cursor: wait;
}

.sp-product--custom-style {
	background: var(--wpdude-dd-box-bg, transparent);
	padding: 1.25rem 1.5rem;
	border-radius: 4px;
	box-sizing: border-box;
}

.sp-product--custom-style .sp-product__icon {
	margin: 0 0 0.75rem;
	line-height: 1;
}

.sp-product--custom-style .sp-product__icon .dashicons {
	width: 1.75rem;
	height: 1.75rem;
	font-size: 1.75rem;
	color: var(--wpdude-dd-title-color, inherit);
}

.sp-product--custom-style .sp-product__title {
	color: var(--wpdude-dd-title-color, inherit);
	font-family: var(--wpdude-dd-title-font, inherit);
}

.sp-product--custom-style .sp-product__description,
.sp-product--custom-style .sp-product__price,
.sp-product--custom-style .sp-product__plan-eyebrow,
.sp-product--custom-style .sp-product__plan-price,
.sp-product--custom-style .sp-product__plan-desc,
.sp-product--custom-style .sp-product__field,
.sp-product--custom-style .sp-product__field label,
.sp-product--custom-style .sp-product__message {
	color: var(--wpdude-dd-body-color, inherit);
	font-family: var(--wpdude-dd-body-font, inherit);
}

.sp-product--custom-style .sp-product__plan {
	background: rgba(0, 0, 0, 0.03);
	border-color: rgba(0, 0, 0, 0.12);
}

.sp-product--custom-style .sp-product__plan-eyebrow,
.sp-product--custom-style .sp-product__plan-price {
	color: var(--wpdude-dd-title-color, inherit);
	font-family: var(--wpdude-dd-title-font, inherit);
}

.sp-product--custom-style .sp-product__button {
	background: var(--wpdude-dd-button-bg, #2271b1);
	color: var(--wpdude-dd-button-color, #fff);
	font-family: var(--wpdude-dd-button-font, inherit);
	border: none;
	border-radius: var(--wpdude-dd-button-radius, 4px);
	padding: 0.6em 1.2em;
}

.sp-product--custom-style .sp-product__button:hover,
.sp-product--custom-style .sp-product__button:focus {
	filter: brightness(0.95);
}

.sp-product__message {
	margin-top: 0.75rem;
}

.sp-product__message.is-error {
	color: #b32d2e;
}

.sp-product__free-form {
	margin: 1rem 0 0;
	max-width: 24rem;
}

.sp-product__field {
	margin: 0 0 0.75rem;
}

.sp-product__field label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}

.sp-product__field input {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.sp-optional {
	font-weight: 400;
	opacity: 0.75;
}

.sp-product__hp {
	position: absolute;
	left: -9999px;
	height: 0;
	width: 0;
	overflow: hidden;
}

.sp-product__download {
	margin: 1rem 0 0;
}

.sp-product__download-button {
	display: inline-block;
	cursor: pointer;
}

.sp-product__tip-form {
	margin: 1rem 0 0;
	max-width: 28rem;
}

.sp-product__tip-amounts {
	border: 0;
	margin: 0 0 0.75rem;
	padding: 0;
}

.sp-product__tip-amounts legend {
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.sp-product__tip-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.sp-product__tip-options.is-disabled .sp-product__tip-option:not(.sp-product__tip-option--custom) {
	opacity: 0.55;
}

.sp-product__tip-option {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.4rem 0.75rem;
	border: 1px solid #c3c4c7;
	cursor: pointer;
}

.sp-product__tip-option:has(input:checked) {
	border-color: #2271b1;
	background: #f0f6fc;
}

.sp-product__tip-option--custom:has(input:checked) {
	border-color: #2271b1;
	background: #f0f6fc;
}

.sp-product__tip-option input {
	margin: 0;
}

.sp-product__tip-custom-field {
	margin-top: 0.5rem;
}

.sp-product__field textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.sp-return {
	padding: 1rem 1.25rem;
	margin: 1rem 0 1.5rem;
	border-left: 4px solid #2271b1;
	background: #f0f6fc;
}

.sp-return--success {
	border-left-color: var(--wpdude-dd-return-border, #00a32a);
	background: var(--wpdude-dd-return-bg, #edfaef);
}

.sp-product--post-purchase .sp-product__actions,
.sp-product--post-purchase .sp-product__price,
.sp-product--post-purchase .sp-product__plans,
.sp-product--post-purchase .sp-product__free-form,
.sp-product--post-purchase .sp-product__tip-form,
.sp-product--post-purchase .sp-product__message {
	display: none !important;
}

.sp-return__actions {
	margin: 0.75rem 0 0;
}

.sp-return__confirm-message {
	margin-top: 0.5rem;
}

.sp-return__local {
	margin: 0.75rem 0 0;
}

.sp-return__download {
	margin: 1rem 0 0;
}

.sp-return__download-button {
	display: inline-block;
	cursor: pointer;
}

.wpdude-dd-download-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	text-decoration: none;
}

.wpdude-dd-download-link .wpdude-dd-download-icon,
.wpdude-dd-download-link .wpdude-dd-fa-icon {
	display: inline-block;
	flex-shrink: 0;
	width: 1em;
	height: 1em;
	vertical-align: -0.125em;
}

.wpdude-dd-sub-library {
	max-width: 56rem;
	margin: 1.5rem 0;
}

.wpdude-dd-sub-library__header {
	margin-bottom: 1.25rem;
}

.wpdude-dd-sub-library__title {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
	line-height: 1.25;
}

.wpdude-dd-sub-library__intro,
.wpdude-dd-sub-library__meta {
	margin: 0.35rem 0 0;
	color: #50575e;
}

.wpdude-dd-sub-library__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wpdude-dd-sub-library__card {
	display: flex;
	flex-direction: column;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	background: #fff;
	overflow: hidden;
	min-width: 0;
}

.wpdude-dd-sub-library__image img {
	display: block;
	width: 100%;
	height: auto;
}

.wpdude-dd-sub-library__body {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	padding: 0.9rem 1rem 1rem;
	flex: 1 1 auto;
}

.wpdude-dd-sub-library__card-title {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.3;
}

.wpdude-dd-sub-library__card-desc,
.wpdude-dd-sub-library__card-price,
.wpdude-dd-sub-library__card-status {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.4;
	color: #50575e;
}

.wpdude-dd-sub-library__card-actions {
	margin: 0.35rem 0 0;
}

.wpdude-dd-sub-library__card-actions .sp-product__button {
	width: 100%;
}

.wpdude-dd-sub-library__cta {
	margin-top: 1.5rem;
	text-align: center;
}

.wpdude-dd-sub-library__cta .sp-product__button {
	min-width: min(100%, 18rem);
}

.wpdude-dd-sub-library__cancel-note {
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
	color: #50575e;
}

.wpdude-dd-sub-library__message {
	margin-top: 0.75rem;
}

.wpdude-dd-sub-library__message.is-error {
	color: #b32d2e;
}

.wpdude-dd-sub-library__pagination {
	margin: 1.25rem 0 0;
}

.wpdude-dd-sub-library__pagination .page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wpdude-dd-sub-library__pagination a,
.wpdude-dd-sub-library__pagination span {
	display: inline-block;
	padding: 0.25rem 0.55rem;
	border: 1px solid #c3c4c7;
	text-decoration: none;
}

.wpdude-dd-sub-library__pagination .current {
	font-weight: 700;
	border-color: #2271b1;
}

.wpdude-dd-sub-library--admin-notice {
	padding: 0.75rem 1rem;
	border-left: 4px solid #dba617;
	background: #fcf9e8;
}

.sp-product--custom-style .wpdude-dd-sub-library__card {
	background: rgba(0, 0, 0, 0.03);
	border-color: rgba(0, 0, 0, 0.12);
}

@media (max-width: 560px) {
	.wpdude-dd-sub-library__cta .sp-product__button {
		width: 100%;
	}
}
