/* Tweet Carousel specific fixes */
.carousel-wrapper {
  position: relative;
  margin-bottom: 4rem;
  padding-bottom: 3rem;
}

#tweet-carousel {
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  gap: 1rem;
  padding: 1rem;
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100%;
  position: relative;
  overflow-x: auto;
  margin-bottom: 1rem;
}

#tweet-carousel::-webkit-scrollbar {
  display: none;
}

#tweet-carousel .carousel-item {
  scroll-snap-align: start;
  width: calc((100% - 2rem) / 3) !important;
  min-width: calc((100% - 2rem) / 3) !important;
  flex: 0 0 calc((100% - 2rem) / 3) !important;
  margin-right: 1rem;
}

#tweet-carousel .carousel-item:last-child {
  margin-right: 0;
}

#tweet-carousel .tweet-card {
  width: 100% !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

@media (max-width: 1024px) {
  #tweet-carousel .carousel-item {
    width: calc((100% - 1rem) / 2) !important;
    min-width: calc((100% - 1rem) / 2) !important;
    flex: 0 0 calc((100% - 1rem) / 2) !important;
  }
}

@media (max-width: 640px) {
  #tweet-carousel .carousel-item {
    width: 100% !important;
    min-width: 100% !important;
    flex: 0 0 100% !important;
  }
}

/* Tweet carousel container and navigation */
.tweet-carousel-container {
  position: relative;
  padding: 0 1rem;
  overflow: visible;
}

/* Fixed navigation container */
.tweet-navigation-arrows {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 10;
  pointer-events: none;
}

.tweet-navigation-arrows button {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #4b3ee8;
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 1;
  position: relative;
}

.tweet-navigation-arrows button:hover {
  background-color: #3a31c9;
  transform: scale(1.1);
}

.tweet-navigation-arrows button:active {
  transform: scale(0.95);
}

.tweet-navigation-arrows button.disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.tweet-navigation-arrows button i {
  font-size: 1rem;
}
