/* ============================================
   Communico Carousel Styles
   ============================================ */

/* Filter row above carousel */
.communico-carousel-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0 43px; /* align with cards: 35px arrow + 8px gap */
}

.communico-carousel-filters select {
  flex: 1;
  padding: 8px 48px 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9em;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23aaaaaa'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  color: #444;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.communico-carousel-filters select:focus {
  outline: 2px solid #2A6EBB;
  outline-offset: 2px;
}

.communico-no-filter-results {
  display: none;
  text-align: center;
  padding: 2em 43px;
  color: #666;
  font-style: italic;
}

@media (max-width: 767px) {
  .communico-carousel-filters {
    flex-direction: column;
    padding: 0;
  }

  .communico-carousel-outer {
    gap: 2px;
  }

  #customEvents.communico-carousel #events > .event-link {
    padding: 0 2px;
  }
}

/* Override the theme's wrapper padding in carousel mode */
#customEvents.communico-carousel .wrapper {
  padding: 0;
}

/* Override the theme's grid layout in carousel mode */
#customEvents.communico-carousel #events {
  display: flex !important;
  flex-wrap: nowrap !important;
  grid-template-columns: unset !important;
  gap: 0 !important;
  align-items: stretch;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Outer wrapper: arrows flanking the track */
.communico-carousel-outer {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Track container clips overflow — padding gives room for card drop shadows */
.communico-carousel-track-container {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  padding: 12px 4px 28px;
  margin: -12px 0 -28px;
}

/* Each card slot — flex width set by JS */
#customEvents.communico-carousel #events > .event-link {
  padding: 0 8px;
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: auto; /* override theme's height:100% so flex stretch can equalize card heights */
  align-self: stretch;
}

/* Card with defined border */
#customEvents.communico-carousel .event {
  display: flex;
  flex-direction: column;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Hover drop shadow */
#customEvents.communico-carousel .event-link:hover .event {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transform: translateY(-3px);
}

/* Thumbnail full-width at top of card */
#customEvents.communico-carousel .thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 0;
  border-radius: 12px 12px 0 0;
  object-fit: cover;
}

/* Event info padding */
#customEvents.communico-carousel .event-info {
  padding: 1em;
  flex: 1;
}

/* Arrow navigation buttons */
.communico-carousel-arrow {
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  min-width: 35px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2A6EBB;
  box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.5);
  transition: background 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
  padding: 5px;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.communico-carousel-arrow svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}

.communico-carousel-prev svg {
  transform: rotate(180deg);
}

.communico-carousel-arrow:hover {
  background: #fff !important;
  color: #000;
}

.communico-carousel-arrow:focus,
.communico-carousel-arrow:focus-visible,
.communico-carousel-arrow:active {
  outline: none;
  background: #fff !important;
  color: #2A6EBB !important;
  box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.5);
}

.communico-carousel-arrow:disabled {
  opacity: 0.3;
  cursor: default;
  box-shadow: none;
}

/* Dot navigation */
.communico-carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 18px;
}

.communico-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  padding: 0;
  margin: 0 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.communico-carousel-dot.active {
  background: #000;
}
