.ba-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: default;
  user-select: none;
  touch-action: pan-y;
  background: var(--dark);
}

.ba-module .ba-container {
  position: absolute;
  inset: 0;
}

.ba-module::after {
  pointer-events: none;
}

.ba-container:hover .ba-image {
  transform: none !important;
}

.ba-container:hover .ba-image-content,
.ba-container:focus-visible .ba-image-content {
  opacity: 1;
  transform: none;
}

.ba-container:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.ba-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-after {
  position: absolute;
  top: 0;
  left: 0;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  will-change: clip-path;
}

.ba-divider {
  position: absolute;
  top: 0;
  left: 50%;
  bottom: 0;
  width: 56px;
  background: linear-gradient(
    to right,
    transparent 27px,
    #ffffff 27px,
    #ffffff 29px,
    transparent 29px
  );
  transform: translateX(-50%);
  cursor: ew-resize;
  pointer-events: auto;
  will-change: left;
}

.ba-divider::before {
  position: absolute;
  bottom: 80px;
  left: 50%;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  content: "";
  background: rgba(44, 44, 44, 0.82);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.38);
  pointer-events: none;
  transform: translateX(-50%);
}

.ba-divider::after {
  position: absolute;
  bottom: 88px;
  left: 50%;
  content: "‹ ›";
  color: var(--gold);
  font-family: Arial, sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
}

.ba-label {
  z-index: 2;
  padding: 10px 13px;
  background: rgba(30, 30, 30, 0.84);
  pointer-events: none;
}

.ba-autoplay-toggle {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  place-items: center;
  font-family: Arial, sans-serif;
  line-height: 1;
  cursor: pointer;
}

.ba-autoplay-toggle > span {
  display: grid;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(36, 36, 36, 0.38);
  place-items: center;
  font-size: 11px;
  opacity: 0.72;
  transition: opacity 180ms ease, color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.ba-autoplay-toggle:hover > span,
.ba-autoplay-toggle:focus-visible > span {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(36, 36, 36, 0.62);
}

.ba-autoplay-toggle[aria-pressed="true"] > span {
  opacity: 0.88;
  border-color: rgba(255, 195, 0, 0.65);
  color: rgba(255, 195, 0, 0.88);
  background: rgba(36, 36, 36, 0.55);
}

.ba-autoplay-toggle:focus-visible {
  outline: none;
}

.ba-autoplay-toggle:focus-visible > span {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.ba-aspect {
  aspect-ratio: 16 / 9 !important;
}

.ba-image-content {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 760px) {
  .ba-aspect {
    aspect-ratio: 9 / 16 !important;
  }
}

@media (min-width: 761px) {
  .ba-container {
    cursor: ew-resize;
  }

  .ba-divider::before,
  .ba-divider::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ba-after,
  .ba-divider {
    will-change: auto;
  }
}
