/**
 * DTC dynamic pricing cards.
 *
 * Design tokens lifted from the original hand-built Elementor cards on page
 * 1296, so the dynamic version matches: 8px radius, 35px padding, 40px grid
 * gap, Poppins, the two-layer card shadow, and the purple hover glow.
 *
 * Deliberately keyed to stable class names rather than Elementor's per-element
 * IDs (.elementor-element-6a6413e etc.), so editing the page cannot break it
 * and the card count is not fixed at six.
 */

/**
 * Own the box model inside the component.
 *
 * This is load-bearing, not tidiness: hello-elementor does not set a global
 * border-box, so the cards inherited content-box. With 35px padding that made
 * each card's real minimum 260 + 70 = 330px, three of them plus two 40px gaps
 * overflowed a 1050px row, and the third card wrapped to its own line at full
 * width. Removing this brings that bug straight back.
 */
.dtc-pricing,
.dtc-pricing *,
.dtc-pricing *::before,
.dtc-pricing *::after {
	box-sizing: border-box;
}

.dtc-pricing {
	--dtc-accent: #F26F14;
	--dtc-ink: #1A1A1A;
	--dtc-muted: rgba(0, 0, 0, 0.5);
	--dtc-track: #E2E2E2;
	--dtc-card-radius: 8px;
	--dtc-gap: 40px;
	--dtc-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Inherit the theme's Elementor primary colour when it exists. */
.elementor-widget-container .dtc-pricing,
.dtc-pricing {
	--dtc-accent: var(--e-global-color-primary, #F26F14);
}

/* ---------- toggle ---------- */

.dtc-pricing-toggle {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	gap: 14px;
	margin: 0 0 8px;
}

.dtc-toggle-label {
	font-family: var(--dtc-font);
	font-size: 18px;
	font-weight: 700;
	line-height: 21.6px;
	color: var(--dtc-muted);
	transition: color .25s ease;
}

.dtc-toggle-label.is-active {
	color: var(--dtc-accent);
}

.dtc-toggle-switch {
	--size: 23px;
	--padding: 5px;
	position: relative;
	flex: 0 0 auto;
	width: 63px;
	height: 33px;
	padding: 0;
	border: 0;
	border-radius: 30px;
	background: var(--dtc-track);
	cursor: pointer;
	transition: background .3s ease-in-out;
}

.dtc-toggle-switch.is-year {
	background: var(--dtc-accent);
}

.dtc-toggle-knob {
	position: absolute;
	top: var(--padding);
	left: var(--padding);
	width: var(--size);
	height: var(--size);
	background: #fff;
	border-radius: 100%;
	transition: left .3s ease-in-out;
}

.dtc-toggle-switch.is-year .dtc-toggle-knob {
	left: calc(100% - var(--size) - var(--padding));
}

.dtc-toggle-switch:focus-visible {
	outline: 2px solid var(--dtc-accent);
	outline-offset: 3px;
}

/* ---------- grid ---------- */

.dtc-pricing-tables {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: stretch;
	gap: var(--dtc-gap);
	padding-top: 3%;
}

.dtc-pricing-tables[hidden] {
	display: none;
}

/* ---------- card ---------- */

.dtc-pricing-card {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1 1 0;
	min-width: 260px;
	padding: 35px;
	border-radius: var(--dtc-card-radius);
	background: #fff;
	box-shadow: 0 2px 4px -2px #1018280F, 0 4px 8px -2px #1018281A;
	transition: box-shadow .3s ease;
}

.dtc-pricing-card:hover,
.dtc-pricing-card.is-featured {
	box-shadow: 0 5px 30px 2px rgba(105, 65, 198, 0.2), 0 2px 8px 0 rgba(158, 119, 237, 0.2);
}

.dtc-plan-badge {
	position: absolute;
	top: 16px;
	right: 16px;
	background: var(--dtc-accent);
	color: #fff;
	font-family: var(--dtc-font);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	padding: 4px 12px;
	border-radius: 20px;
}

.dtc-plan-name,
.dtc-pricing-card .dtc-plan-name {
	font-family: var(--dtc-font);
	font-size: 27px;
	font-weight: 700;
	line-height: 32.4px;
	letter-spacing: 1px;
	color: var(--dtc-ink);
	margin: 0 0 10px;
}

.dtc-plan-price {
	font-family: var(--dtc-font);
	font-size: 27px;
	font-weight: 700;
	line-height: 32.4px;
	letter-spacing: 1px;
	color: var(--dtc-ink);
	margin: 0 0 14px;
}

.dtc-price-period {
	font-weight: 700;
}

.dtc-price-old {
	text-decoration: line-through;
	opacity: .5;
	margin-right: 6px;
}

.dtc-plan-desc {
	font-family: var(--dtc-font);
	font-size: 20px;
	font-weight: 400;
	line-height: 39.2px;
	color: var(--dtc-accent);
	margin: 0 0 10px;
}

.dtc-plan-divider {
	height: 0;
	border-top: 1px solid rgba(0, 0, 0, .12);
	margin: 14px 0 20px;
}

.dtc-plan-features {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1 1 auto;
}

.dtc-plan-feature {
	display: flex;
	align-items: flex-start;
	gap: 15px;
	margin: 0 0 20px;
	font-family: var(--dtc-font);
	font-size: 22px;
	font-weight: 400;
	line-height: 30px;
}

.dtc-plan-feature:last-child {
	margin-bottom: 0;
}

.dtc-feature-icon {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	color: var(--dtc-accent);
	margin-top: 4px;
}

.dtc-feature-icon svg {
	display: block;
	width: 22px;
	height: 22px;
}

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

.dtc-plan-action {
	padding-top: 20px;
	margin-top: auto;
}

.dtc-plan-btn,
.dtc-pricing .dtc-plan-btn {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	font-family: var(--dtc-font);
	font-size: 20px;
	font-weight: 700;
	line-height: 34.4px;
	padding: 16px 8px;
	border: 2px solid var(--dtc-accent);
	border-radius: 80px;
	background: transparent;
	color: var(--dtc-accent);
	text-decoration: none;
	cursor: pointer;
	transition: background .25s ease, color .25s ease;
}

.dtc-plan-btn:hover,
.dtc-plan-btn:focus {
	background: var(--dtc-accent);
	color: #fff;
}

.dtc-plan-btn.is-disabled,
.dtc-plan-btn[disabled] {
	opacity: .55;
	cursor: not-allowed;
	background: transparent;
	color: var(--dtc-accent);
}

/* ---------- admin-only notices ---------- */

.dtc-pricing-error,
.dtc-pricing-note {
	background: #fff8e5;
	border: 1px solid #dba617;
	border-radius: 4px;
	padding: 10px 14px;
	font-size: 14px;
	margin: 16px 0 0;
}

/* ---------- responsive: matches the original breakpoints ---------- */

@media (max-width: 1024px) {
	.dtc-pricing-tables {
		flex-direction: column;
	}

	.dtc-pricing-card {
		padding: 25px;
	}

	.dtc-plan-desc {
		font-size: 20px;
		line-height: 39.2px;
	}
}

@media (max-width: 767px) {
	.dtc-pricing-tables {
		flex-direction: column;
		padding-top: 0;
	}

	.dtc-pricing-card {
		padding: 20px 15px;
	}

	.dtc-toggle-label {
		font-size: 14px;
		line-height: 16px;
	}

	.dtc-plan-name,
	.dtc-plan-price {
		font-size: 22px;
		line-height: 28px;
	}

	.dtc-plan-desc {
		font-size: 16px;
		line-height: 23px;
	}

	.dtc-plan-feature {
		font-size: 14px;
		line-height: 18px;
		gap: 10px;
		margin-bottom: 12px;
	}

	.dtc-plan-btn {
		font-size: 14px;
		line-height: 17px;
		padding: 12px 8px;
	}
}
