/* ByteHive Sync Accordion */

.bh-sync {
	--bh-nav-width: 42%;
	--bh-gap: 60px;
	--bh-tile: 56px;
	--bh-tile-radius: 14px;
	--bh-icon: 22px;
	--bh-tile-bg: #141a24;
	--bh-tile-border: #1f2733;
	--bh-tile-bg-active: #12233a;
	--bh-tile-border-active: #2e90fa;
	--bh-icon-color: #7a8798;
	--bh-icon-color-active: #2e90fa;
	--bh-title: #e7ecf3;
	--bh-title-active: #fff;
	--bh-desc: #9aa4b2;
	--bh-desc-max: 420px;
	--bh-link: #fff;
	--bh-link-hover: #2e90fa;
	--bh-divider: #1a212c;
	--bh-bar: #1a212c;
	--bh-bar-active: #2e90fa;
	--bh-bar-width: 3px;
	--bh-pane-ratio: 16 / 11;
	--bh-pane-radius: 20px;
	--bh-pane-fit: cover;
	--bh-speed: 400ms;

	display: flex;
	align-items: flex-start;
	gap: var(--bh-gap);
}

.bh-sync__nav {
	flex: 0 0 var(--bh-nav-width);
	min-width: 0;
}

.bh-sync__visual {
	flex: 1 1 auto;
	min-width: 0;
	position: relative;
	aspect-ratio: var(--bh-pane-ratio);
	align-self: stretch;
}

.bh-sync--media-left {
	flex-direction: row-reverse;
}

/* ---------- rows ---------- */

.bh-sync__item {
	position: relative;
	border-bottom: 1px solid var(--bh-divider);
}

.bh-sync__item::before {
	content: "";
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: var(--bh-bar-width);
	background: var(--bh-bar);
	transition: background-color 300ms ease;
}

.bh-sync__item.is-active::before {
	background: var(--bh-bar-active);
}

/* Autoplay progress: a fill that runs down the active item's bar. */
.bh-sync--progress .bh-sync__item::after {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 0;
	width: var(--bh-bar-width);
	height: 100%;
	background: var(--bh-bar-active);
	transform: scaleY(0);
	transform-origin: top;
	opacity: 0;
}

.bh-sync--progress .bh-sync__item.is-active::before {
	background: var(--bh-bar);
}

.bh-sync--progress:not(.bh-is-stopped) .bh-sync__item.is-active::after {
	opacity: 1;
	animation: bh-sync-fill var(--bh-interval, 5000ms) linear forwards;
}

.bh-sync--progress.bh-is-paused .bh-sync__item.is-active::after {
	animation-play-state: paused;
}

/* Autoplay finished or was cancelled — fall back to a plain solid bar. */
.bh-sync--progress.bh-is-stopped .bh-sync__item.is-active::before {
	background: var(--bh-bar-active);
}

@keyframes bh-sync-fill {
	from { transform: scaleY(0); }
	to   { transform: scaleY(1); }
}

.bh-sync__head {
	display: flex;
	align-items: center;
	gap: 18px;
	width: 100%;
	padding: 5px 0 0 20px;
	margin: 0;
	border: 0;
	background: none;
	text-align: inherit;
	cursor: pointer;
	color: inherit;
	font: inherit;
	-webkit-appearance: none;
	appearance: none;
}

.bh-sync__head:focus-visible {
	outline: 2px solid var(--bh-tile-border-active);
	outline-offset: -2px;
}

.bh-sync__tile {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--bh-tile);
	height: var(--bh-tile);
	border-radius: var(--bh-tile-radius);
	background: var(--bh-tile-bg);
	border: 1px solid var(--bh-tile-border);
	color: var(--bh-icon-color);
	transition: background-color 300ms ease, border-color 300ms ease, color 300ms ease;
}

.bh-sync__tile svg {
	width: var(--bh-icon);
	height: var(--bh-icon);
	fill: currentColor;
}

.bh-sync__tile i {
	font-size: var(--bh-icon);
	line-height: 1;
}

.bh-sync__item.is-active .bh-sync__tile {
	background: var(--bh-tile-bg-active);
	border-color: var(--bh-tile-border-active);
	color: var(--bh-icon-color-active);
}

.bh-sync__title {
	color: var(--bh-title);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	transition: color 300ms ease;
}

.bh-sync__item.is-active .bh-sync__title {
	color: var(--bh-title-active);
}

/* ---------- collapsing body ---------- */

.bh-sync__body {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 350ms ease;
}

.bh-sync__item.is-active > .bh-sync__body {
	grid-template-rows: 1fr;
}

.bh-sync__body-inner {
	overflow: hidden;
	min-height: 0;
	padding-inline-start: calc(22px + var(--bh-tile) + 18px);
}

.bh-sync__item.is-active > .bh-sync__body > .bh-sync__body-inner {
	padding-bottom: 24px;
}

.bh-sync__desc, p.bh-sync__desc {
	margin: 0 0 5px;
	color: var(--bh-desc);
	font-size: 15px;
	line-height: 1.6;
	max-width: var(--bh-desc-max);
}


.bh-sync__link {
	display: inline-block;
	color: var(--bh-link);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color 200ms ease, border-color 200ms ease;
}

.bh-sync__link:hover,
.bh-sync__link:focus {
	color: var(--bh-link-hover);
	border-bottom-color: currentColor;
}

/* ---------- panel ---------- */

.bh-sync__pane {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity var(--bh-speed) ease, transform var(--bh-speed) ease;
}

.bh-sync__pane img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: var(--bh-pane-fit);
	border-radius: var(--bh-pane-radius);
}

.bh-sync__pane.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
}

.bh-sync--motion-zoom .bh-sync__pane {
	transform: scale(1.02);
}

.bh-sync--motion-slide .bh-sync__pane {
	transform: translateY(14px);
}

.bh-sync--motion-none .bh-sync__pane {
	transition: none;
	transform: none;
}

/* Targets linked by selector, styled by the theme; we only flip this class. */
.bh-is-active {
	display: block !important;
}

/* ---------- inline panel (stacked view) ---------- */

.bh-sync__inline-pane {
	display: none;
	margin-top: 18px;
}

.bh-sync__inline-pane img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--bh-pane-radius);
}

/* ---------- stacking ---------- */

@media (max-width: 1024px) {
	.bh-sync--stack-1024 {
		display: block;
	}

	.bh-sync--stack-1024 .bh-sync__visual {
		width: 100%;
		margin-top: 28px;
	}

	.bh-sync--stack-1024.bh-sync--mob-hide .bh-sync__visual,
	.bh-sync--stack-1024.bh-sync--mob-inline .bh-sync__visual {
		display: none;
	}

	.bh-sync--stack-1024.bh-sync--mob-inline .bh-sync__inline-pane {
		display: block;
	}
}

@media (max-width: 767px) {
	.bh-sync--stack-767 {
		display: block;
	}

	.bh-sync--stack-767 .bh-sync__visual {
		width: 100%;
		margin-top: 24px;
	}

	.bh-sync--stack-767.bh-sync--mob-hide .bh-sync__visual,
	.bh-sync--stack-767.bh-sync--mob-inline .bh-sync__visual {
		display: none;
	}

	.bh-sync--stack-767.bh-sync--mob-inline .bh-sync__inline-pane {
		display: block;
	}

	.bh-sync {
		--bh-tile: 48px;
		--bh-icon: 20px;
	}

	.bh-sync__title {
		font-size: 18px;
	}

	.bh-sync__body-inner {
		padding-inline-start: 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bh-sync *,
	.bh-sync *::before {
		transition-duration: 1ms !important;
	}

	.bh-sync__pane {
		transform: none !important;
	}

	.bh-sync--progress .bh-sync__item::after {
		animation: none !important;
		opacity: 0 !important;
	}

	.bh-sync--progress .bh-sync__item.is-active::before {
		background: var(--bh-bar-active);
	}
}
