/* Image compare utility. */

.image-compare {
  max-width: 100%;
  overflow: hidden;
  position: relative;
  box-sizing: content-box;
  cursor: pointer;
  user-select: none;
  /* box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.4); */
  border-radius: 15px;
}
.image-compare::before {
  /* Prevent selection, similar to user-select: none. */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
}
.image-compare img {
  max-width: 100%;
  background: #fff;
  display: block;
}
.image-compare img:not(:first-child) {
  position: absolute;
  top: 0;
  height: 100%;
  left: 0;
  object-fit: cover;
  object-position: top left;
  width: 50%;
  overflow: hidden;
  z-index: 1;
}
.image-compare-handle {
  height: 100%;
  width: 0.5em;
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  z-index: 20;
}
.image-compare-handle i {
  background: #fff;
  border-radius: 50%;
  line-height: 2em;
  width: 2em;
  display: block;
  position: absolute;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
  text-align: center;
  box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.4);
}
.image-compare-handle::before {
  /* Centered line! */
  /* box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.4); */
  content: "";
  height: 100%;
  position: absolute;
  left: -1px;
  right: -1px;
  background: #fff;
}
.image-compare-before,
.image-compare-after {
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  position: absolute;
  overflow: hidden;
}
.image-compare-before > div,
.image-compare-after > div {
  position: absolute;
  top: 0.5em;
  background: #ffffff;
  color: hsl(204, 86%, 53%);
  line-height: 1.5em;
  text-align: center;
  padding: 0.2em 0.6em;
  border-radius: 0.5em;
  white-space: nowrap;
  box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.4);
  font-size: 16px;
  height: 24px;
}
.image-compare-before > div {
  z-index: 2;
  left: 0.5em;
}
.image-compare-after > div {
  z-index: 0;
  right: 0.5em;
}

.switcher {
  position: relative;
  overflow: hidden;
  /* box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.1); */
  margin-top: 0em;
  margin-bottom: 0.5em;
  display: block;
  background-color: #c7dcfa;
  border-radius: 10px;
}
.switcher > *:not(.switcher-labels) {
  opacity: 1;
  transition: 0.5s all;
  z-index: 1;
}
.switcher > *:not(:first-child):not(.switcher-labels) {
  position: absolute;
  top: 0;
}

.switcher > .switcher-hidden {
  opacity: 0;
  z-index: 0;
}

.switcher .switcher-labels {
  text-align: center;
  font-weight: 600;
  padding: 1em 1.5em;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  gap: 0.75em;
}

.switcher .switcher-labels > div {
  white-space: nowrap;
}

.switcher .switcher-labels label {
  transition: 0.5s all;
  cursor: pointer;
  padding: 0 0.3em;
  color: #000;
  font-size: 20px;
}
.switcher .switcher-labels label.switcher-hidden {
  opacity: 0.3;
}
.switcher .switcher-labels input {
  vertical-align: middle;
  transform: translateY(-1px);
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .2s;
  transition: .2s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .2s;
  transition: .2s;
  border-radius: 34px;
}

input:checked + .slider {
  background-color: hsl(204, 86%, 53%);
}

input:focus + .slider {
  box-shadow: 0 0 1px hsl(204, 86%, 53%);
}

input:checked + .slider:before {
  -webkit-transform: translateX(72px);
  -ms-transform: translateX(72px);
  transform: translateX(72px);
}

.video-bar {
  width: 100%;
  margin-top: -50px;
  margin-left: 0px;
  margin-right: 0px;
  margin-bottom: 0px;
  height: 10px;
  position: relative;
  z-index: 41;
}

.video-btn {
  width: 40px;
  height: 40px;
  /* padding: 8px 6px 8px 6px; */
  margin: 0px 0px 0px -9px;
  /* cursor: pointer;
  outline: none;
  border: none; */
  color: hsl(204, 86%, 53%);
  /* background-color: #ffffff; */
  /* padding-bottom: 8px;
  border-radius: 34px; */
  /* box-shadow: 0.1em 0.1em 0.5em rgba(0, 0, 0, 0.4); */
  position: absolute;
}

/* .video-btn:hover {
  background-color: #ffffff;
} */

#play-btn {
  border-radius: 20px;
  padding: 0px;
}

.viewer-bar {
  width: 100%;
}

.switch .labels {
  position: absolute;
  top: 6px;
  left: 0px;
  width: 100%;
  height: 100%;
  font-size: 16px;
  font-family: sans-serif;
  transition: all 0.2s ease-in-out;
}

.switch .labels::after {
  content: attr(data-off);
  position: absolute;
  right: 4px;
  color: hsl(204, 86%, 53%);
  opacity: 1;
  /* text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4); */
  transition: all 0.2s ease-in-out;
}

.switch .labels::before {
  content: attr(data-on);
  position: absolute;
  left: 24px;
  color: #ffffff;
  opacity: 0;
  /* text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.4); */
  transition: all 0.2s ease-in-out;
}

.switch input:checked~.labels::after {
  opacity: 0;
}

.switch input:checked~.labels::before {
  opacity: 1;
}

.videos {
  visibility: hidden;
  position: absolute;
  width: 1%;
}
