icon-size($size)
  width $size
  height $size

icon-position($top = null, $left = null)
  if $top || $left
    position relative
  if $top
    top $top
  if $left
    left $left

link-with-hover($color-base, $color-hover, $underline = true)
  color $color-base
  transition-duration var(--uie-transition-duration-fast)

  if $underline
    text-decoration underline
  else
    text-decoration none

  &:hover
    text-decoration underline
    color $color-hover

    .icon
      fill $color-hover

  .icon
    transition-duration var(--uie-transition-duration-fast)
    fill $color-base

modal-option()
  display block
  width 100%
  padding var(--uie-space-s) var(--uie-space-m)
  cursor pointer
  color var(--uie-color-modal-text)
  background var(--uie-color-modal-bg)
  font-size var(--uie-font-size-s)
  text-decoration none
  text-align left
  white-space nowrap

  .icon
    margin-top -6px
    margin-right var(--uie-space-s)
    fill var(--uie-color-modal-text)
    icon-size(21px)
    icon-position(6px)

  &:not([aria-selected]):focus,
  &:not([aria-selected]):hover,
  &:not([aria-selected]):active
    color var(--uie-color-modal-text-hover)
    background-color var(--uie-color-modal-bg-hover)

    .icon
      fill var(--uie-color-modal-text-hover)

  &[aria-selected]:not(:only-child)
    color var(--uie-color-modal-text-current)
    background-color var(--uie-color-modal-bg-current)

    .icon
      fill var(--uie-color-modal-text-current)

code()
  font-family var(--uie-font-family-code)

// Custom fixed visible horizontal scrollbar
custom-fixed-scrollbar($size = 7px, $border-radius = 7px, $thumb-color = var(--uie-color-neutral-50), $track-color = var(--uie-color-neutral-20))
  &::-webkit-scrollbar
    width: $size
    height: $size
  &::-webkit-scrollbar-thumb
    display: block
    border 2px solid var(--uie-color-neutral-20)
    border-radius: $border-radius
    background-color: $thumb-color
    box-shadow: 0 0 1px rgba(255, 255, 255, 0.5)
  &::-webkit-scrollbar-track
    border-radius: $border-radius
    background-color var(--uie-color-neutral-20)
  scrollbar-width: thin
  scrollbar-color: $thumb-color $track-color
