@use '../../theme/styles' as theme;

.wr-knob {
  display: inline-block;
  font-family: var(--wr-font-family-base);
  color: var(--wr-color-dark);

  &__surface {
    position: relative;
    display: inline-block;
    cursor: grab;
    user-select: none;
    touch-action: none;
    outline: 0;

    &:focus-visible {
      @include theme.focus-ring;
      border-radius: 50%;
    }

    &:active {
      cursor: grabbing;
    }

    svg {
      display: block;
      width: 100%;
      height: 100%;
    }
  }

  &__text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--wr-text-xl);
    font-weight: var(--wr-font-weight-semibold);
    font-variant-numeric: tabular-nums;
  }

  &__suffix {
    margin-left: 0.125rem;
    font-size: var(--wr-text-sm);
    color: var(--wr-color-medium);
    font-weight: var(--wr-font-weight-medium);
  }

  &--disabled &__surface {
    cursor: not-allowed;
    opacity: 0.65;
  }
}
