/* Multi-photo post carousel + single media frame (Privacy-style blur) */

/* --- Shared media frame (single + carousel slides) --- */
.mp-post-media,
.mp-post-carousel__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: var(--mp-aspect, 1);
  max-height: min(80vh, 840px);
  overflow: clip;
  margin: 0;
  text-decoration: none;
  color: inherit;
  background-color: #1a1a1a;
  cursor: zoom-in;
}

a.mp-photo:not([href]) {
  cursor: zoom-in;
}

.mp-post-media--blur::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--post-bg) center center / cover no-repeat;
  transform: scale(1.15);
  filter: blur(22px);
  opacity: 0.95;
  z-index: 0;
  pointer-events: none;
}

.mp-post-media__img,
.mp-post-carousel__img {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

/* --- Carousel shell --- */
.mp-post-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #1a1a1a;
  user-select: none;
  -webkit-user-select: none;
}

.mp-post-carousel a,
.mp-post-carousel img {
  -webkit-user-drag: none;
  user-drag: none;
}

.mp-post-carousel.is-dragging,
.mp-post-carousel.is-dragging * {
  cursor: grabbing !important;
}

.mp-post-carousel__viewport {
  width: 100%;
  overflow: hidden;
  /* pan-y = feed still scrolls vertically; horizontal swipe is ours */
  touch-action: pan-y;
  -webkit-user-drag: none;
}

.mp-post-carousel__track {
  display: flex;
  flex-direction: row;
  will-change: transform;
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mp-post-carousel.is-dragging .mp-post-carousel__track {
  transition: none;
}

.mp-post-carousel__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.mp-post-carousel__link {
  /* inherits shared frame; aspect from parent --mp-aspect */
  aspect-ratio: var(--mp-aspect, 1);
}

.mp-post-carousel__video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: var(--mp-aspect, 1);
  max-height: min(80vh, 840px);
  overflow: hidden;
  background: #000;
}

.mp-post-carousel__video-wrap .media-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding-top: 0 !important;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 0;
}

.mp-post-carousel__nav {
  position: absolute;
  top: 50%;
  z-index: 20;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.95;
  transition: opacity 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}

.mp-post-carousel__nav:hover {
  background: rgba(0, 0, 0, 0.55);
  opacity: 1;
}

.mp-post-carousel__nav:disabled,
.mp-post-carousel__nav.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.mp-post-carousel__prev {
  left: 10px;
}

.mp-post-carousel__next {
  right: 10px;
}

.mp-post-carousel__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: 14px;
}

.mp-post-carousel__counter {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 5;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  pointer-events: none;
  white-space: nowrap;
}

.mp-post-carousel__counter[hidden],
.mp-post-carousel__badge[hidden] {
  display: none !important;
}
