/* A definite widget width lets Elementor reserve the aspect-ratio height on mobile. */
.elementor-widget-fotobox-compare-slider {
  width: 100%;
}

.fo-compare {
  --fo-compare-position: 50%;
  --fo-compare-color: var(--tt-dark-color, #202020);
  --fo-compare-background: var(--tt-accent-bg-color, #f1f1f1);
  box-sizing: border-box;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--fo-compare-background);
  border: 2px solid var(--tt-dark-color, #202020);
  border-radius: 18px;
  box-shadow: 7px 8px 0 -2px var(--tt-dark-color, #202020);
  font-family: var(--tt-body-font, inherit);
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  isolation: isolate;
}
.fo-compare:focus,
.fo-compare:focus-visible {
  outline: none;
}
.fo-compare .fo-compare-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--fo-compare-background);
  pointer-events: none;
}
.fo-compare .fo-compare-before {
  clip-path: inset(0 calc(100% - var(--fo-compare-position)) 0 0);
}
.fo-compare .fo-compare-layer img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}
.fo-compare-label {
  position: absolute;
  top: 16px;
  max-width: calc(50% - 24px);
  box-sizing: border-box;
  padding: 6px 14px;
  border: 2px solid var(--tt-dark-color, #202020);
  border-radius: 100px;
  box-shadow: 2px 3px 0 -1px var(--tt-dark-color, #202020);
  background: var(--tt-accent-bg-color, #f1f1f1);
  color: var(--tt-text-color, #202020);
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.fo-compare-before .fo-compare-label { left: 16px; }
.fo-compare-after .fo-compare-label { right: 16px; }
.fo-compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--fo-compare-position);
  width: 2px;
  transform: translateX(-50%);
  background: var(--fo-compare-color);
  box-shadow: 0 0 4px rgb(0 0 0 / 40%);
  pointer-events: none;
}
.fo-compare-handle {
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--fo-compare-color);
  border-radius: 50%;
  background: var(--tt-main-color, #fff);
  box-shadow: 2px 3px 0 -1px var(--tt-dark-color, #202020);
  color: var(--fo-compare-color);
}
.fo-compare-handle svg { display: block; flex-shrink: 0; }
