:root {
    --carousel-margin:3rem;
}

.carousel-layout {
  display: flex;
  flex-direction: column;
  gap: calc(var(--carousel-margin)*0.5);
  height: 100vh;
  height: 100dvh;
  padding: var(--carousel-margin);
  box-sizing: border-box;
}

.carousel-block {
  flex: 1;
  min-height: 0;
  overflow: hidden;  
}

.carousel {
  height: 100%;
  width: 100%;
  margin: 0;
  max-height: none;
  container-type: size;      
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.carousel__cell {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.carousel__cell.is-active { 
  display: flex; 
}

.carousel__cell img {
  height: 100%;
  width: auto;
  max-width: 100%;
  min-height: 0;
  object-fit: contain;
  -webkit-user-drag: none;
}

.video-container {
  position: relative;
  aspect-ratio: 16 / 9;
  width: min(100cqw, 100cqh * 16 / 9);
}

.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.carousel__meta {
  z-index: 1000;
  width: 100%;
  display: grid;
  grid-template-columns: 25% 50% 25%;
  pointer-events: none; 
  text-align: center;
}

.carousel__counter{
    grid-column: 2;
}

  html[data-side="left"]  *:not(button, button *, a, a *) { cursor: w-resize !important; }
  html[data-side="right"] *:not(button, button *, a, a *) { cursor: e-resize !important; }

/* mobile */
@media (max-width: 779px) {
    .back-button--carousel {
        z-index: 100000;
        cursor: pointer;
        position: fixed;
        top: var(--carousel-margin);
        right: 1rem;
        padding: 0 !important;
    }
}

/* desktop queries */
@media (min-width: 780px) {
    .back-button--carousel {
        position: fixed;
        top: 0.9rem;
        right: 1rem;
        z-index: 1000;
    }
}