.powerSliderContainer {
  height: 60%;
  width: 100%;
  max-width: 812px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 0;
  margin: 6px auto;
  background: linear-gradient(180deg, #0e151c 0%, #060b10 100%);
  border: 1px solid rgba(43, 212, 125, 0.3);
  border-radius: 10px;
  overflow: hidden;
  box-sizing: border-box;
  flex: 1 1 auto;
  align-self: center;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.7),
    0 0 10px rgba(43, 212, 125, 0.12);
  min-height: 44px; /* mobile touch target */
}

/* Flat Power Triangle (Sits behind the cue) */
.power-track {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
  background: linear-gradient(to right, #1f8a4c 0%, #2bd47d 22%, #ffd23f 60%, #ff5a3c 100%);
  filter: saturate(1.15);
}

input[type="range"].powerSlider {
  appearance: none;
  width: 100%;
  height: 100%;
  background: transparent;
  cursor: pointer;
  margin: 0;
  outline: none;
  position: relative;
  z-index: 2;

  --p: 75%;
  --p-inv: calc(100% - var(--p));
}

.powerSliderContainer.is-disabled .power-track,
input[type="range"].powerSlider.is-disabled,
input[type="range"].powerSlider:disabled {
  filter: brightness(0.5);
  cursor: not-allowed;
}

/* Track - Webkit (Chrome/Safari) */
input[type="range"].powerSlider::-webkit-slider-runnable-track {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(
        to bottom,
        rgb(0 0 0 / 80%) 0%,
        rgb(0 0 0 / 20%) 15%,
        rgb(255 230 200 / 30%) 40%,
        rgb(255 230 200 / 30%) 60%,
        rgb(0 0 0 / 20%) 85%,
        rgb(0 0 0 / 80%) 100%
      )
      no-repeat 100% 0 / var(--p-inv) 100%,
    linear-gradient(to right, transparent var(--p), #c19a6b var(--p));
}

/* Track - Firefox */
input[type="range"].powerSlider::-moz-range-track {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(
        to bottom,
        rgb(0 0 0 / 80%) 0%,
        rgb(0 0 0 / 20%) 15%,
        rgb(255 230 200 / 30%) 40%,
        rgb(255 230 200 / 30%) 60%,
        rgb(0 0 0 / 20%) 85%,
        rgb(0 0 0 / 80%) 100%
      )
      no-repeat 100% 0 / var(--p-inv) 100%,
    linear-gradient(to right, transparent var(--p), #c19a6b var(--p));
}

/* Thumb - Webkit (Cue Tip) */
input[type="range"].powerSlider::-webkit-slider-thumb {
  appearance: none;
  height: 100%;
  width: 36px;
  background:
    linear-gradient(
      to bottom,
      rgb(0 0 0 / 80%) 0%,
      rgb(0 0 0 / 20%) 15%,
      rgb(255 230 200 / 30%) 40%,
      rgb(255 230 200 / 30%) 60%,
      rgb(0 0 0 / 20%) 85%,
      rgb(0 0 0 / 80%) 100%
    ),
    linear-gradient(to right, #2bd47d 25%, #fff 0);
  border: none;
  border-left: 2px solid #000;
  cursor: grab;
}

/* Thumb - Firefox (Cue Tip) */
input[type="range"].powerSlider::-moz-range-thumb {
  height: 100%;
  width: 36px;
  background:
    linear-gradient(
      to bottom,
      rgb(0 0 0 / 80%) 0%,
      rgb(0 0 0 / 20%) 15%,
      rgb(255 230 200 / 30%) 40%,
      rgb(255 230 200 / 30%) 60%,
      rgb(0 0 0 / 20%) 85%,
      rgb(0 0 0 / 80%) 100%
    ),
    linear-gradient(to right, #2bd47d 25%, #fff 0);
  border: none;
  border-left: 2px solid #000;
  border-radius: 0;
  cursor: grab;
}

input[type="range"].powerSlider:active::-webkit-slider-thumb,
input[type="range"].powerSlider:active::-moz-range-thumb {
  cursor: grabbing;
}
