/* =========================================================
   ROCKING BLOCK BUILDER: SHARED FOUNDATIONS
   ========================================================= */

/*
 * Keep scheduled blocks in cached markup so the browser can transition at the
 * configured boundary, including while a page remains open.
 */
.psc-es-scheduled.psc-es-schedule--upcoming,
.psc-es-scheduled.psc-es-schedule--expired {
	display: none !important;
}

.psc-es-enhanced,
.psc-es-enhanced * {
	box-sizing: border-box;
}

.psc-es-prevent-shrink {
	flex: 0 0 auto !important;
	min-width: min-content;
}

/* =========================================================
   LINKED NATIVE CONTAINERS
   The stretched link is added only to the rendered front end.
   ========================================================= */

.psc-es-linked-container {
	cursor: pointer;
	isolation: isolate;
	position: relative;
}

.psc-es-linked-container__stretched-link::after {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	content: "";
}

.psc-es-linked-container__stretched-link:focus-visible::after {
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.92);
	outline: 3px solid var(--wp--preset--color--brand-primary, #00205c);
	outline-offset: 3px;
}

/* =========================================================
   HOVER AND KEYBOARD-FOCUS STATES
   ========================================================= */

.psc-es-hover {
	transition-duration: var(--psc-es-hover-duration, 250ms);
	transition-property: background-color, border-color, box-shadow, color, transform;
	transition-timing-function: ease;
}

.psc-es-hover:hover,
.psc-es-hover:focus-within {
	background-color: var(--psc-es-hover-background);
	border-color: var(--psc-es-hover-border);
	color: var(--psc-es-hover-text);
}

.wp-block-button.psc-es-hover > .wp-block-button__link {
	transition-duration: var(--psc-es-hover-duration, 250ms);
	transition-property: background-color, border-color, box-shadow, color, transform;
}

.wp-block-button.psc-es-hover > .wp-block-button__link:hover,
.wp-block-button.psc-es-hover > .wp-block-button__link:focus-visible {
	background-color: var(--psc-es-hover-background);
	border-color: var(--psc-es-hover-border);
	color: var(--psc-es-hover-text);
}

.psc-es-hover--lift:hover,
.psc-es-hover--lift:focus-within {
	transform: translateY(-6px);
}

.psc-es-hover--grow:hover,
.psc-es-hover--grow:focus-within {
	transform: scale(1.035);
}

.psc-es-hover--shrink:hover,
.psc-es-hover--shrink:focus-within {
	transform: scale(0.975);
}

.psc-es-hover--tilt:hover,
.psc-es-hover--tilt:focus-within {
	transform: rotate(-1.5deg) translateY(-2px);
}

.psc-es-hover--shadow:hover,
.psc-es-hover--shadow:focus-within {
	box-shadow: var(--wp--preset--shadow--elevated, 0 16px 40px rgba(0, 32, 92, 0.16));
}

.psc-es-hover--pulse:hover,
.psc-es-hover--pulse:focus-within {
	animation: psc-es-hover-pulse 900ms ease-in-out infinite alternate;
}

@keyframes psc-es-hover-pulse {
	from { transform: scale(1); }
	to { transform: scale(1.025); }
}

/* =========================================================
   ANIMATION ON SCROLL
   Content remains visible until JavaScript confirms readiness.
   ========================================================= */

.psc-es-motion-ready .psc-es-animate {
	opacity: 0;
	transition-delay: var(--psc-es-animation-delay, 0ms);
	transition-duration: var(--psc-es-animation-duration, 600ms);
	transition-property: opacity, transform;
	transition-timing-function: var(--psc-es-animation-easing, ease-out);
	will-change: opacity, transform;
}

.psc-es-motion-ready .psc-es-animate--fade-up { transform: translate3d(0, 28px, 0); }
.psc-es-motion-ready .psc-es-animate--fade-down { transform: translate3d(0, -28px, 0); }
.psc-es-motion-ready .psc-es-animate--fade-left { transform: translate3d(28px, 0, 0); }
.psc-es-motion-ready .psc-es-animate--fade-right { transform: translate3d(-28px, 0, 0); }
.psc-es-motion-ready .psc-es-animate--zoom-in { transform: scale(0.94); }
.psc-es-motion-ready .psc-es-animate--zoom-out { transform: scale(1.06); }

.psc-es-motion-ready .psc-es-animate.is-visible {
	opacity: 1;
	transform: none;
}

/* =========================================================
   SVG ICON BLOCK
   ========================================================= */

.psc-es-svg-icon {
	align-items: center;
	color: var(--psc-es-icon-color, currentColor);
	display: inline-flex;
	height: var(--psc-es-icon-size, 32px);
	justify-content: center;
	line-height: 1;
	transition: color 180ms ease, transform 180ms ease;
	width: var(--psc-es-icon-size, 32px);
}

.psc-es-svg-icon img,
.psc-es-svg-icon svg,
.psc-es-svg-icon__mask {
	display: block;
	height: 100%;
	max-width: none;
	width: 100%;
}

/* Keep RBB line icons accurate even when a theme applies broad SVG fills. */
.psc-es-svg-icon svg,
.psc-es-svg-icon svg path {
	fill: none !important;
	stroke: currentColor !important;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.psc-es-svg-icon__mask {
	background: currentColor;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
}

a:hover > .psc-es-svg-icon,
a:focus-visible > .psc-es-svg-icon,
.psc-es-svg-icon:hover,
.psc-es-svg-icon:focus-within {
	color: var(--psc-es-icon-hover, currentColor);
}

/* =========================================================
   ACCESSIBLE CONTENT CAROUSEL
   ========================================================= */

.psc-es-carousel {
	position: relative;
}

.psc-es-carousel__viewport {
	overflow: hidden;
	scroll-behavior: smooth;
}

.psc-es-carousel__track {
	display: grid;
	gap: var(--psc-es-carousel-gap, 1.5rem);
	grid-auto-columns: calc((100% - ((var(--psc-es-carousel-desktop, 3) - 1) * var(--psc-es-carousel-gap, 1.5rem))) / var(--psc-es-carousel-desktop, 3));
	grid-auto-flow: column;
	grid-template-columns: none !important;
}

.psc-es-carousel__track > * {
	min-width: 0;
	scroll-snap-align: start;
}

.psc-es-carousel__arrows {
	display: flex;
	gap: 0.75rem;
	justify-content: flex-end;
	margin-top: 1rem;
}

.psc-es-carousel__arrows button,
.psc-es-carousel__dots button {
	align-items: center;
	background: var(--wp--preset--color--brand-primary, #00205c);
	border: 2px solid var(--wp--preset--color--brand-primary, #00205c);
	color: var(--wp--preset--color--white, #fff);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
}

.psc-es-carousel__arrows button {
	border-radius: 999px;
	font-size: 1.7rem;
	line-height: 1;
}

.psc-es-carousel__arrows button:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.psc-es-carousel__arrows button:hover,
.psc-es-carousel__arrows button:focus-visible,
.psc-es-carousel__dots button:hover,
.psc-es-carousel__dots button:focus-visible,
.psc-es-carousel__dots button.is-active {
	background: var(--wp--preset--color--brand-secondary, #036636);
	border-color: var(--wp--preset--color--brand-secondary, #036636);
}

.psc-es-carousel__dots {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	justify-content: center;
	margin-top: 1rem;
}

.psc-es-carousel__dots button {
	background: transparent;
	border-radius: 999px;
	min-height: 22px;
	min-width: 22px;
	padding: 0;
}

/* =========================================================
   TICKER BLOCK
   ========================================================= */

.psc-es-ticker {
	overflow: hidden;
	position: relative;
}

.psc-es-ticker__track {
	display: flex;
	width: max-content;
}

.psc-es-ticker__lane {
	align-items: center;
	animation: psc-es-ticker-left var(--psc-es-ticker-duration, 30s) linear infinite;
	display: flex;
	flex: 0 0 auto;
	gap: clamp(2rem, 6vw, 6rem);
	min-width: max-content;
	padding-inline: clamp(1rem, 3vw, 3rem);
	white-space: nowrap;
}

.psc-es-ticker__lane > * {
	flex: 0 0 auto;
	max-width: none;
	margin-block: 0;
	white-space: nowrap;
}

.psc-es-ticker__pause {
	position: absolute;
	right: 0.5rem;
	bottom: 0.5rem;
	z-index: 3;
	display: grid;
	width: 2.5rem;
	height: 2.5rem;
	min-width: 2.5rem;
	min-height: 2.5rem;
	place-items: center;
	padding: 0;
	border: 2px solid currentColor;
	border-radius: 50%;
	font-size: 0;
	line-height: 1;
}

.psc-es-ticker__pause::before {
	font-size: 0.95rem;
	content: "Ⅱ";
}

.psc-es-ticker__pause[aria-pressed="true"]::before {
	content: "▶";
}

.psc-es-ticker.is-paused .psc-es-ticker__lane {
	animation-play-state: paused !important;
}

.psc-es-ticker--right .psc-es-ticker__lane {
	animation-name: psc-es-ticker-right;
}

.psc-es-ticker--pauses:hover .psc-es-ticker__lane,
.psc-es-ticker--pauses:focus-within .psc-es-ticker__lane {
	animation-play-state: paused;
}

@keyframes psc-es-ticker-left {
	to { transform: translateX(-100%); }
}

@keyframes psc-es-ticker-right {
	from { transform: translateX(-100%); }
	to { transform: translateX(0); }
}

/* =========================================================
   QUERY LOOP FILTERS
   ========================================================= */

.psc-es-query-controls {
	background: var(--wp--preset--color--mist, #eef2f6);
	border: 1px solid var(--wp--preset--color--border, #d6dce5);
	border-radius: 0.65rem;
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
	padding: clamp(1rem, 2.5vw, 1.75rem);
}

.psc-es-query-fields {
	align-items: end;
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}

.psc-es-query-field {
	display: flex;
	flex-direction: column;
	font-weight: 600;
	gap: 0.35rem;
}

.psc-es-query-field input,
.psc-es-query-field select {
	background: var(--wp--preset--color--white, #fff);
	border: 1px solid var(--wp--preset--color--border, #d6dce5);
	border-radius: 0.35rem;
	color: var(--wp--preset--color--ink, #17212b);
	font: inherit;
	min-height: 44px;
	padding: 0.6rem 0.75rem;
	width: 100%;
}

.psc-es-query-field input:focus,
.psc-es-query-field select:focus {
	border-color: var(--wp--preset--color--brand-primary, #00205c);
	box-shadow: 0 0 0 3px rgba(0, 32, 92, 0.2);
	outline: 2px solid transparent;
}

.psc-es-query-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.psc-es-query-actions button {
	border: 2px solid var(--wp--preset--color--brand-secondary, #036636);
	border-radius: 999px;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	min-height: 44px;
	padding: 0.65rem 1rem;
}

.psc-es-query-apply {
	background: var(--wp--preset--color--brand-secondary, #036636);
	color: var(--wp--preset--color--white, #fff);
}

.psc-es-query-clear {
	background: transparent;
	color: var(--wp--preset--color--brand-secondary, #036636);
}

.psc-es-query-actions button:hover,
.psc-es-query-actions button:focus-visible {
	background: var(--wp--preset--color--brand-primary, #00205c);
	border-color: var(--wp--preset--color--brand-primary, #00205c);
	color: var(--wp--preset--color--white, #fff);
}

.psc-es-query-progress-wrap {
	margin-top: 1rem;
}

.psc-es-query-progress-wrap label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.psc-es-query-progress {
	accent-color: var(--wp--preset--color--brand-secondary, #036636);
	display: block;
	height: 0.7rem;
	width: 100%;
}

.psc-es-query-status {
	margin: 0.75rem 0 0;
	min-height: 1.5em;
}

.psc-es-query-filter-form[aria-busy="true"] :where(input,select,textarea,button) {
	cursor: wait;
	opacity: 0.62;
}

.psc-es-query-results:focus {
	outline: 2px solid var(--wp--preset--color--brand-highlight, #2a9fdc);
	outline-offset: 6px;
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
	.psc-es-hover,
	.psc-es-hover *,
	.psc-es-motion-ready .psc-es-animate,
	.psc-es-carousel__viewport,
	.psc-es-svg-icon {
		animation: none !important;
		scroll-behavior: auto !important;
		transition: none !important;
	}

	.psc-es-motion-ready .psc-es-animate {
		opacity: 1 !important;
		transform: none !important;
	}

	.psc-es-ticker__track { width: auto; }

	.psc-es-ticker__lane {
		animation: none !important;
		min-width: 0;
		white-space: nowrap;
	}

	.psc-es-ticker__lane[aria-hidden="true"] {
		display: none;
	}
}

/* Keep screen-reader-only status content available in every theme. */
.psc-es-carousel .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* =========================================================
   RBB 3.0 carousel controls and motion
   ========================================================= */
.psc-es-carousel__track {
	transition: transform var(--psc-es-transition, 450ms) ease, opacity var(--psc-es-transition, 450ms) ease;
	will-change: transform;
}

.psc-es-carousel :where(.psc-es-carousel__previous,.psc-es-carousel__next,.psc-es-carousel__pause) {
	box-sizing: border-box;
	display: inline-grid;
	width: 2.75rem;
	height: 2.75rem;
	min-width: 2.75rem;
	min-height: 2.75rem;
	place-items: center;
	margin: 0;
	padding: 0;
	border: 2px solid var(--wp--preset--color--brand-primary, #00205c);
	border-radius: 999px;
	color: var(--wp--preset--color--base, #fff);
	background: var(--wp--preset--color--brand-primary, #00205c);
	font: inherit;
	line-height: 1;
}

.psc-es-carousel :where(.psc-es-carousel__previous,.psc-es-carousel__next,.psc-es-carousel__pause):hover,
.psc-es-carousel :where(.psc-es-carousel__previous,.psc-es-carousel__next,.psc-es-carousel__pause):focus-visible {
	border-color: var(--wp--preset--color--brand-secondary, #036636);
	color: var(--wp--preset--color--base, #fff);
	background: var(--wp--preset--color--brand-secondary, #036636);
}

.psc-es-carousel :where(.psc-es-carousel__previous,.psc-es-carousel__next,.psc-es-carousel__pause):disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.psc-es-carousel .psc-es-control-icon {
	display: block;
	width: 1.25rem;
	height: 1.25rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.psc-es-carousel__pause::before { content: none !important; }

.psc-es-carousel__dots button {
	box-sizing: border-box;
	width: 0.75rem;
	height: 0.75rem;
	min-width: 0.75rem;
	min-height: 0.75rem;
	padding: 0;
	border: 2px solid var(--wp--preset--color--brand-primary, #00205c);
	border-radius: 999px;
	background: transparent;
}

.psc-es-carousel__dots button:is(:hover,:focus-visible,.is-active) {
	border-color: var(--wp--preset--color--brand-secondary, #036636);
	background: var(--wp--preset--color--brand-secondary, #036636);
}

.psc-es-carousel__arrows:has(> button[hidden]),
.psc-es-carousel__dots[hidden] { display: none; }

@media (max-width: 1024px) {
	.psc-es-carousel__track {
		grid-auto-columns: calc((100% - ((var(--psc-es-carousel-tablet, 2) - 1) * var(--psc-es-carousel-gap, 1.5rem))) / var(--psc-es-carousel-tablet, 2));
	}
}

@media (max-width: 782px) {
	.psc-es-carousel__track {
		grid-auto-columns: calc((100% - ((var(--psc-es-carousel-mobile, 1) - 1) * var(--psc-es-carousel-gap, 1.5rem))) / var(--psc-es-carousel-mobile, 1));
	}
}

/* RBB 3.1 theme contract and SVG-only interaction controls. */
:where(.psc-es-carousel,.psc-es-ticker) :where(.psc-es-carousel__previous,.psc-es-carousel__next,.psc-es-carousel__pause,.psc-es-ticker__pause) {
	color: var(--rbb-color-on-primary, Canvas);
	background: var(--rbb-color-primary, CanvasText);
}

:where(.psc-es-carousel,.psc-es-ticker) :where(.psc-es-carousel__previous,.psc-es-carousel__next,.psc-es-carousel__pause,.psc-es-ticker__pause):is(:hover,:focus-visible) {
	color: var(--rbb-color-on-primary, Canvas);
	background: var(--rbb-color-primary-hover, CanvasText);
}

:where(.psc-es-carousel,.psc-es-ticker) :where(button,a):focus-visible {
	outline: 3px solid var(--rbb-color-focus, Highlight);
	outline-offset: 3px;
}

.psc-es-ticker__pause::before,
.psc-es-ticker__pause[aria-pressed="true"]::before,
.psc-es-carousel__pause::before,
.psc-es-carousel__pause[aria-pressed="true"]::before {
	content: none !important;
}

.psc-es-ticker__pause .psc-es-control-icon {
	display: block;
	width: 1.25rem;
	height: 1.25rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* RBB 3.3: stable shared carousel height with optional adaptive height. */
.psc-es-carousel__viewport {
	transition: height 220ms ease;
}

.psc-es-carousel__track {
	align-items: center;
}

.psc-es-carousel[data-adaptive-height="1"] .psc-es-carousel__track {
	align-items: start;
}

.psc-es-ticker__logo {
	flex: 0 0 auto;
	width: auto;
	max-width: 6rem;
	height: 2rem;
	margin: 0;
}

.psc-es-ticker__logo img {
	display: block;
	width: auto;
	height: 100%;
	object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
	.psc-es-carousel__viewport { transition: none; }
}

/* RBB 3.4 responsive height, proportional logos, and layered icon roles. */
.psc-es-carousel[data-adaptive-height="1"] > .psc-es-carousel__viewport {
	min-height: 0;
	overflow: hidden;
}

.psc-es-carousel[data-adaptive-height="1"] > .psc-es-carousel__viewport > .psc-es-carousel__track {
	align-items: start;
}

.psc-es-carousel[data-adaptive-height="1"] > .psc-es-carousel__viewport > .psc-es-carousel__track > * {
	align-self: start;
	height: auto;
	min-height: 0;
}

.psc-es-logo-ticker {
	--psc-es-logo-height: 140px;
	--psc-es-logo-gap: 48px;
}

.psc-es-logo-ticker .psc-es-ticker__lane,
.psc-es-logo-ticker .psc-es-logo-ticker__editor-items > .block-editor-inner-blocks > .block-editor-block-list__layout {
	align-items: center;
	gap: var(--psc-es-logo-gap);
}

.psc-es-logo-ticker-item {
	position: relative;
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	height: var(--psc-es-logo-height);
	min-width: max(9rem, var(--psc-es-logo-height));
	padding: 0.75rem;
}

.psc-es-logo-ticker-item :where(.wp-block-image,img) {
	display: block;
	width: auto;
	max-width: min(18rem, calc(var(--psc-es-logo-height) * 2.4));
	height: auto;
	max-height: calc(var(--psc-es-logo-height) - 1.5rem);
	margin: 0;
	object-fit: contain;
}

.psc-es-logo-ticker-item__link {
	position: absolute;
	inset: 0;
	z-index: 2;
}

.psc-es-svg-icon .psc-es-icon-graphic--line,
.psc-es-heading-icon .psc-es-icon-graphic--line {
	fill: none !important;
	stroke: var(--psc-es-icon-primary, currentColor) !important;
}

.psc-es-svg-icon .psc-es-icon-graphic--multicolor,
.psc-es-heading-icon .psc-es-icon-graphic--multicolor {
	fill: none !important;
	stroke: none !important;
}

.psc-es-svg-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer,
.psc-es-heading-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer {
	stroke-width: 2 !important;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.psc-es-svg-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer--fill,
.psc-es-heading-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer--fill {
	fill: currentColor !important;
	stroke: none !important;
}

.psc-es-svg-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer--stroke,
.psc-es-heading-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer--stroke {
	fill: none !important;
	stroke: currentColor !important;
}

.psc-es-svg-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer--primary,
.psc-es-heading-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer--primary { color: var(--psc-es-icon-primary, currentColor); }
.psc-es-svg-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer--secondary,
.psc-es-heading-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer--secondary { color: var(--psc-es-icon-secondary, currentColor); }
.psc-es-svg-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer--accent,
.psc-es-heading-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer--accent { color: var(--psc-es-icon-accent, currentColor); }
.psc-es-svg-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer--detail,
.psc-es-heading-icon .psc-es-icon-graphic--multicolor .psc-es-icon-layer--detail { color: var(--psc-es-icon-detail, currentColor); }

.psc-es-heading-with-icon {
	display: inline-flex;
	align-items: center;
	gap: var(--psc-es-heading-icon-gap, 0.75rem);
}

.psc-es-heading-icon {
	display: inline-flex;
	flex: 0 0 auto;
	width: var(--psc-es-heading-icon-size, 2rem);
	height: var(--psc-es-heading-icon-size, 2rem);
}

.psc-es-heading-icon svg { width: 100%; height: 100%; }
.psc-es-heading-icon--before .psc-es-heading-icon { order: -1; }
.psc-es-heading-icon--after .psc-es-heading-icon { order: 1; }

@media (max-width: 782px) {
	.psc-es-logo-ticker-item {
		height: clamp(96px, var(--psc-es-logo-height), 180px);
		min-width: clamp(8rem, var(--psc-es-logo-height), 12rem);
	}
}
