.container input {
    outline: none;
}

.slider {
    width: 700px;
    height: 400px;
    background-color: black;
    display: inline-block;
    position: relative;
    margin: 16px 8px;
}

.foreground, .background {
    width: 100%;
    height: 100%;
    position: absolute;
    overflow: hidden;
}

.foreground {
    width: 50%;
    z-index: 2;
}

.foreground img, .background img {
    height: 100%;
    object-fit: revert;
    object-position: center;
}

input[type="range"] {
    position: absolute;
    top: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    left: -3px;
}

input[type=range] {
  -webkit-appearance: none; /* Hides the slider so that custom slider can be made */
  width: 100%; /* Specific width is required for Firefox. */
  background: transparent; /* Otherwise white in Chrome */
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
}

input[type=range]:focus {
  outline: none; /* Removes the blue border. You should probably do some kind of focus styling for accessibility reasons though. */
}

input[type=range]::-ms-track {
  width: 100%;
  cursor: pointer;

  /* Hides the slider so custom styles can be added */
  background: transparent; 
  border-color: transparent;
  color: transparent;
}
.foreground::after {
    content: '';
    height: 100%;
    width: 2px;
    background-color: white;
    display: block;
    position: absolute;
    top: 0;
    right: -4px;
    padding: 2px;
}

/* Special styling for WebKit/Blink */
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
   height: 16px;
  width: 16px;
  border-radius: 16px;
  background: #ffffff;
  cursor: pointer;
  margin-top: -14px;
  margin-right: 2px; /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */
 }

/* All the same stuff for Firefox */
input[type=range]::-moz-range-thumb {
  height: 16px;
  width: 16px;
  border-radius: 16px;
  background: #ffffff;
  cursor: pointer;
}

/* All the same stuff for IE */
input[type=range]::-ms-thumb {
    height: 16px;
  width: 16px;
  border-radius: 16px;
  background: #ffffff;
  cursor: pointer;
}
