.cbg-slider-wrapper {
	width: 100%;
}

.cbg-slider {
	position: relative;
	width: 100%;
	overflow: hidden;
	transition: height 0.9s ease-in-out;
}

.cbg-slider-track {
	position: relative;
	width: 100%;
	height: 100%;
}

.cbg-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	/* visibility switches to hidden only after the fade-out finishes, so the
	   outgoing slide actually gets to fade instead of vanishing instantly. */
	transition: opacity 0.9s ease-in-out, visibility 0s linear 0.9s;
	z-index: 0;
	box-sizing: border-box;
}

.cbg-slide.active {
	position: relative;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	z-index: 1;
	/* No delay here, so the incoming slide starts becoming visible right away. */
	transition: opacity 0.9s ease-in-out, visibility 0s linear 0s;
}

/* During a crossfade JS briefly makes the active slide absolute too, so the
   outgoing and incoming slide overlap instead of the layout jumping. */
.cbg-slider.cbg-transitioning .cbg-slide.active {
	position: absolute;
}

.cbg-slide-inner {
	flex: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 24px;
	box-sizing: border-box;
}

.cbg-slide-inner > * {
	width: 100%;
}

.cbg-slide-title {
	margin: 0 0 12px;
	font-size: 1.3rem;
	line-height: 1.25;
}

.cbg-slide-btn {
	display: inline-block;
	align-self: flex-start;
	margin-top: 14px;
	padding: 10px 22px;
	background: #111;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
}

.cbg-align-top-center .cbg-slide-btn,
.cbg-align-center-center .cbg-slide-btn,
.cbg-align-bottom-center .cbg-slide-btn {
	align-self: center;
}

.cbg-align-top-right .cbg-slide-btn,
.cbg-align-center-right .cbg-slide-btn,
.cbg-align-bottom-right .cbg-slide-btn {
	align-self: flex-end;
}

/* 3x3 content alignment within the slide */
.cbg-align-top-left      { justify-content: flex-start; align-items: flex-start; text-align: left; }
.cbg-align-top-center    { justify-content: flex-start; align-items: center;     text-align: center; }
.cbg-align-top-right     { justify-content: flex-start; align-items: flex-end;   text-align: right; }
.cbg-align-center-left   { justify-content: center;     align-items: flex-start; text-align: left; }
.cbg-align-center-center { justify-content: center;     align-items: center;     text-align: center; }
.cbg-align-center-right  { justify-content: center;     align-items: flex-end;   text-align: right; }
.cbg-align-bottom-left   { justify-content: flex-end;   align-items: flex-start; text-align: left; }
.cbg-align-bottom-center { justify-content: flex-end;   align-items: center;     text-align: center; }
.cbg-align-bottom-right  { justify-content: flex-end;   align-items: flex-end;   text-align: right; }

.cbg-nav {
	background: var(--cbg-arrow-bg, rgba(0, 0, 0, 0.06));
	color: var(--cbg-arrow-color, #333);
	border: none;
	font-size: 0.85rem;
	line-height: 1;
	padding: 6px 10px;
	cursor: pointer;
	border-radius: 3px;
	flex-shrink: 0;
}

.cbg-nav:hover {
	filter: brightness(0.92);
}

.cbg-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 12px;
}

.cbg-play-pause {
	margin-left: 6px;
}

.cbg-dots {
	display: flex;
	align-items: center;
	gap: 8px;
}

.cbg-dot {
	box-sizing: border-box;
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background-color: transparent !important;
	border: 2px solid var(--cbg-arrow-color, #999999) !important;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.cbg-dot.active {
	background-color: var(--cbg-arrow-color, #111111) !important;
	border-color: var(--cbg-arrow-color, #111111) !important;
}
