/**
 * OptConnect CTA bands (PR 3.2).
 *
 * One stylesheet for the whole CTA family — `optconnect/cta-band-split`,
 * `optconnect/cta-band-centered` and `optconnect/cta-button-row`. They share the
 * `.oc-cta` shell; the `--split`, `--centered` and `--button-row` modifiers differ
 * only in layout.
 *
 * Same no-margins convention as `card-grid.css` (PR 3.1): nothing inside a
 * block-gapped group gets a `margin` declaration here, 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 set with
 * `blockGap` in the pattern markup.
 *
 * **The buttons moved out of this file in PR 3.3.** `theme.json` now owns
 * `styles.elements.button` (the `accent-2` fill, the white label, Nunito 700,
 * hover, and the focus ring), and the white on-band variant is the shared
 * `.oc-button--inverse` in `assets/css/button.css` — it was `.oc-cta__button--inverse`
 * here. `.oc-cta__button` survives as the family's hook for anything band-specific;
 * it currently declares nothing. See `button.css` for why the `!important` fight
 * this file used to describe no longer happens.
 *
 * Deliberate deviations from the Elementor originals are recorded per pattern in
 * `patterns/cta-*.php`. The ones that live here rather than in the markup:
 *   - The band is `accent-2` (#006ba4), not `accent-1` (#0081c2). 25 of the 37
 *     live split bands already use the darker blue; the other 12 use #0081c2,
 *     where white body copy lands at 4.27:1 — under AA for anything that is not
 *     large text. `accent-2` gives 5.77:1 for the same design.
 *   - Legacy band buttons came in three fills — #7CB242 green (17 bands),
 *     #FFFFFF (12) and #F47920 orange (7) — and the green and orange ones set
 *     white label text, i.e. 2.53:1 and 2.76:1. Both fail AA outright. The family
 *     standardises on the white fill with `accent-2` text (5.77:1), which is also
 *     what both of the sources named in plans.md use. The rule that replaces them
 *     now lives in `button.css`.
 */

/* --------------------------------------------------------------------------
 * Band shell
 * The full-bleed groups carry `align: full` + `layout: {type: constrained}` and
 * no horizontal padding, so WordPress adds `has-global-padding` at render and
 * the content sits inside the theme's root padding at the 1140px content width.
 * Setting padding-left/right here (or in the markup) would double it.
 * ---------------------------------------------------------------------- */
.oc-cta__title {
	font-size: clamp(1.5rem, 3vw, 1.875rem);
	line-height: 1.25;
}

.oc-cta__text {
	font-size: 1rem;
}

/* --------------------------------------------------------------------------
 * Split band — copy on the left, action on the right
 *
 * The stack comes from `core/columns`, which collapses on its own at core's
 * 781px breakpoint, so there is no breakpoint of ours to keep in step. The one
 * media query below is keyed to core's own value and exists only because a
 * right-justified button reads as unbalanced once the columns have stacked and
 * it is the only thing on its row.
 *
 * Copy is start-aligned. 20 of the 34 live bands right-align it (with a
 * `align_mobile: center` override); right-aligned multi-line body copy is a
 * readability regression, and dropping it also drops the second breakpoint the
 * original needed.
 * ---------------------------------------------------------------------- */
.oc-cta--split .oc-cta__cols {
	margin-bottom: 0; /* core/columns' own `:where()` margin-bottom — this is not a block gap. */
}

@media (max-width: 781px) {
	.oc-cta--split .oc-cta__actions {
		justify-content: center;
	}
}

/* --------------------------------------------------------------------------
 * Centered band
 *
 * The heading and paragraph are centered here rather than with each block's own
 * `textAlign` attribute, so the same heading and paragraph serialization is
 * shared with the split band and the alignment stays a property of the band. The
 * buttons row justifies itself natively (`layout.justifyContent`), because that
 * one core does express.
 * ---------------------------------------------------------------------- */
.oc-cta--centered {
	text-align: center;
}

.oc-cta--centered .oc-cta__text {
	color: var(--wp--preset--color--accent-6, #454545);
}
