/* Before/after reveal slider — marketing & app demos */

.bs-photo-compare {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 380px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--bs-border, rgba(255, 255, 255, 0.12));
  touch-action: none;
  cursor: ew-resize;
  background: #0f1115;
  user-select: none;
}

.bs-photo-compare--compact {
  max-height: 340px;
}

.bs-photo-compare--demo {
  max-height: 260px;
  border-radius: 12px;
}

.bs-photo-compare--phone {
  max-height: none;
  min-height: 0;
  aspect-ratio: 3 / 4;
  width: 100%;
  border-radius: 12px;
}

.bs-photo-compare__before,
.bs-photo-compare__after img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  background: #0f1115;
}

.bs-photo-compare__after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 48% 0 0);
  z-index: 1;
}

.bs-photo-compare__tag {
  position: absolute;
  bottom: 0;
  z-index: 2;
  padding: 0.45rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.68));
  pointer-events: none;
}

.bs-photo-compare__tag--before {
  left: 0;
}

.bs-photo-compare__tag--after {
  right: 0;
  text-align: right;
}

.bs-photo-compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 52%;
  width: 32px;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  border: none;
  background: transparent;
  z-index: 3;
  cursor: ew-resize;
  touch-action: none;
}

.bs-photo-compare__handle > span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.45);
}

.bs-photo-compare__handle > span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.bs-photo-compare__handle > span::before {
  content: "‹ ›";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -2px;
  color: #333;
  z-index: 1;
  line-height: 1;
}

body.marketing .bs-app-card .bs-photo-compare--phone {
  margin-top: 0.15rem;
}

body.marketing .hp-panel .bs-photo-compare,
body.marketing .hp-checkin-card .bs-photo-compare {
  margin-top: 0.75rem;
}
