/**
 * SeasonPals price block.
 *
 * Two variants:
 *  - `--nfd`     matches the GenerateBlocks/NFD cards on seasonpals.com. The
 *                font size comes inline from render.php (same clamp the theme
 *                uses), so only structure is defined here.
 *  - `--stacked` neutral fallback for any other theme.
 *
 * Every selector is a plain class the theme can override.
 */
.seasonpal-pack-value {
	font-variant-numeric: tabular-nums;
}

/* One-line label: name, price and credits in separate spans. */
.seasonpal-pack-value--inline .seasonpal-pack-sep {
	opacity: 0.45;
}

/* -------------------------------------------------------------------------
 * Label cards: price on top, credits underneath (used with field="label").
 * ------------------------------------------------------------------------- */
.seasonpal-pack-value--inline {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

span.seasonpal-pack-name {
	font-size: 12px;
	display: none;
}

span.seasonpal-pack-sep {
	display: none;
}

.seasonpal-pack-price {
	/* Cqw = % del ancho del contenedor (el wrapper NFD). Así el precio nunca
	 * se sale de la tarjeta; sin contenedor cae al viewport, como vw. */
	font-size: clamp(18px, 26cqw, 40px);
	line-height: 0.7;
	font-weight: bolder;
}

span.seasonpal-pack-credits {
	margin-top: 10px;
	justify-content: center;
	display: flex;
}

/* Neutral fallback. */
.seasonpal-pack-value--stacked {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.1em;
	line-height: 1.1;
}

.seasonpal-pack-value--stacked .seasonpal-pack-price {
	font-size: 2.5em;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.seasonpal-pack-value--stacked .seasonpal-pack-period {
	font-size: 1em;
	font-style: italic;
	font-weight: 400;
	opacity: 0.75;
}

/* GenerateBlocks / NFD cards. Typography comes from the theme. */
.seasonpal-pack-value--nfd {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
}

.seasonpal-pack-value--nfd .seasonpal-pack-value-inner {
	display: block;
}

.seasonpal-pack-value--nfd .seasonpal-pack-price,
.seasonpal-pack-value--nfd .seasonpal-pack-period {
	margin: 0;
}

.seasonpal-pack-value--nfd .seasonpal-pack-price strong {
	font-weight: 800;
}

/* Alignment control from the editor. "inherit" keeps the container's. */
.seasonpal-pack-value--left {
	align-items: flex-start;
	margin-right: auto;
	text-align: left;
}

.seasonpal-pack-value--center {
	align-items: center;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.seasonpal-pack-value--right {
	align-items: flex-end;
	margin-left: auto;
	text-align: right;
}

/* -------------------------------------------------------------------------
 * Pricing section (#pricing).
 * The columns are marked "vertically align: center" in the editor, so each
 * card is centered in the row. Cards have different heights (different number
 * of benefits), which pushes the card tops and the price rows to different
 * heights. Top alignment makes every card start at the same y.
 * ------------------------------------------------------------------------- */
#pricing .wp-block-columns {
	align-items: flex-start;
}

#pricing .wp-block-column {
	align-self: flex-start;
}

/* Wrapper NFD del precio: centra el contenido y reserva margen arriba/abajo. */
#pricing .nfd-text-balance:has(.seasonpal-pack-value) {
	justify-content: center;
	align-items: center;
	container-type: inline-size;
	margin-top: 15px;
	margin-bottom: 15px;
}

/* Centra precio y créditos dentro de ese wrapper. */
#pricing .nfd-text-balance:has(.seasonpal-pack-value) > div {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
}

/* Descripción: sin altura fija (dejaba un hueco blanco sobre la caja del
 * precio). En desktop el texto se ancla abajo de una altura común, así los
 * precios siguen alineados sin espacio muerto. */
#pricing .wp-block-column h3 + div {
	height: auto !important;
}

/* Menos aire entre el título y la descripción (el grupo trae 8px). */
#pricing .wp-block-column .nfd-text-balance:has(> h3) {
	gap: 4px;
}

#pricing .wp-block-column h3 + div p {
	margin: 0;
}

@media (min-width: 782px) {
	#pricing .wp-block-column h3 + div {
		display: flex;
		align-items: center;     /* menos hueco entre título y texto */
		min-height: 82px;        /* altura de la descripción más larga (4 líneas) */
	}
}

/* Cards: the image keeps its natural height (no flex growth pushing the price
 * down) and the feature list reserves the height of the longest one, so all
 * "Get Started" buttons share the same baseline.
 * --seasonpal-features-min is the tallest feature list (Full Pass); update it
 * if a card gains or loses benefits. */
#pricing {
	--seasonpal-features-min: 404px;
}

#pricing .wp-block-column > .wp-block-group > figure {
	flex-grow: 0;
}

@media (min-width: 782px) {
	#pricing .wp-block-column > .wp-block-group > div:last-child > div:has(> .wp-block-group.is-nowrap) {
		min-height: var(--seasonpal-features-min);
	}
}
