.gradient-stops-slider {
  position: relative;
  padding: 0 var(--gp-container-horizontal-padding, 12px);
  margin-bottom: 24px;

  &.is-dragging {
    cursor: ew-resize;
  }
}

.gradient-stops-slider-bar {
  height: var(--gp-stops-slider-height, 24px);
  background-image: conic-gradient(transparent 25%, #ccc 25% 50%, transparent 50% 75%, #ccc 75%);
  background-size: 8px 8px;
  border-radius: 4px;
  outline: 1px solid var(--gp-stops-slider-bar-outline-color, rgba(0, 0, 0, 0.12));
  outline-offset: -1px;
  overflow: hidden;
  cursor: copy;

  .is-dragging & {
    cursor: ew-resize;
  }
}

.gradient-stops-slider-bar-bg {
  height: 100%;
}

.gradient-stops-slider-track {
  position: relative;
}

.gradient-stops-slider-pointer {
  position: absolute;
  width: 0;
  z-index: 1;
}

.gradient-stops-slider-thumb {
  position: absolute;
  display: inline-flex;
  padding: 4px;
  border-radius: 6px;
  transform: translate(-50%);
  cursor: ew-resize;
  background-color: var(--gp-stops-slider-thumb-background-color, #fff);
  filter: var(
    --gp-stops-slider-thumb-shadow,
    drop-shadow(0 0 0.5px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.3))
      drop-shadow(0 0 3px rgba(0, 0, 0, 0.15))
  );

  .gradient-colorpicker-toggle {
    width: 12px;
    height: 12px;
    outline: 1px solid var(--gp-stops-slider-thumb-toggle-outline-color, rgba(0, 0, 0, 0.12));
    cursor: inherit;

    > button:focus {
      outline: none;
    }
  }

  &:focus-within {
    background-color: var(--gp-input-focus-outline-color, #0d99ff);
  }
}

.gradient-stops-slider-thumb-active {
  outline: 1px solid var(--gp-input-focus-outline-color, #0d99ff);
  outline-offset: -1px;
}

.gradient-stop-list-wrapper {
  position: relative;
  margin-top: 24px;
  font-size: var(--gp-container-text-size, 12px);
  font-family: var(--gp-container-text-font, inherit);
}

.gradient-stop-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gp-container-horizontal-padding, 12px);
  margin-bottom: 4px;
}

.gradient-stop-list-body {
  max-height: var(--gp-stop-list-max-height, 22vh);
  overflow: auto;
}

.gradient-stop-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.gradient-stop-item {
  display: flex;
  align-items: center;
  padding: 4px var(--gp-container-horizontal-padding, 12px);
  gap: 4px;
  line-height: 1;
}

.gradient-stop-item-active {
  background-color: var(--gp-stop-item-active-color, transparent);
}

.gradient-stop-item-color {
  flex: 2;
}

.gradient-stop-item-offset {
  flex: 1;

  select {
    appearance: none;
    max-width: 24px;
    text-align: center;

    &:hover,
    &:focus {
      background-color: var(--gp-unit-select-hover-background-color, rgba(0, 0, 0, 0.12));
    }
  }
}
