/** ====================================
**  SCROLLABLE POSTS BASE STYLES
** ==================================== */
/* Wrapper - the scrollable container */
.scrollable-posts-wrapper {
	display: flex !important;
	gap: 15px;
	overflow-x: auto;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	-ms-overflow-style: none;
	scrollbar-width: none;
	scroll-snap-type: x mandatory;
}
/* Hide browser scrollbar */
.scrollable-posts-wrapper::-webkit-scrollbar {
	display: none;
}
/* Dragging cursor states */
.scrollable-posts-wrapper.dragging {
	cursor: grabbing;
	user-select: none;
}
.scrollable-posts-wrapper:not(.dragging) {
	cursor: grab;
}
/* Individual slides */
.scrollable-posts-wrapper > * {
	flex-shrink: 0;
	scroll-snap-align: start;
}

/** ====================================
**  CUSTOM SCROLLBAR
** ==================================== */
.scroll-posts-bar {
	position: relative;
	height: 11px;
	background: rgba(255, 255, 255, 0.35);
	border-radius: 4px;
	cursor: pointer;
	background-clip: padding-box;
	border: 4px solid #b9c0d0;
}
.scroll-posts-thumb {
	position: absolute;
	left: 0;
	background: var(--primary);
	border-radius: 11px;
	cursor: grab;
	transition:
		background-color 0.2s ease,
		left 0.3s ease;
	top: -4px;
	height: calc(100% + 8px);
}
.scroll-posts-thumb:hover {
	/* background-color: rgba(0, 0, 0, 0.6); */
}
.scroll-posts-thumb:active,
.scroll-posts-bar.dragging .scroll-posts-thumb {
	cursor: grabbing;
	/* background-color: rgba(0, 0, 0, 0.7); */
}

/** ====================================
**  MOBILE DOTS
** ==================================== */
.scroll-posts-dots {
	display: none;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 50px;
}
.scroll-posts-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.2);
	border: none;
	cursor: pointer;
	padding: 0;
	transition: all 0.3s ease;
}
.scroll-posts-dot:hover {
	/* background-color: rgba(0, 0, 0, 0.4); */
	background: var(--primary);
}
.scroll-posts-dot.active {
	background: var(--primary);
	/* background-color: rgba(0, 0, 0, 0.6); */
	transform: scale(1.2);
}

/** ====================================
**  ARROWS
** ==================================== */
div:has(> .scrollable-posts-wrapper) {
	position: relative;
}
.scroll-posts-arrows {
	display: flex;
	justify-content: space-between;
	align-items: center;
	pointer-events: none;
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	display: none;
}
.slide-arrow {
	pointer-events: all;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(0, 0, 0, 0.1);
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	position: relative;
	z-index: 1;
}
.slide-arrow:hover:not(:disabled) {
	background-color: rgba(255, 255, 255, 1);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	transform: scale(1.05);
}
.slide-arrow:disabled,
.slide-arrow.disabled {
	opacity: 0.3;
	cursor: not-allowed;
}
.slide-arrow.prev-arrow {
	position: relative;
	left: -10px;
}
.slide-arrow.next-arrow {
	position: relative;
	right: -10px;
}
/* Arrow icons using CSS */
.slide-arrow::before {
	content: '';
	display: block;
	background: var(--icon-sprite);
	background-size: 300px;
	background-position: -118px -31px;
	width: 18px;
	height: 17px;
}
.prev-arrow::before {
	transform: rotate(180deg);
}
.next-arrow::before {
}

@media screen and (max-width: 550px) {
	.scroll-posts-arrows {
		display: flex;
	}
}

/** ====================================
**  ACCESSIBILITY
** ==================================== */
/* Keyboard focus styles */
.scroll-posts-dot:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}
.scroll-posts-thumb:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}
.scrollable-posts-wrapper:focus-visible {
	outline: 2px solid #000;
	outline-offset: -2px;
}
/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
	.scrollable-posts-wrapper,
	.scroll-posts-thumb,
	.scroll-posts-dot {
		scroll-behavior: auto;
		transition: none;
	}
}
