/*
 * Pricing – Hero (Figma 852:3430, 1600×890 + 104px to the comparison table).
 * Stage: vertical gradient purple/20 → white behind the floating header. Content column (832:2052) at y=136,
 * 1280 wide: H1 + lead 16 apart, early-bird pill 24 below; 40 below that the three plan cards (416×468,
 * 16 apart) and, 24 under them, the money-back / USD footnote; 32px to the stage bottom.
 * Figma strokes on these frames are inside strokes that take no layout space, so CSS borders come out of
 * the padding (card 1px → 31px, highlighted card 2px → 30px, pill 1px → 6/23px).
 * Selectors on children of WordPress layout containers are doubled (.a > .b) to beat the layout margin rules.
 */

.rs-pr-hero__stage {
	box-sizing: border-box;
	padding: 136px var(--wp--style--root--padding-right, 16px) 32px var(--wp--style--root--padding-left, 16px);
	background: linear-gradient(180deg, var(--wp--preset--color--purple-20) 0%, var(--wp--preset--color--white) 100%);
}

.rs-pr-hero__stage > .rs-pr-hero__inner {
	max-width: 1280px;
	margin: 0 auto;
}

/* Early-bird pill (852:3427): purple/30 fill, 1px purple/60 inside stroke, 7/24 padding, radius 25. */
.rs-pr-hero__intro > .rs-pr-hero__deal {
	box-sizing: border-box;
	max-width: 100%;
	padding: 6px 23px;
	border: 1px solid var(--wp--preset--color--purple-60);
	border-radius: var(--wp--preset--border-radius--25, 25px);
	background: var(--wp--preset--color--purple-30);
}

.rs-pr-hero__deal strong {
	font-weight: 600;
}

/* ---------- Plan cards (444:2107 pro, 444:2114 "ultimate" = Plus, 444:2122 agency) ---------- */

.rs-pr-hero .rs-plan {
	position: relative;
	box-sizing: border-box;
	width: auto;
	min-width: 0;
	padding: 31px;
	border: 1px solid var(--wp--preset--color--purple-30);
	border-radius: var(--wp--preset--border-radius--20, 20px);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--text-secondary);
}

.rs-pr-hero .rs-plan.is-plus {
	padding: 30px;
	border-width: 2px;
	border-color: var(--wp--preset--color--purple-40);
}

/* Name, price, sites and button over a dashed black/30 rule: 4px dashes every 8px, centred (half dash at each end). */
.rs-pr-hero .rs-plan__head {
	padding-bottom: 32px;
	background: linear-gradient(90deg, var(--wp--preset--color--gray-30) 50%, transparent 0) -2px 100% / 8px 1px repeat-x;
}

/*
 * Price row (449:2608, 40 tall with 1px padding): "$49" (H4) and "/year" (Geist 20/28) share a baseline like
 * Figma's single text run; the struck regular price and the saving (Stack Sans Medium 20/28) are centred.
 * The spaces between the runs become margins: 4.89px = a 24px Stack Sans space, 0.204em = a 20px one.
 */
.rs-pr-hero .rs-plan__pricing {
	align-items: baseline;
	padding: 1px 0;
}

.rs-pr-hero .rs-plan__price {
	margin-right: 4.89px;
}

.rs-pr-hero .rs-plan__unit {
	/* Figma's 8px gap + the -0.1px letter-spacing CSS adds after the last glyph. */
	margin-right: 8.1px;
	font-family: var(--wp--preset--font-family--geist);
	font-size: var(--wp--preset--font-size--heading-6);
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: -0.005em;
}

.rs-pr-hero :is(.rs-plan__was, .rs-plan__save) {
	align-self: center;
	font-family: var(--wp--preset--font-family--stack-sans-headline);
	font-size: var(--wp--preset--font-size--heading-6);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0;
}

.rs-pr-hero .rs-plan__was {
	margin-right: 0.204em;
	text-decoration: line-through;
	text-decoration-thickness: from-font;
	text-decoration-skip-ink: none;
}

/* Feature list (449:2398): 26px rows 8 apart, 16px check 8px before the text; the first row is black. */
.rs-pr-hero .rs-plan__checks {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rs-pr-hero .rs-plan__checks > li {
	position: relative;
	margin: 0;
	padding-left: 24px;
	color: var(--wp--preset--color--text-secondary);
}

.rs-pr-hero .rs-plan__checks > li:first-child {
	color: var(--wp--preset--color--black);
}

.rs-pr-hero .rs-plan__checks > li::before {
	content: "";
	position: absolute;
	top: 5px;
	left: 0;
	width: 16px;
	height: 16px;
	background: url("../../images/pricing/hero/check.svg") 0 0 / 100% 100% no-repeat;
}

/* Footnote (1183:21349): two texts 40 apart with an 8px #ccc dot centred in the gap. */
.rs-pr-hero__note > p {
	position: relative;
}

.rs-pr-hero__note > p + p::before {
	content: "";
	position: absolute;
	top: 9px;
	left: -24px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--gray-20);
}

/* ---------- Responsive ---------- */

/* Below ~1360px the 1280 row shrinks: 24px card padding keeps "$199 /year $399/year (Save $200)" on one line at 1280. */
@media (max-width: 1359px) {
	.rs-pr-hero .rs-plan {
		padding: 23px;
	}

	.rs-pr-hero .rs-plan.is-plus {
		padding: 22px;
	}
}

/* Tablet: one card per row, laid out sideways (name/price/button | features) with the dashed rule between.
   (Three 223px columns at 782 would wrap every price and feature.) */
@media (max-width: 1023px) {
	.rs-pr-hero .rs-pr-hero__plans {
		grid-template-columns: minmax(0, 1fr);
	}

	.rs-pr-hero .rs-plan.rs-plan {
		flex-direction: row;
		align-items: center;
		gap: 32px;
	}

	.rs-pr-hero .rs-plan > .rs-plan__head {
		flex: 1 1 0;
		align-self: stretch;
		min-width: 0;
		padding: 0 32px 0 0;
		background: linear-gradient(180deg, var(--wp--preset--color--gray-30) 50%, transparent 0) 100% -2px / 1px 8px repeat-y;
	}

	/* The list hugs its longest item, so the price row keeps its one line down to 782. */
	.rs-pr-hero .rs-plan > .rs-plan__checks {
		flex: 0 1 auto;
		min-width: 0;
	}
}

/* Phone: cards stack (head over features again), footnote lines stack without the dot. */
@media (max-width: 781px) {
	.rs-pr-hero__stage {
		padding-top: 120px;
	}

	.rs-pr-hero .rs-plan.rs-plan {
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
	}

	.rs-pr-hero .rs-plan > .rs-plan__head {
		flex: none;
		padding: 0 0 24px;
		background: linear-gradient(90deg, var(--wp--preset--color--gray-30) 50%, transparent 0) -2px 100% / 8px 1px repeat-x;
	}

	.rs-pr-hero .rs-plan > .rs-plan__checks {
		flex: none;
	}

	.rs-pr-hero .rs-pr-hero__note {
		flex-direction: column;
		gap: 4px;
	}

	.rs-pr-hero__note > p {
		text-align: center;
	}

	.rs-pr-hero__note > p + p::before {
		display: none;
	}

	.rs-pr-hero__intro > .rs-pr-hero__deal {
		padding-inline: 19px;
	}
}

/* Bound to WooCommerce: when a plan isn't on sale its regular price and savings come back empty. */
.rs-pr-hero .rs-plan__pricing > p:empty {
	display: none;
}

/*
 * "Key Features Comparison" toggle (not in Figma): opens / closes the comparison table below
 * (assets/js/compare-toggle.js). Shown only on pages that have the comparison, and in the editor.
 * A larger outline button with a chevron: down while closed, up while open.
 */
.rs-pr-hero .rs-compare-toggle {
	display: none;
}

.rs-js body:has(.rs-pr-compare) .rs-pr-hero .rs-compare-toggle,
.editor-styles-wrapper .rs-pr-hero .rs-compare-toggle {
	display: flex;
}

/* The site's section gap (104px at 1600) below the plan cards, on request 2026-10-02: the column already
   puts 40px between its items. */
.rs-pr-hero__inner > .rs-compare-toggle {
	margin-top: calc(var(--wp--preset--spacing--104) - 40px);
}

.rs-pr-hero .rs-compare-toggle__button > .wp-block-button__link {
	gap: 10px;
	padding: 19px 27px 19px 31px;
	font-size: 20px;
	line-height: 24px;
	cursor: pointer;
}

.rs-pr-hero .rs-compare-toggle__button > .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 24px;
	height: 24px;
	background-color: currentColor;
	-webkit-mask: url("../../images/icons/caret-down.svg") center / 24px no-repeat;
	mask: url("../../images/icons/caret-down.svg") center / 24px no-repeat;
	transition: transform 0.25s ease;
}

.rs-pr-hero .rs-compare-toggle__button > .wp-block-button__link[aria-expanded="true"]::after {
	transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
	.rs-pr-hero .rs-compare-toggle__button > .wp-block-button__link::after {
		transition: none;
	}
}

@media (max-width: 781px) {
	.rs-pr-hero .rs-compare-toggle__button > .wp-block-button__link {
		padding: 15px 23px 15px 27px;
		font-size: 18px;
	}
}

