/* Event Gallery block: only the explicit Carousel style is enhanced. */
.wp-block-gallery.is-style-md-event-carousel.md-event-gallery-carousel--ready {
  display: block !important;
  position: relative;
  width: 100%;
  max-width: 100%;
  gap: 0 !important;
  overflow: hidden;
}

.wp-block-gallery.is-style-md-event-carousel.md-event-gallery-carousel--ready > .swiper-wrapper {
  align-items: flex-start;
  margin: 0;
  padding: 0;
}

.wp-block-gallery.is-style-md-event-carousel.md-event-gallery-carousel--ready .swiper-slide {
  display: block !important;
  flex: 0 0 100% !important;
  flex-grow: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  position: relative;
}

.wp-block-gallery.is-style-md-event-carousel.md-event-gallery-carousel--ready .swiper-slide > a {
  display: block;
  width: 100%;
}

.wp-block-gallery.is-style-md-event-carousel.md-event-gallery-carousel--ready .swiper-slide img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  flex: none !important;
  object-fit: contain;
}

.wp-block-gallery.is-style-md-event-carousel.md-event-gallery-carousel--single {
  display: block !important;
}

.wp-block-gallery.is-style-md-event-carousel.md-event-gallery-carousel--single > figure.wp-block-image {
  width: 100% !important;
  margin: 0 !important;
}

.md-event-gallery-carousel__previous,
.md-event-gallery-carousel__next {
  appearance: none;
  position: absolute;
  z-index: 5;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity 180ms ease, background-color 180ms ease;
}

.md-event-gallery-carousel__previous {
  left: 16px;
}

.md-event-gallery-carousel__next {
  right: 16px;
}

.md-event-gallery-carousel__previous span,
.md-event-gallery-carousel__next span {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-1px);
}

.md-event-gallery-carousel__previous:hover,
.md-event-gallery-carousel__next:hover,
.md-event-gallery-carousel__previous:focus-visible,
.md-event-gallery-carousel__next:focus-visible {
  background: rgba(0, 0, 0, 0.78);
}

.md-event-gallery-carousel__previous:focus-visible,
.md-event-gallery-carousel__next:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.md-event-gallery-carousel__previous.swiper-button-disabled,
.md-event-gallery-carousel__next.swiper-button-disabled {
  opacity: 0.3;
  cursor: default;
}

.wp-block-gallery.is-style-md-event-carousel .md-event-gallery-carousel__pagination.swiper-pagination {
  position: relative !important;
  inset: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100% !important;
  margin-top: 12px;
}

.wp-block-gallery.is-style-md-event-carousel .md-event-gallery-carousel__pagination .swiper-pagination-bullet {
  width: 9px;
  height: 9px;
  margin: 0 !important;
  background: #7b7b7b;
  opacity: 0.42;
}

.wp-block-gallery.is-style-md-event-carousel .md-event-gallery-carousel__pagination .swiper-pagination-bullet-active {
  background: #0090b1;
  opacity: 1;
}

@media (max-width: 640px) {
  .md-event-gallery-carousel__previous,
  .md-event-gallery-carousel__next {
    width: 38px;
    height: 38px;
  }

  .md-event-gallery-carousel__previous {
    left: 10px;
  }

  .md-event-gallery-carousel__next {
    right: 10px;
  }

  .md-event-gallery-carousel__previous span,
  .md-event-gallery-carousel__next span {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .md-event-gallery-carousel__previous,
  .md-event-gallery-carousel__next {
    transition: none;
  }
}
