/* Modern Carousel Styles with CSS Variables */
@import 'variables.css';

.date-carouseldate-carousel.date-carousel.dashboard-inner {
  width: 720px;
  padding: 20px;
  justify-content: center;
  align-items: center;
  scroll-snap-align: start; /* Align item to start of container */
  background-color: #0046b3;
  border: none;
  outline: none;
  word-wrap: break-word; /* Older browsers */
  overflow-wrap: break-word; /* Modern browsers */
  color: white;
}
.date-carousel {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease-in-out; /* Smooth transition */
  scroll-snap-type: x mandatory; /* Enables snapping on the X-axis*/
  justify-content: center;
  align-items: center;
  overflow: scroll;
  white-space: nowrap;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  padding: 10px 0;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  touch-action: pan-x; /* Allow horizontal panning on touch devices */
}
.date-carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
.date-carousel.active {
  cursor: grabbing;
}
.date-carousel.interactive {
  pointer-events: visible; /* This is the key */
}
.date-carousel.interactive * {
  pointer-events: visible;
}
.date-carousel-container {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 10px;
  overflow: hidden; /* Hide overflow */
  position: fixed; /* Needed for button positioning */
  z-index: 2;
  bottom: 10px;
}
.date-carousel-item {
  width: 130px;
  height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  scroll-snap-align: center;
  margin: 0 5px;
  padding: 8px;
  background-color: var(--primary-color);
  border: none;
  border-radius: var(--item-radius);
  color: white;
  transition: all var(--transition-speed) ease;
  box-shadow: var(--shadow);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.date-carousel-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  background-color: var(--primary-hover);
}
.date-carousel-item:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-active);
}
.date-carousel-item.active {
  background-color: var(--selected-color);
  box-shadow: var(--shadow-hover);
  transform: scale(1.02);
  position: relative;
}
.date-carousel-item.active:hover {
  background-color: var(--selected-hover);
}
.date-carousel-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: white;
  border-radius: 2px 2px 0 0;
}
.date-carousel-item.hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.carousel-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 100%;
}
.carousel-date i {
  font-size: 0.7rem;
  opacity: 0.9;
}
.carousel-date h3 {
  margin: 0;
  font-size: 0.6rem;
  font-weight: 500;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.carousel-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 100%;
  margin-top: 2px;
}
.count-badge {
  background-color: rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
}
.count-label {
  font-size: 0.7rem;
  opacity: 0.8;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .date-carousel-item {
    width: 100px;
    height: 80px;
    padding: 5px;
    margin: 0 3px;
  }
  .carousel-date h3 {
    font-size: 0.7rem;
    line-height: 1.2;
    white-space: normal;
    height: 2.4em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .carousel-date i {
    font-size: 0.65rem;
  }
  .count-badge {
    font-size: 0.7rem;
    padding: 1px 5px;
  }
  .count-label {
    font-size: 0.6rem;
  }
}
@media (max-width: 480px) {
  .date-carousel-item {
    width: 85px;
    height: 75px;
    padding: 4px;
    margin: 0 2px;
  }
  .carousel-date h3 {
    font-size: 0.65rem;
  }
  .count-badge {
    font-size: 0.65rem;
    padding: 1px 4px;
  }
}
@media (max-width: 360px) {
  .date-carousel-item {
    width: 75px;
    height: 70px;
  }
  .carousel-date h3 {
    font-size: 0.6rem;
  }
}
/* Animated touch indicator for carousel */
@keyframes touchHint {
  0% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(20px); opacity: 1; }
  100% { transform: translateX(0); opacity: 0.7; }
}
.date-carousel::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
  opacity: 0;
  pointer-events: none;
  animation: touchHint 2s ease-in-out infinite;
  animation-delay: 1s;
  animation-play-state: paused;
}
.date-carousel:not(.interactive):hover::after {
  animation-play-state: running;
}
/* Indicator for carousel items */
.date-carousel-container::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
  opacity: 0.7;
}