.eael-img-comp-container {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  cursor: pointer;
  line-height: 0;
  margin: 0 auto;
  overflow: hidden;
  padding: 0;
  position: relative;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.eael-img-comp-container * {
  -webkit-box-sizing: inherit;
          box-sizing: inherit;
}

.eael-img-comp-container::after,
.eael-img-comp-container::before {
  -webkit-box-sizing: inherit;
          box-sizing: inherit;
}

.eael-img-comp-container img, .eael-img-comp-container picture > img {
  max-width: none !important;
}

.eael-img-comp-container > img,
.eael-img-comp-container > picture > img {
  display: block;
  width: 100%;
}

.eael-img-comp-container > div:first-child,
picture .eael-img-comp-container > div {
  height: 100%;
  left: 0;
  overflow: hidden;
  position: absolute;
  top: 0;
  width: 50%;
}

.cocoen-drag {
  background: #fff;
  bottom: 0;
  cursor: ew-resize;
  left: 50%;
  margin-left: -1px;
  position: absolute;
  top: 0;
  width: 2px;
}

.cocoen-drag::before {
  border: 3px solid #fff;
  content: "";
  height: 30px;
  left: 50%;
  margin-left: -7px;
  margin-top: -18px;
  position: absolute;
  top: 50%;
  width: 14px;
}

.eael-img-comp-wrapper {
  position: relative;
  /* when the second button is active, move slider */
}

.eael-img-comp-wrapper .eael-img-comp-toggle-btns {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 9999;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  background: #e5e7eb; /* light gray background */
  border-radius: 30px;
  padding: 4px;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  border: 1px solid #cbd9ff;
}

.eael-img-comp-wrapper .eael-img-comp-toggle-btn {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  border: none;
  background: transparent;
  padding: 8px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563; /* gray text */
  position: relative;
  z-index: 2;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 6px;
  -webkit-transition: color 0.3s ease;
  transition: color 0.3s ease;
}

.eael-img-comp-wrapper .eael-img-comp-toggle-btn.active {
  color: #fff; /* white text when active */
}

.eael-img-comp-wrapper .eael-img-comp-toggle-btns::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: #2563eb; /* blue active slider */
  border-radius: 30px;
  -webkit-transition: -webkit-transform 0.3s ease;
  transition: -webkit-transform 0.3s ease;
  transition: transform 0.3s ease;
  transition: transform 0.3s ease, -webkit-transform 0.3s ease;
  z-index: 1;
}

.eael-img-comp-wrapper .eael-img-comp-toggle-btns.after-active::before {
  -webkit-transform: translateX(100%);
      -ms-transform: translateX(100%);
          transform: translateX(100%);
}

.eael-img-comp-wrapper svg.eael-img-comp-toggle-icon {
  height: 16px;
  width: 16px;
}

.eael-img-comp-wrapper i.eael-img-comp-toggle-icon {
  font-size: 16px;
}
