.dock {
  display: inline-grid;
  grid-template-columns: repeat(3, 32px);
  grid-template-rows: repeat(3, 32px);
  gap: 8px;
  box-sizing: border-box;
  width: 120px;
  height: 120px;
  flex: none;
  padding: 4px;
  border-radius: var(--wds-border-radius-surface-default, 8px);
  background-color: var(--wds-color-fill-standard-tertiary-hover, #e7f0ff);

  &--disabled {
    background-color: var(
      --wds-color-fill-standard-secondary-disabled,
      rgba(0, 6, 36, 0.1)
    );
  }
}

.dock__point {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  /* stylelint-disable-next-line plugin/use-baseline */
  outline: none;
  background-color: transparent;
  cursor: pointer;

  &:disabled {
    cursor: default;
  }

  & &__background {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 24px;
    height: 24px;
    border-radius: 4px;
  }

  & &__indicator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--wds-color-text-standard-primary, #000624);
  }

  & &__icon {
    display: flex;
    color: var(--wds-color-text-standard-primary-light, #ffffff);
    fill: currentColor;
  }

  @media (hover: hover) {
    &:hover:not(&--selected):not(:disabled) &__background {
      background-color: var(--wds-color-fill-standard-secondary-hover, #a8caff);
    }
  }

  &:focus-visible &__background {
    box-shadow: var(--wds-shadow-focus-standard, 0 0 0 3px #a8caff);
  }

  &:focus-visible:not(&--selected) &__background {
    background-color: var(--wds-color-fill-standard-secondary-hover, #a8caff);
  }

  &--selected &__background {
    background-color: var(--wds-color-fill-standard-primary, #116dff);
  }

  &--selected &__indicator {
    background-color: var(--wds-color-text-standard-primary-light, #ffffff);
  }

  &:disabled &__indicator {
    background-color: var(--wds-color-text-disabled, rgba(0, 6, 36, 0.3));
  }

  &--position-top-left &__icon {
    transform: rotate(-45deg);
  }

  &--position-top-right &__icon {
    transform: rotate(45deg);
  }

  &--position-bottom-left &__icon {
    transform: rotate(-135deg);
  }

  &--position-bottom-right &__icon {
    transform: rotate(135deg);
  }

  &--position-top-left#{&}--offset-icon &__icon {
    transform: rotate(-45deg) translate(-0.5px, -0.9px);
  }

  &--position-top-right#{&}--offset-icon &__icon {
    transform: rotate(45deg) translate(-0.5px, -0.9px);
  }

  &--position-bottom-left#{&}--offset-icon &__icon {
    transform: rotate(-135deg) translate(-0.5px, -0.9px);
  }

  &--position-bottom-right#{&}--offset-icon &__icon {
    transform: rotate(135deg) translate(-0.5px, -0.9px);
  }
}
