/** ====================================
**  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: 14px;
  /* background-color: rgba(0, 0, 0, 0.1); */
  background: var(--secondary);
  border-radius: 3px;
  cursor: pointer;
  /** add offset */
  background-clip: padding-box;
  border: 1px solid #fff;
}
.scroll-posts-thumb {
  position: absolute;
  left: 0;
  /* top: 0;
  height: 100%; */
  /* background-color: rgba(0, 0, 0, 0.4); */
  background: var(--primary);
  border-radius: 3px;
  cursor: grab;
  transition:
    background-color 0.2s ease,
    left 0.3s ease;
  /** add offset */
  top: -1px;
  height: calc(100% + 2px);
}
.scroll-posts-thumb:hover {
  /* background-color: rgba(0, 0, 0, 0.6); */
  background: var(--primary-light);
}
.scroll-posts-thumb:active,
.scroll-posts-bar.dragging .scroll-posts-thumb {
  cursor: grabbing;
  background-color: rgba(0, 0, 0, 0.7);
  background: var(--primary-light);
}

/** ====================================
**  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); */
  background: #ccc;
  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-light);
}
.scroll-posts-dot.active {
  background: var(--primary-light);
  /* background-color: rgba(0, 0, 0, 0.6); */
  transform: scale(1.3);
}

/** ====================================
**  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;
  }
}
