.bb-events-grid {
	background-color: transparent;
	padding: 0;
	box-sizing: border-box;
	--bb-eg-columns: 4;
	--bb-eg-gap: 24px;
}

.bb-events-grid * {
	box-sizing: border-box;
}

.bb-events-grid .bb-eg-title {
	color: #3ea363;
	font-size: 32px;
	font-weight: 700;
	margin: 0 0 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid #3ea363;
}

.bb-events-grid .bb-eg-empty {
	color: #cfe4d6;
	font-size: 16px;
}

.bb-eg-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.bb-eg-card {
	display: flex;
	flex-direction: column;
	background-color: #1f6b40;
	border: 1px solid rgba(62, 163, 99, 0.35);
	border-radius: 8px;
	overflow: hidden;
	min-width: 0;
}

.bb-eg-card-image {
	display: block;
	width: 100%;
	height: 170px;
	background-size: cover;
	background-position: center;
	background-color: rgba(255, 255, 255, 0.05);
}

.bb-eg-card-content {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px;
	min-width: 0;
}

.bb-events-grid .bb-eg-card-date {
	color: #8fbf9f;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.bb-events-grid .bb-eg-card-title {
	color: #ffffff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
	word-break: break-word;
}

.bb-eg-card-venue {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #cfe4d6;
	font-size: 14px;
	min-width: 0;
}

.bb-eg-card-venue svg {
	flex: 0 0 auto;
	fill: #3ea363;
}

.bb-eg-card-venue span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bb-events-grid .bb-eg-card-link {
	display: inline-block;
	margin-top: 8px;
	color: #3ea363;
	font-weight: 700;
	text-decoration: none;
}

.bb-events-grid .bb-eg-card-link:hover {
	color: #ffffff;
	text-decoration: underline;
}

.bb-eg-grid.is-carousel {
	display: flex;
	width: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.bb-eg-grid.is-carousel::-webkit-scrollbar {
	display: none;
}

.bb-eg-grid.is-carousel .bb-eg-card {
	flex: 0 0 calc( ( 100% - ( var( --bb-eg-columns ) - 1 ) * var( --bb-eg-gap ) ) / var( --bb-eg-columns ) );
	scroll-snap-align: start;
}

.bb-eg-carousel-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
}

.bb-eg-carousel-dot {
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: rgba(11, 61, 32, 0.25);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.bb-eg-carousel-dot.is-active {
	background-color: #0b3d20;
}

/* Carries the Load More JSON config only — never rendered visually; the
   actual trigger button lives elsewhere on the page (see nav_mode/
   load_more_button_id in class-bb-events-grid-widget.php). */
.bb-eg-load-more {
	display: none;
}

/* The external Load More button's original content (icon/text — e.g.
   Elementor's own markup) gets wrapped in this on init (see initLoadMore()
   in bb-events-grid.js) so it can be hidden as a unit — kept in normal flow
   (visibility, not display/position) so the button's size never jumps when
   the spinner replaces it. */
.bb-eg-load-more-original-content {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: inherit;
}

/* Hidden until .bb-eg-load-more-is-loading is set on the button; then
   absolutely centered over the (invisible but still space-occupying)
   original content. Uses currentColor so it inherits whatever text color
   the button already has, since it could be any element (Elementor Button
   widget, plain HTML button, etc.). */
.bb-eg-load-more-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	opacity: 0.75;
	animation: bb-eg-load-more-spin 0.6s linear infinite;
}

/* Both keyframes repeat the centering translate() from
   .bb-eg-load-more-is-loading .bb-eg-load-more-spinner below — a `to`-only
   keyframe here interpolates the whole `transform` value from that
   translate() toward a bare rotate(), which drags the spinner from centered
   out toward the button's top-left corner instead of spinning cleanly in
   place. */
@keyframes bb-eg-load-more-spin {
	from {
		transform: translate( -50%, -50% ) rotate( 0deg );
	}
	to {
		transform: translate( -50%, -50% ) rotate( 360deg );
	}
}

.bb-eg-load-more-is-loading {
	position: relative;
	cursor: progress;
}

.bb-eg-load-more-is-loading .bb-eg-load-more-original-content {
	visibility: hidden;
}

.bb-eg-load-more-is-loading .bb-eg-load-more-spinner {
	display: inline-block;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
}

@media (max-width: 1024px) {
	.bb-eg-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.bb-eg-grid {
		grid-template-columns: 1fr;
	}

	.bb-events-grid .bb-eg-title {
		font-size: 24px;
	}
}
