/**
 * OptConnect testimonial sections (PR 3.11).
 *
 * One stylesheet for the family — `optconnect/testimonial-pair` (the two-up customer
 * cards, 8 of the family's 11 live sections) and `optconnect/testimonial-quote` (the
 * single centred pull quote, 2 more). The eleventh section is not a testimonial at all;
 * docs/history/phase-3.md → PR 3.11 records what it is and why no pattern here covers it.
 *
 * **`core/quote` does most of the work, which is why this file is short.** Both patterns
 * are a real `<blockquote>` where the live markup had a `<div>`, and the theme already
 * styles `core/quote` through the parent's `theme.json` — a 2px start rule, `spacing|30`
 * / `spacing|40` padding, `font-size: large`, `font-weight: 300`, and a `cite` at
 * `small` / 300 with `font-style: normal`. Neither pattern fights that:
 * `optconnect/testimonial-pair` picks core's own `plain` style variation, which zeroes
 * the rule and the padding, and `optconnect/testimonial-quote` is centred, which the
 * parent's own `&.has-text-align-center` rule already strips the rule and inline padding
 * from. What is left here is the card surface, the type scale the widget's headings were
 * standing in for, and one decorative glyph.
 *
 * Three things that could have lived here do not:
 *
 *   - **The 2-up split and its stacking.** `core/columns`, which collapses at core's
 *     781px on its own. No breakpoint of ours to keep in step with core's.
 *   - **The circular avatar crop.** `is-style-rounded` plus the image block's own
 *     `aspectRatio` / `scale` / `width`, so the Site Editor's image controls stay
 *     truthful and an editor swapping the photo keeps the circle.
 *   - **The light band and the quote's blue.** `backgroundColor: accent-5` on the
 *     section group and `textColor: accent-1` on the pull quote's paragraph, so the
 *     editor shows the colours the front end renders.
 *
 * 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 says why it is one.
 *
 * The `cite` and quote-text rules are written at (0,2,1) — `.oc-testimonial` plus a
 * block class plus an element — rather than the (0,1,1) the selector alone would need.
 * The parent's element styles arrive as `:root :where(.wp-block-quote) cite`, which is
 * also (0,1,1), so matching it would leave the winner decided by stylesheet order alone.
 * That order happens to be in our favour today; it is not worth depending on.
 */

/* --------------------------------------------------------------------------
 * Card surface
 *
 * Deliberately not `.oc-card` from the card-grid family. That surface lifts 2px and
 * deepens its shadow on `:hover` / `:focus-within` because every card wearing it is a
 * link target; a testimonial is not clickable, and an element that reacts to the pointer
 * without doing anything is a promise the page cannot keep. What is shared is the
 * geometry — the 12px radius PR 3.1 unified the cards on and PR 3.10 the video frame,
 * and the same shadow ramp — so a testimonial band between two rebuilt sections is cut
 * and lifted the way they are. Live is a 5px radius with `0 0 25px rgba(0,0,0,.05)`.
 *
 * `display: flex` + `flex: 1` on the card, and `display: flex` on the column, are what
 * make the two cards equal height. Live they are not: Bootstrap stretches the
 * `col-sm-6` cell but `.restly-testimonial-item` sets no height of its own, so the
 * shorter of the two quotes gets a visibly shorter white card. `position: relative` is
 * the containing block for the quote mark below.
 * ---------------------------------------------------------------------- */
.oc-testimonial--pair .oc-testimonial__col {
	display: flex;
}

.oc-testimonial__card {
	position: relative;
	display: flex;
	flex: 1;
	min-width: 0;
	flex-direction: column;
	border-radius: 12px;
	box-shadow: 0 6px 24px 0 rgba(29, 44, 56, 0.08);
}

/* Exception: core/columns carries `margin-bottom: 1.75em` in a `:where()` wrapper, and
   this section has nothing below the row for that margin to separate it from. One class
   clears it; it is not the row's block gap. */
.oc-testimonial__cols {
	margin-bottom: 0;
}

/* --------------------------------------------------------------------------
 * The decorative quote mark
 *
 * The live card carries a 64px `ico-quote22` glyph from `restly-iconfont`, absolutely
 * positioned in its top-right corner and coloured by the kit's `primary`, i.e. the brand
 * blue. `restly-iconfont` is Restly's own font and goes with Elementor, so this is the
 * asset swap docs/history/phase-3.md → PR 3.1 signed off: `bi-quote`, synced from Bootstrap Icons by
 * `composer icons` like the other 31 glyphs, already filled with the brand blue by that
 * script.
 *
 * It is the one icon in this theme loaded as a CSS background rather than placed in a
 * `core/image` block, and the reason is the reverse of PR 3.1's: that PR kept icons in
 * blocks so an editor could swap them, and nobody should ever swap this one. It is not
 * content, it names nothing, and in a block it would need `alt=""`, absolute
 * positioning and a rule to hide it — three ways to get a decoration wrong.
 *
 * `bottom: auto` is not redundant: without a fixed height the glyph box would otherwise
 * be free to stretch, and 12px of inset keeps it clear of the card's radius.
 * ---------------------------------------------------------------------- */
.oc-testimonial__card::after {
	position: absolute;
	top: var(--wp--preset--spacing--50, 40px);
	right: var(--wp--preset--spacing--50, 40px);
	bottom: auto;
	width: 56px;
	height: 56px;
	background-image: url("../images/icons/bi-quote.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	content: "";
	opacity: 0.35;
	pointer-events: none;
}

/* Reserve the glyph's column so a long name or role never runs under it. The identity
   block is the only child of the card that shares its top edge. */
.oc-testimonial__person {
	padding-right: 68px;
}

/* The one media query in this file, and it is core's own 781px rather than a new
   breakpoint. The live design hides the glyph below desktop too — by shrinking its
   font-size to 1px on both the tablet and mobile Elementor breakpoints, which is the
   same intent expressed as a bug. Stacked, the card is the full measure and the mark
   competes with the name instead of sitting beside it. */
@media (max-width: 781px) {
	.oc-testimonial__card::after {
		display: none;
	}

	.oc-testimonial__person {
		padding-right: 0;
	}
}

/* --------------------------------------------------------------------------
 * Who is speaking
 *
 * Live these are an `<h3>` and an `<h6>` — the `restly_testimonial` widget hardcodes
 * those as its title/subtitle defaults, so eight pages carry two `<h3>`s that are
 * people's names. They are paragraphs now, and the type that made them read as headings
 * is here instead: 18px Nunito bold for the name, 16px for the role, which is what the
 * widget's own CSS set. The role's blue is the live colour — the sections override
 * `restly-testimonial-title-subtitle .testimonial-stitle`'s grey with the kit's
 * `primary`, and `accent-1` is that value.
 *
 * `flex: none` keeps the avatar from being squeezed by a long role; the image block owns
 * its 80px, so nothing here sets a width.
 * ---------------------------------------------------------------------- */
.oc-testimonial__avatar {
	flex: none;
}

.oc-testimonial__name {
	font-family: var(--wp--preset--font-family--nunito, sans-serif);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.4;
}

.oc-testimonial__role {
	color: var(--wp--preset--color--accent-1, #0081c2);
	font-size: 1rem;
	line-height: 1.5;
}

/* --------------------------------------------------------------------------
 * The quotation
 *
 * The card quote is body copy, not a display face: `font-size: medium` and
 * `font-weight: 400` are set on the block so the editor shows them, and the only thing
 * left is the colour. Live is #54595F — the Elementor kit's `secondary`, which is not a
 * brand colour and is not in `theme.json`; it collapses to `accent-6`, the same way
 * every other grey in this theme has since PR 3.1.
 * ---------------------------------------------------------------------- */
.oc-testimonial .oc-testimonial__quote {
	color: var(--wp--preset--color--accent-6, #454545);
}

/* --------------------------------------------------------------------------
 * The single pull quote
 *
 * The paragraph's blue and weight are block attributes; what is left is the attribution.
 * The parent styles `cite` at `small` / 300, which is too quiet for the only thing
 * saying whose words these are — live it is 16px, and one of the two sections sets 500.
 * The colour is the live one collapsed to `accent-6`, as above: 9858 stores the kit's
 * `secondary` (#54595F) and 30170 its `text` (#7A7A7A), two greys for the same role.
 *
 * `display: block` and the top margin: the parent's `core/quote` blockGap does not reach
 * `cite`, which is not an inner block but part of the quote block's own save output, so
 * it would otherwise sit directly under the last line. This is the second exception to
 * the no-margins rule and the reason is the same as the first — the gap it makes is not
 * a block gap, and no layout is emitting one here.
 * ---------------------------------------------------------------------- */
.oc-testimonial .oc-testimonial__quote cite {
	display: block;
	margin-top: var(--wp--preset--spacing--30, 20px);
	color: var(--wp--preset--color--accent-6, #454545);
	font-size: 1rem;
	font-style: normal;
	font-weight: 500;
	line-height: 1.5;
}

/* --------------------------------------------------------------------------
 * The speaker's photo (`/managed-iot-connectivity-vs-diy/`, PR 6.1)
 *
 * Elementor's `testimonial` widget sets the photo round above the quote; the
 * image block owns its 120px square and cover crop, this only rounds it.
 * ---------------------------------------------------------------------- */
.oc-testimonial__photo img {
	border-radius: 50%;
}
