/* ==========================================================================
   Vive Search – custom CSS
   Only what core blocks + theme.json can't do. Colours/fonts/sizes are in
   theme.json; layout is in the block markup (patterns/).

   Breakpoints follow core and Twentig so they line up with the editor's
   own stacking: 600px (mobile) · 782px (columns stack) · 1024px (tablet).
   ========================================================================== */

:root {
	/* Anchor offset under the sticky header (measured header heights, rounded up).
	   The header hides on scroll down (Twentig scroll-up), so this mainly
	   matters when a link scrolls the page *up* and the header reappears. */
	--vive-header-h: 152px;
	--vive-bar: 18px;         /* lime base bar on cards */
}

@media (max-width: 1279px) {
	:root { --vive-header-h: 132px; }
}

@media (max-width: 781px) {
	:root { --vive-header-h: 116px; }
}

/* 1. Anchors -------------------------------------------------------------- */

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

.wp-site-blocks [id] { scroll-margin-top: var(--vive-header-h); }

/* Sections butt up against each other – no root block gap between bands. */
.wp-site-blocks > *,
.wp-block-post-content > .alignfull { margin-block: 0; }

/* 2. Header ---------------------------------------------------------------- */

.vive-header .vive-logo img {
	width: clamp(132px, 15vw, 210px);
	height: auto;
}

.vive-header__right { align-items: flex-end; }


/* Mobile overlay menu: big, tappable links. */
.vive-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	padding-block: 0.35em;
}

/* 3. Eyebrow (paragraph style "Eyebrow") ------------------------------------ */

.is-style-vive-eyebrow {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 900;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}

.is-style-vive-eyebrow + :is(h1, h2) { margin-top: 0; }

/* 4. Cards (Column styles "Card – lime base" / "Card – outlined") ---------- */

.wp-block-column.is-style-vive-card,
.wp-block-column.is-style-vive-card-outline {
	box-shadow: inset 0 calc(-1 * var(--vive-bar)) 0 var(--wp--preset--color--accent);
	padding-bottom: calc(var(--vive-bar) + var(--wp--preset--spacing--40)) !important;
}

/* Outlined variant: white keyline round the card *and* the lime bar. */
.wp-block-column.is-style-vive-card-outline {
	box-shadow:
		inset 0 0 0 2px var(--wp--preset--color--base),
		inset 0 calc(-1 * var(--vive-bar) - 2px) 0 var(--wp--preset--color--accent);
}

.is-style-vive-card p:not(.is-style-vive-eyebrow) { max-width: 18em; }

/* Card titles scale with the card, not the viewport, so "Independent"
   never breaks mid-word when three cards sit side by side on a tablet. */
.wp-block-column:is(.is-style-vive-card, .is-style-vive-card-outline) { container-type: inline-size; }
.wp-block-column:is(.is-style-vive-card, .is-style-vive-card-outline) h3 {
	font-size: min(var(--wp--preset--font-size--x-large), 14cqi);
	overflow-wrap: normal;
}

@media (max-width: 781px) {
	/* Stacked cards: smaller icons so each card isn't a full screen tall. */
	.vive-card-icon img { max-width: 64px; max-height: 64px; }
	.is-style-vive-card-outline .vive-card-icon img { max-width: 100px; max-height: 100px; }
	.vive-card-icon { margin-bottom: var(--wp--preset--spacing--20) !important; }
}

/* Icons in cards keep their size; approach icons sit top-right. */
.vive-card-icon img { height: auto; }
.vive-card-icon.alignright { margin: 0 !important; }
.vive-card-icon.alignright + * { clear: both; }

/* 5. Tags – "Who we place" (Button styles "Tag – dark" / "Tag – green") --- */

.wp-block-button:is(.is-style-vive-tag, .is-style-vive-tag-green) .wp-block-button__link {
	background: var(--wp--preset--color--contrast-2);
	color: var(--wp--preset--color--base);
	font-weight: 400;
	padding: 0.8rem 1.25rem;
	min-width: 12rem;
	cursor: default;
}

.wp-block-button.is-style-vive-tag-green .wp-block-button__link {
	background: var(--wp--preset--color--green);
}

.wp-block-button:is(.is-style-vive-tag, .is-style-vive-tag-green) a:not([href]) { text-decoration: none; }

@media (max-width: 599px) {
	/* Fill each row on phones so the wrap looks deliberate. */
	.vive-tags > .wp-block-button { flex: 1 1 auto; }
	.vive-tags .wp-block-button__link { width: 100%; min-width: 0; }
}

/* 6. Circle images (Group style "Circle image" + an Image block inside) ---
   Ring    = the Group's background colour (Styles → Color → Background).
   Photo   = a normal Image block, so it keeps srcset/lazy loading and
             swaps in the media library.
   V-mark  = ::after, masked from brand/v-chevron.svg. Its artboard is the
             circle's box, so position/size live in the SVG. Being a mask,
             one file works in any colour: it's filled with the colour of
             the section it sits on, which makes it read as a cut-out.
   ------------------------------------------------------------------------ */

.wp-block-group.is-style-vive-circle-image {
	--vive-ring-w: 7.2%;
	position: relative;
	aspect-ratio: 1;
	border-radius: 50%;
	padding: var(--vive-ring-w) !important;
	background-color: var(--wp--preset--color--accent); /* fallback ring */
}

.is-style-vive-circle-image > .wp-block-image { margin: 0; height: 100%; }

.is-style-vive-circle-image img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
}

.is-style-vive-circle-image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--vive-cut, var(--wp--preset--color--contrast-2));
	-webkit-mask: url(../images/brand/v-chevron.svg) center / 100% 100% no-repeat;
	        mask: url(../images/brand/v-chevron.svg) center / 100% 100% no-repeat;
	pointer-events: none;
}

/* Cut-out colour follows the section background. */
.has-base-background-color       { --vive-cut: var(--wp--preset--color--base); }
.has-base-2-background-color     { --vive-cut: var(--wp--preset--color--base-2); }
.has-base-3-background-color     { --vive-cut: var(--wp--preset--color--base-3); }
.has-contrast-background-color   { --vive-cut: var(--wp--preset--color--contrast); }
.has-contrast-2-background-color { --vive-cut: var(--wp--preset--color--contrast-2); }
.has-green-background-color      { --vive-cut: var(--wp--preset--color--green); }
.has-leaf-background-color       { --vive-cut: var(--wp--preset--color--leaf); }
.has-accent-background-color     { --vive-cut: var(--wp--preset--color--accent); }

/* ...but the circle's own background is its ring, not its context. */
.is-style-vive-circle-image.has-background { --vive-cut: inherit; }

.is-style-vive-circle-image.vive-circle-lg { max-width: 520px; margin-inline: auto; }

@media (max-width: 781px) {
	.is-style-vive-circle-image.vive-circle-lg { max-width: min(78vw, 360px); }
}

/* 7. Logo banner + backgrounds --------------------------------------------- */

.vive-banner__strap strong { font-weight: 900; }

@media (max-width: 781px) {
	.vive-banner .vive-logo img { width: min(240px, 65vw) !important; }
	.vive-banner__strap { text-align: center; }
}

.vive-pattern-bg {
	background-image: url(../images/placeholders/pattern-v-tile.svg);
	background-size: 180px auto;
	background-repeat: repeat;
}

/* 8. Forms (Kadence Advanced Form) ------------------------------------------
   Labels in a left column, controls in a right column (>= 600px); stacked on
   phones. Radio and checkbox options sit inline in the right column, and the
   file input, Turnstile and Submit all line up with the inputs.

   Works through Kadence's own CSS variables where it can, set one notch more
   specific than the per-form CSS Kadence prints, so the form's Kadence colour
   settings can be left on Default. Text colour follows the section: Black
   Green on light/grey bands (white fails contrast there), white on dark ones. */

body .wp-block-kadence-advanced-form {
	--vive-label-w: 10rem;              /* label column */
	--vive-col-gap: 1.25rem;            /* gap between the columns */
	--vive-form-ink: currentColor;      /* labels, options, focus ring */

	--kb-form-font-size: var(--wp--preset--font-size--small);
	--kb-form-line-height: 1.5;
	--kb-form-text-color: var(--wp--preset--color--contrast);
	--kb-form-background-color: var(--wp--preset--color--base);
	--kb-form-border-width: 2px;
	--kb-form-border-color: transparent;
	--kb-form-border-radius: 0;
	--kb-form-v-padding: 0.75rem;
	--kb-form-h-padding: 1rem;
	--kb-form-placeholder-color: var(--wp--preset--color--grey-80);
	--kb-form-check-highlight-color: var(--wp--preset--color--green);
	color: var(--vive-form-ink);
}

/* On white and grey bands the form text is Black Green. */
:is(.has-base-background-color, .has-grey-20-background-color, .has-base-2-background-color, .has-base-3-background-color) .wp-block-kadence-advanced-form {
	--vive-form-ink: var(--wp--preset--color--contrast);
}

body .wp-block-kadence-advanced-form .kb-advanced-form { display: flex; flex-direction: column; gap: 1.1rem; }

/* Every row: label | control. */
body .wp-block-kadence-advanced-form .kb-adv-form-field {
	display: grid;
	grid-template-columns: var(--vive-label-w) minmax(0, 1fr);
	align-items: center;
	column-gap: var(--vive-col-gap);
	row-gap: 0.4rem;
	margin: 0;
}

/* Conditional fields (e.g. "Other") must stay hidden when Kadence hides them. */
body .wp-block-kadence-advanced-form .kb-adv-form-field[hidden] { display: none; }

body .wp-block-kadence-advanced-form .kb-adv-form-field .kb-adv-form-label {
	margin: 0;
	padding: 0;
	color: var(--vive-form-ink);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	line-height: 1.3;
}

/* Required asterisk: Kadence's red is unreadable on grey; use the text colour, bold. */
body .wp-block-kadence-advanced-form .kb-adv-form-required {
	margin-left: 0.15em;
	color: inherit;
	font-weight: 700;
}

/* Text inputs and textarea. */
body .wp-block-kadence-advanced-form .kb-advanced-form :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], select, textarea) {
	width: 100%;
	min-height: 3.25rem;
	border: 2px solid transparent;
	border-radius: 0;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	padding: 0.75rem 1rem;
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	box-shadow: none;
}

/* Twentig One fades any input showing its placeholder to 65% (":placeholder-shown"),
   and Kadence gives every field an empty placeholder, so empty fields went grey.
   Keep fields solid; the placeholder text itself is dimmed by its own colour. */
body .wp-block-kadence-advanced-form .kb-advanced-form :placeholder-shown { opacity: 1; }

body .wp-block-kadence-advanced-form .kb-advanced-form textarea { min-height: 8rem; resize: vertical; }
body .wp-block-kadence-advanced-form .kb-adv-form-field:has(textarea) .kb-adv-form-label { align-self: start; padding-top: 0.9rem; }

/* One focus style for everything, in the section's text colour. */
body .wp-block-kadence-advanced-form .kb-advanced-form :is(input, textarea, select, button):focus-visible {
	outline: 3px solid var(--vive-form-ink);
	outline-offset: 2px;
}
body .wp-block-kadence-advanced-form .kb-advanced-form :is(input[type="text"], input[type="email"], input[type="tel"], textarea, select):focus {
	border-color: var(--wp--preset--color--green);
}

/* Radio groups and the privacy checkbox (both are fieldsets).
   The fieldset spans both columns; padding puts its options in the right-hand
   column, and the visible legend is pulled back into the label column.
   (A floated legend becomes an ordinary flex item, so it can be laid out.) */
body .wp-block-kadence-advanced-form .kb-adv-form-field:has(> fieldset) { display: block; }

body .wp-block-kadence-advanced-form fieldset.kb-radio-check-item-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1.75rem;
	min-width: 0;
	margin: 0;
	padding: 0 0 0 calc(var(--vive-label-w) + var(--vive-col-gap));
	border: 0;
}

body .wp-block-kadence-advanced-form fieldset.kb-radio-check-item-wrap > legend.kb-adv-form-label:not(.screen-reader-text) {
	float: left;
	flex: 0 0 var(--vive-label-w);
	margin-left: calc(-1 * (var(--vive-label-w) + var(--vive-col-gap)));
	margin-right: calc(var(--vive-col-gap) - 1.75rem); /* undo the option gap so option 1 starts in column 2 */
}

body .wp-block-kadence-advanced-form .kb-radio-check-item {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0;
}

body .wp-block-kadence-advanced-form .kb-radio-check-item label {
	padding: 0;
	color: var(--vive-form-ink);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
	cursor: pointer;
}

body .wp-block-kadence-advanced-form .kb-radio-check-item label a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* Kadence's custom-drawn radios / checkboxes: bigger, square-edged checkbox, white. */
body .wp-block-kadence-advanced-form .kb-advanced-form :is(input[type="radio"], input[type="checkbox"]) {
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	min-width: 1.25rem;
	margin: 0;
	transform: none;
	border: 2px solid var(--wp--preset--color--base);
	background: var(--wp--preset--color--base);
	cursor: pointer;
}
body .wp-block-kadence-advanced-form .kb-advanced-form input[type="checkbox"] { border-radius: 0; }
body .wp-block-kadence-advanced-form .kb-advanced-form :is(input[type="radio"], input[type="checkbox"]):checked {
	border-color: var(--wp--preset--color--green);
	background: var(--wp--preset--color--green);
}

/* File upload: a white field like the others, full width of column 2 so the
   chosen file name shows in full; the browse button is a Valley Green button. */
body .wp-block-kadence-advanced-form .kb-advanced-form input[type="file"] {
	width: 100%;
	min-height: 3.25rem;
	padding: 0.45rem;
	border: 2px solid transparent;
	border-radius: 0;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	cursor: pointer;
}
body .wp-block-kadence-advanced-form .kb-advanced-form input[type="file"]::file-selector-button {
	margin-right: 1rem;
	padding: 0.6rem 1.1rem;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--base);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
body .wp-block-kadence-advanced-form .kb-advanced-form input[type="file"]:hover::file-selector-button {
	background: var(--wp--preset--color--contrast);
}

/* Turnstile and Submit sit in column 2, under the inputs. */
body .wp-block-kadence-advanced-form :is(.wp-block-kadence-advanced-form-captcha, .kb-submit-field) > * {
	grid-column: 2;
	justify-self: start;
}
body .wp-block-kadence-advanced-form .wp-block-kadence-advanced-form-captcha { min-height: 65px; } /* Turnstile's height: no jump when it loads */

body .wp-block-kadence-advanced-form .kb-advanced-form .kb-adv-form-submit-button {
	min-width: 12rem;
	padding: 0.85rem 2rem;
	border: 2px solid var(--wp--preset--color--base);
	border-radius: 0;
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--base);
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	line-height: 1.3;
	cursor: pointer;
	min-width: min(100%, 300px);
}
body .wp-block-kadence-advanced-form .kb-advanced-form .kb-adv-form-submit-button:is(:hover, :focus-visible) {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
}

/* Kadence's success / error messages. */
body .wp-block-kadence-advanced-form :is(.kb-adv-form-message, .kb-adv-form-success, .kb-adv-form-warning) {
	border-radius: 0;
	font-size: var(--wp--preset--font-size--small);
}

/* Phones: labels above controls, everything full width. */
@media (max-width: 599px) {
	body .wp-block-kadence-advanced-form .kb-adv-form-field { grid-template-columns: minmax(0, 1fr); }
	body .wp-block-kadence-advanced-form .kb-adv-form-field:has(textarea) .kb-adv-form-label { padding-top: 0; }
	body .wp-block-kadence-advanced-form fieldset.kb-radio-check-item-wrap { padding-left: 0; gap: 0.6rem 1.25rem; }
	body .wp-block-kadence-advanced-form fieldset.kb-radio-check-item-wrap > legend.kb-adv-form-label:not(.screen-reader-text) {
		flex-basis: 100%;
		margin: 0;
	}
	body .wp-block-kadence-advanced-form :is(.wp-block-kadence-advanced-form-captcha, .kb-submit-field) > * { grid-column: 1; }
}

/* CV upload row in the placeholder form (delete with §10). */
.vive-upload-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
	margin-top: var(--wp--preset--spacing--40);
}
.vive-upload-row h3 { margin: 0 0 0.5rem; font-size: var(--wp--preset--font-size--large); font-weight: 700; }
.vive-upload-row p { margin: 0; max-width: 28em; font-size: var(--wp--preset--font-size--small); }

/* 9. Footer ----------------------------------------------------------------- */

.vive-footer .vive-logo img { width: clamp(140px, 14vw, 190px); height: auto; }

/* Stacked footer (< 1024px): text/flex centring is Twentig's tw-md-text-center /
   tw-md-justify-center on the blocks; the logo image just needs centring. */
@media (max-width: 1023px) {
	.vive-footer .vive-logo { text-align: center; } /* the img is inline in a full-width figure */
}

/* 9b. Inner pages (templates/page.html – privacy policy, opportunities…) ---
   The global heading sizes are tuned for the one-page sections. Running copy
   on inner pages needs a quieter scale. */

.vive-page .wp-block-post-content h2 { font-size: var(--wp--preset--font-size--x-large); margin-top: var(--wp--preset--spacing--50); }
.vive-page .wp-block-post-content h3 { font-size: var(--wp--preset--font-size--large); margin-top: var(--wp--preset--spacing--40); color: var(--wp--preset--color--accent); }
.vive-page .wp-block-post-content :is(h4, h5, h6) { font-size: var(--wp--preset--font-size--medium); font-weight: 700; margin-top: var(--wp--preset--spacing--30); }
.vive-page .wp-block-post-content h5 { font-style: italic; }
.vive-page .wp-block-post-content :is(p, li:not(.vive-toc__item)) a { text-decoration: underline; }
.vive-page .wp-block-post-content :is(.wp-block-columns, .wp-block-column) > :first-child { margin-top: 0; }
.vive-page .wp-block-post-content li + li { margin-top: 0.35em; }

/* Heading style "Section banner": a band with the lime bar from Why Vive. */
.wp-block-heading.is-style-vive-section {
	background: var(--wp--preset--color--contrast);
	border-left: 12px solid var(--wp--preset--color--accent);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--large) !important;
	font-weight: 700;
	line-height: 1.3;
	color: var(--wp--preset--color--base) !important;
	margin-top: var(--wp--preset--spacing--60) !important;
}

/* Sticky sidebar (Group with class "vive-sticky") – e.g. the contents list.
   Sits under the header when it's showing and moves up when the header hides
   (Twentig scroll-up) or isn't there at all (coming-soon gate). */
.vive-sticky {
	position: sticky;
	top: calc(var(--vive-header-h) + 1.5rem);
	transition: top 0.3s;
}
body:has(header.wp-block-template-part.is-hidden) .vive-sticky,
body:not(:has(header.wp-block-template-part)) .vive-sticky { top: 1.5rem; }

@media (prefers-reduced-motion: reduce) {
	.vive-sticky { transition: none; }
}

/* Table of contents block (blocks/table-of-contents) */
.wp-block-vive-table-of-contents {
	max-height: calc(100vh - var(--vive-header-h) - 6rem);
	overflow-y: auto;
	border-left: 2px solid color-mix(in srgb, currentColor 20%, transparent);
	padding-left: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--small);
}
.vive-toc__title {
	margin: 0 0 var(--wp--preset--spacing--15);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.vive-toc__list { list-style: none; margin: 0; padding: 0; }
.vive-toc__item { margin: 0; line-height: 1.35; }
.vive-toc__item + .vive-toc__item { margin-top: 0.55em; }
.vive-toc__item--depth-0:not(:first-child) { margin-top: 1.1em; }
.vive-toc__item--depth-0 > a { font-weight: 700; }
.vive-toc__item--depth-1 { padding-left: 0.9em; }
.vive-toc__item--depth-2 { padding-left: 1.8em; }
.wp-block-vive-table-of-contents a { color: inherit; text-decoration: none; opacity: 0.8; }
.wp-block-vive-table-of-contents a:is(:hover, :focus-visible) { opacity: 1; text-decoration: underline; }
.wp-block-vive-table-of-contents a[aria-current] {
	opacity: 1;
	color: var(--wp--preset--color--accent);
	font-weight: 700;
}

/* 10. Placeholders – delete this block once real assets/forms are in ------ */

.vive-placeholder {
	border: 2px dashed color-mix(in srgb, currentColor 45%, transparent);
	padding: var(--wp--preset--spacing--20);
}

.vive-placeholder__label {
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.75;
	margin: 0 0 var(--wp--preset--spacing--15) !important;
}

.vive-placeholder input[readonly] { pointer-events: none; }


/* 11. Horizontal scroller – testimonials (Group class "vive-scroller") ---
   Cards are core Quote blocks (class "vive-testimonial"). Works without JS
   (scroll-snap row with a native scrollbar); assets/js/scroller.js adds
   .is-enhanced, buttons, progress bar and "Read more". */

.vive-scroller {
	--vive-card-w: min(86%, 25rem);
	--vive-fade: 4rem; /* edge fade width */
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: var(--wp--preset--spacing--20); /* room for the native scrollbar */
}

.vive-scroller:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
	.vive-scroller { scroll-behavior: smooth; }
}

/* Phones: a narrower card, gap and fade so the next card visibly peeks in. */
@media (max-width: 781px) {
	.wp-block-group.vive-scroller { --vive-card-w: 80%; --vive-fade: 1.5rem; gap: var(--wp--preset--spacing--20); }
	.wp-block-quote.vive-testimonial::before { font-size: 4rem; }
}

/* Card: Racing Green, big Lime quote mark, Lime base bar (as the About cards). */
.wp-block-quote.vive-testimonial {
	flex: 0 0 var(--vive-card-w);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 0;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--30) calc(var(--vive-bar) + var(--wp--preset--spacing--30));
	box-shadow: inset 0 calc(-1 * var(--vive-bar)) 0 var(--wp--preset--color--accent);
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
	line-height: 1.6;
}

.wp-block-quote.vive-testimonial::before {
	content: "\201C";
	display: block;
	height: 0.55em;
	margin-bottom: var(--wp--preset--spacing--15);
	color: var(--wp--preset--color--accent);
	font-size: 5rem;
	font-weight: 900;
	line-height: 1;
}

.vive-testimonial p { margin: 0; }
.vive-testimonial p + p { margin-top: 0.85em; }

/* Enhanced (JS on): clamp long quotes to ~9 lines with a fade + "Read more". */
.vive-scroller.is-enhanced {
	padding-bottom: 0;
	scrollbar-width: none; /* the controls replace it */
}
.vive-scroller.is-enhanced::-webkit-scrollbar { display: none; }

.vive-scroller.is-enhanced .vive-testimonial__body {
	max-height: calc(1.6em * 9);
	overflow: hidden;
	-webkit-mask-image: linear-gradient(#000 70%, transparent);
	        mask-image: linear-gradient(#000 70%, transparent);
}
.vive-scroller.is-enhanced :is(.vive-testimonial__body.is-short, .is-expanded .vive-testimonial__body) {
	max-height: none;
	-webkit-mask-image: none;
	        mask-image: none;
}

/* While a card is open, the others keep their own (clamped) height instead of stretching. */
.wp-block-group.vive-scroller.is-enhanced:has(.is-expanded) { align-items: flex-start; }

.vive-testimonial__more {
	align-self: flex-start;
	margin-top: auto;
	padding: var(--wp--preset--spacing--15) 0 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--accent);
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	cursor: pointer;
}

/* Edge fades while there's more to scroll that way. */
.vive-scroller.is-enhanced:not(.at-end) {
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - var(--vive-fade)), transparent);
	        mask-image: linear-gradient(to right, #000 calc(100% - var(--vive-fade)), transparent);
}
.vive-scroller.is-enhanced:not(.at-start):not(.at-end) {
	-webkit-mask-image: linear-gradient(to right, transparent, #000 var(--vive-fade), #000 calc(100% - var(--vive-fade)), transparent);
	        mask-image: linear-gradient(to right, transparent, #000 var(--vive-fade), #000 calc(100% - var(--vive-fade)), transparent);
}
.vive-scroller.is-enhanced.at-end:not(.at-start) {
	-webkit-mask-image: linear-gradient(to right, transparent, #000 var(--vive-fade));
	        mask-image: linear-gradient(to right, transparent, #000 var(--vive-fade));
}

/* Controls: progress bar + previous / next. */
.vive-scroller__controls {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--15);
	margin-top: var(--wp--preset--spacing--30);
}
.vive-scroller__controls[hidden] { display: none; }

.vive-scroller__progress {
	flex: 1;
	height: 4px;
	margin-right: var(--wp--preset--spacing--20);
	background: color-mix(in srgb, currentColor 20%, transparent);
	overflow: hidden;
}
.vive-scroller__progress span {
	display: block;
	height: 100%;
	background: var(--wp--preset--color--accent);
}
@media (prefers-reduced-motion: no-preference) {
	.vive-scroller__progress span { transition: transform 0.15s linear; }
}

.vive-scroller__button {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 2px solid var(--wp--preset--color--base);
	border-radius: 0;
	background: transparent;
	color: var(--wp--preset--color--base);
	cursor: pointer;
}
.vive-scroller__button:is(:hover, :focus-visible):not(:disabled) {
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}
.vive-scroller__button:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 2px; }
.vive-scroller__button:disabled { opacity: 0.35; cursor: default; }

/* In the editor: wrap the cards into a grid so every quote is easy to edit. */
.editor-styles-wrapper .vive-scroller {
	flex-wrap: wrap !important;
	overflow: visible;
}
.editor-styles-wrapper .vive-scroller > .vive-testimonial { flex: 1 1 18rem; }
