apps/phoenix_duskmoon/assets/css/neumorphic/range.css
@layer components {
  .neumorphic-range {
    appearance: none;
    -webkit-appearance: none;
    --range-thumb: var(--neumorphic-color);
    --range-thumb-size: calc(var(--size-selector, 0.25rem) * 6);
    --range-progress: currentColor;
    --range-fill: 1;
    --range-p: 0.25rem;
    --range-bg: color-mix(in oklab, currentColor 20%, #0000);
    cursor: pointer;
    overflow: hidden;
    background-color: transparent;
    vertical-align: middle;
    width: clamp(3rem, 20rem, 100%);
    --radius-selector-max: calc(
      var(--radius-selector) + var(--radius-selector) + var(--radius-selector)
    );
    border-radius: calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));
    border: none;
    height: var(--range-thumb-size);
    [dir="rtl"] & {
      --range-dir: -1;
    }
    &:focus {
      outline: none;
    }
    &:focus-visible {
      outline: 2px solid;
      outline-offset: 2px;
    }
    &::-webkit-slider-runnable-track {
      width: 100%;
      background-color: var(--range-bg);
      border-radius: var(--radius-selector);
      height: calc(var(--range-thumb-size) * 0.5);
      @media (forced-colors: active) {
        border: 1px solid;
      }
    }
    &::-webkit-slider-thumb {
      position: relative;
      box-sizing: border-box;
      border-radius: calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));
      background-color: currentColor;
      height: var(--range-thumb-size);
      width: var(--range-thumb-size);
      border: var(--range-p) solid;
      appearance: none;
      -webkit-appearance: none;
      top: 50%;
      color: var(--range-progress);
      transform: translateY(-50%);
      box-shadow: 0 -1px oklch(0% 0 0 / calc(var(--depth) * 0.1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000), 0 0 0 2rem var(--range-thumb) inset, calc((var(--range-dir, 1) * -100rem) - (var(--range-dir, 1) * var(--range-thumb-size) / 2)) 0 0 calc(100rem * var(--range-fill));
    }
    &::-moz-range-track {
      width: 100%;
      background-color: var(--range-bg);
      border-radius: var(--radius-selector);
      height: calc(var(--range-thumb-size) * 0.5);
      @media (forced-colors: active) {
        border: 1px solid;
      }
    }
    &::-moz-range-thumb {
      position: relative;
      box-sizing: border-box;
      border-radius: calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));
      background-color: currentColor;
      height: var(--range-thumb-size);
      width: var(--range-thumb-size);
      border: var(--range-p) solid;
      top: 50%;
      color: var(--range-progress);
      box-shadow:
        0 -1px oklch(0% 0 0 / calc(var(--depth) * 0.1)) inset,
        0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset,
        0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000),
        0 0 0 2rem var(--range-thumb) inset,
        calc((var(--range-dir, 1) * -100rem) - (var(--range-dir, 1) * var(--range-thumb-size) / 2)) 0 0 calc(100rem * var(--range-fill));
    }
    &:disabled {
      cursor: not-allowed;
      opacity: 30%;
    }
  }
}
