/**
 * OptConnect pricing rows (PR 3.16).
 *
 * One stylesheet for the family — `optconnect/pricing-row` (a bare row of plan cards)
 * and `optconnect/pricing-row-intro` (the same row beside a copy rail). Three live
 * sections, all Elementor Pro `price-table`: 24083 `/rv-go/` s6, 34135 `/sethleds/` s5
 * and 35055 `/sandstar-connectivity/` s5.
 *
 * **The card count is the design problem.** The row has to hold 2, 4 and 5 cards across
 * the three sections and stay editable, so it lays out on flex `wrap` +
 * `justify-content: center` with a basis on the card rather than on core's grid: grid
 * emits `repeat(auto-fill, …)` and keeps the empty track, which puts a hole in the row
 * the first time an editor deletes a plan. Same call `stats.css` makes, one card count
 * further on. Flex with a basis is indifferent to the count, so there is **no media
 * query in this file** — nothing of ours to keep in step with core.
 *
 * The live section solves none of this: its cards' `--width: 30%` and its own
 * `flex-wrap: wrap` land on opposite sides of Elementor's 768px breakpoint, so above it
 * they have a width and cannot wrap and below it they wrap with no width. docs/history/phase-3.md →
 * PR 3.16 measures what that renders as.
 *
 * Same no-margins convention as the other family stylesheets: nothing inside a
 * block-gapped group gets a `margin` declaration, because core's flow layout emits
 * `.wp-container-… > * + * { margin-block-start: … }` at one-class specificity and this
 * file loads after it. Spacing between blocks is `blockGap` in the pattern markup. The
 * one exception below is labelled as one.
 *
 * The features list is a `core/list` wearing `.oc-checklist` from `checklist.css`.
 */

/* --------------------------------------------------------------------------
 * The row
 *
 * Written at (0,2,0) to beat core's `.is-layout-flex { align-items: center }` on
 * specificity rather than on stylesheet order, the same call `stats.css` and
 * `testimonial.css` make. Stretched, so the cards in a row share a height and their
 * features lists line up; live the five on `/sandstar-connectivity/` are three different
 * heights, in a row whose whole job is to be read across.
 *
 * `justify-content: center` is a block attribute in the markup, not a rule here, so the
 * editor can see it.
 * ---------------------------------------------------------------------- */
.oc-pricing .oc-pricing__row {
	align-items: stretch;
}

/* --------------------------------------------------------------------------
 * One card
 *
 * `flex: 1 1 12.5rem` is measured, not chosen. Five cards at a 200px basis plus four
 * 30px gaps is 1120px, inside the theme's 1140px `contentSize`, so
 * `/sandstar-connectivity/`'s five plans hold one row at the full measure and grow to
 * 204px each; four grow to 263px, two to the `max-width` cap. **Both directions cost
 * something**: raise the basis and five wrap 4 + 1 at the full measure, lower it and
 * five 184px slivers survive down to a 1040px row instead of reflowing. Re-measure the
 * five-card row before changing it.
 *
 * `max-width` stops a pair — `/rv-go/`'s two plans — stretching to half the measure each
 * and reading as panels rather than cards. `min-width: 0` stops a long unbroken heading
 * widening the card past its basis, the guard `.oc-card` and `.oc-stat` both carry.
 * `overflow: hidden` clips the filled header to the radius.
 *
 * Deliberately **not** `.oc-card`: that surface lifts and deepens its shadow on
 * `:hover` / `:focus-within` because everything wearing it is a link target. All eleven
 * live price cards have an empty `button_text` — there is nothing to click in a card,
 * and the row's call to action is the section after it. An element that reacts to the
 * pointer without doing anything is a promise the page cannot keep; the same reasoning
 * `stats.css` and `testimonial.css` give for declining it.
 * ---------------------------------------------------------------------- */
.oc-price-card {
	display: flex;
	min-width: 0;
	max-width: 20rem;
	flex: 1 1 12.5rem;
	flex-direction: column;
	border-radius: 12px;
	background-color: var(--wp--preset--color--base, #ffffff);
	box-shadow: 0 6px 24px 0 rgba(29, 44, 56, 0.08);
	overflow: hidden;
}

/* --------------------------------------------------------------------------
 * The header
 *
 * **One fill for every card, where live rotates five.** Do not restore the rotation
 * without re-checking contrast: live pairs `#0081C2` / `#7CB242` / `#F47920` /
 * `#3AB3E5` / `#54595F` with a `#EFF2F8` heading and a white 13px sub-heading, and only
 * the last of the five clears 4.5:1 — the worst is 2.14:1. Nor can the rotation simply
 * be recoloured in brand tokens: of the six `theme.json` fills only `accent-2` and
 * `accent-6` carry white text and only `accent-3` / `accent-4` / `accent-5` carry
 * `contrast`, so four distinct fills would need four different inks. docs/history/phase-3.md → PR 3.16
 * has the matrix and the mapping to use if the client asks for per-plan colour back.
 *
 * `accent-2`, not `accent-1` (the live first card's colour): `accent-1` is 4.27:1 with
 * white and 3.35:1 with `contrast`, so it clears neither floor, and the tagline is
 * normal-size text. `accent-2` with white is 5.77:1. Same deepening PR 3.8 applied to
 * its disclosure hover.
 * ---------------------------------------------------------------------- */
.oc-price-card__header {
	padding: 1.25rem;
	background-color: var(--wp--preset--color--accent-2, #006ba4);
	text-align: center;
}

/* `overflow-wrap` is load-bearing, not cosmetic: a card sized by a flex basis has to be
   able to break a word wider than itself. Live "eSIM Connectivity" sets 39px outside its
   coloured band at a 775px row. */
.oc-price-card__name {
	color: var(--wp--preset--color--base, #ffffff);
	font-family: var(--wp--preset--font-family--nunito, sans-serif);
	font-size: clamp(1.125rem, 1.6vw, 1.375rem);
	font-weight: 700;
	line-height: 1.25;
	overflow-wrap: break-word;
	text-wrap: balance;
}

/* A shown ribbon — /rv-go/'s "Top Pick" on Seasonal Voyager, the one card in the family
   whose `show_ribbon` is on (absent, so Elementor Pro's default). Live it is a corner
   flag; here a pill in the header's flow, under the name, so it can never sit on a
   centred plan name that wraps in a narrow card. `accent-2` on white, 5.77:1, inverting
   the header it sits on. */
.oc-price-card__ribbon {
	width: fit-content;
	margin-inline: auto;
	padding: 0.125rem 0.75rem;
	border-radius: 999px;
	background-color: var(--wp--preset--color--base, #ffffff);
	color: var(--wp--preset--color--accent-2, #006ba4);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.5;
	text-transform: uppercase;
}

/* 15px against the live 13px, and only two of the eleven cards have a tagline at all. */
.oc-price-card__tagline {
	color: var(--wp--preset--color--base, #ffffff);
	font-size: 0.9375rem;
	line-height: 1.4;
}

/* `flex: 1` puts the row's spare height in the body rather than the header, which is
   what gives `.oc-price-card__features` somewhere to be pushed to. */
.oc-price-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.5rem 1.25rem;
	text-align: center;
}

/* --------------------------------------------------------------------------
 * The price
 *
 * `accent-1`, matching `.oc-stat__value` — the theme's one treatment for a large number
 * that is the point of its block. It is 4.27:1 on white, under the 4.5:1 body-text floor
 * and over the 3:1 large-text one; at 1.75–2.25rem / 700 this is unambiguously large
 * text, the same judgement `stats.css` records. Live the colour is Elementor's `#555` on
 * one page and the kit's `#54595F` on the other two, two greys for one role.
 *
 * The clamp ceiling is set from the longest value in the family, per PR 3.15's rule:
 * "$135" is the widest string the eleven cards print and measures 86.4px at 2.25rem
 * against the 164px of text a card has at its narrowest one-row width. Re-measure before
 * raising it.
 *
 * The currency symbol is part of this paragraph's text, not a sibling element — same
 * call PR 3.15 made on the stat unit. Live it is a separate `<span>` at 60% of a 65px
 * number, top-aligned, and in a narrow card the `$` and the digits land on separate
 * lines.
 * ---------------------------------------------------------------------- */
.oc-price-card__price {
	color: var(--wp--preset--color--accent-1, #0081c2);
	font-family: var(--wp--preset--font-family--nunito, sans-serif);
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	font-weight: 700;
	line-height: 1.1;
}

/* The qualifier under the price — "Monthly", "fuse one device", "cellular service" — in
   `accent-6` at 9.59:1, the body grey the theme uses for captions. */
.oc-price-card__period {
	color: var(--wp--preset--color--accent-6, #454545);
	font-size: 1rem;
	line-height: 1.4;
}

/* --------------------------------------------------------------------------
 * The features list
 *
 * `--oc-checklist-badge` steps the shared marker down to 16px: a card gives the list a
 * 164px measure where `optconnect/checklist-promo` gives it ~545px, and the full-size
 * badge eats an eighth of it.
 *
 * `text-align: start` against the body's centring — a wrapped feature centred in a 164px
 * column has no left edge to read down, and its marker ends up under the text rather
 * than beside it. `line-height: 1.5` against Elementor's `1`, which lets the two lines
 * of a wrapped feature touch.
 * ---------------------------------------------------------------------- */
.oc-price-card__features {
	--oc-checklist-badge: 1rem;
	color: var(--wp--preset--color--accent-6, #454545);
	font-size: 0.9375rem;
	line-height: 1.5;
	text-align: start;
}

/* Labelled exception to the no-margins convention, and the same one
   `.oc-card--choice > .oc-card__actions` makes: written at two classes, on the very
   logical property core's flow gap sets, so it beats the gap on specificity rather than
   on load order. It pins the list to the card's bottom edge so a row of cards lines its
   lists up however far the plan names wrap — the point of stretching the row. */
.oc-price-card__body > .oc-price-card__features {
	margin-block-start: auto;
}

/* --------------------------------------------------------------------------
 * The intro rail (`optconnect/pricing-row-intro`)
 *
 * A `core/columns` of 40 / 60 with the card row in the second column, where live is a
 * 40 / 30 / 30 flex row of siblings — so core stacks it at its own 781px and this file
 * adds no breakpoint, the same substitution `media-text.css` makes for the same shape.
 *
 * The illustration is capped, not sized in percent: live sets `width: 58%`, which is
 * 264px against the 456px rail at the theme's content width, and a fixed cap states that
 * once without upscaling the 600px source. `min()` with the column matters — a bare
 * `20rem` is wider than the rail at small viewports, and a `max-width` larger than its
 * box is not a maximum. The `<figure>` takes the rule too, since `core/image` sizes it
 * from the `<img>`.
 * ---------------------------------------------------------------------- */
.oc-pricing__intro-media,
.oc-pricing__intro-media img {
	max-width: min(100%, 20rem);
}

/* core/columns' own `:where()` margin-bottom, not a block gap — see `hero.css`. */
.oc-pricing__cols {
	margin-bottom: 0;
}
