%clearfix {
  &::after {
    clear: both;
    content: '';
    display: table;
  }
}

.clearfix {
  @extend %clearfix;
}

.hidden {
  display: none;
}

.visibility-hidden {
  visibility: hidden;
  transform: translateX(-10000px) translateY(-10000px);
}

.align-right {
  text-align: right;
}

.background-white {
  background-color: $white;
}

.color-primary {
  color: $color-primary-500 !important;
}

.color-success {
  color: $color-success-500 !important;
}

.color-warning {
  color: $color-warning-500 !important;
}

.color-error {
  color: $color-error-500 !important;
}

.color-neutral {
  color: $color-neutral-500 !important;
}

.padding-top-0 {
  padding-top: 0 !important;
}

.padding-top-2 {
  padding-top: 16px !important;
}

.margin-top-0 {
  margin-top: 0 !important;
}

.margin-top-1 {
  margin-top: 8px !important;
}

.margin-top-2 {
  margin-top: 16px !important;
}

.margin-top-3 {
  margin-top: 30px !important;
}

.margin-top-4 {
  margin-top: 40px !important;
}

.margin-bottom-0 {
  margin-bottom: 0 !important;
}

.margin-bottom-1 {
  margin-bottom: 8px !important;
}

.margin-bottom-2 {
  margin-bottom: 16px !important;
}

.margin-bottom-24 {
  margin-top: 24px !important;
}

.margin-bottom-3 {
  margin-bottom: 30px !important;
}

.margin-bottom-4 {
  margin-bottom: 40px !important;
}

.margin-left-auto {
  margin-left: auto !important;
}

.margin-left-0 {
  margin-left: 0 !important;
}

.margin-left-1 {
  margin-left: 8px !important;
}

.margin-left-2 {
  margin-left: 16px !important;
}

.margin-left-3 {
  margin-left: 30px !important;
}

.margin-left-4 {
  margin-left: 40px !important;
}

.margin-right-auto {
  margin-right: auto !important;
}

.margin-right-0 {
  margin-right: 0 !important;
}

.margin-right-1 {
  margin-right: 8px !important;
}

.margin-right-2 {
  margin-right: 16px !important;
}

.margin-right-3 {
  margin-right: 30px !important;
}

.margin-right-4 {
  margin-right: 40px !important;
}

.resizing-horizontal {
  cursor: col-resize;
}

// This selector can only be used to temporarily show an element for calculating
// positions.
.forced-block {
  display: block !important;
}

// Sometimes we forcefully want to disable the user-select property to initial
// because the element is for example being edited via a contenteditable attribute
// which does not work in combination with the user-select: none; property in Safari.
.forced-user-select-initial {
  user-select: initial !important;
}

.forced-text-overflow-initial {
  text-overflow: initial !important;
}

.forced-pointer-events-auto {
  pointer-events: auto !important;
}

.prevent-scroll {
  overflow: hidden !important;
}

.whitespace-pre-wrap {
  white-space: pre-wrap;
}

.remove-number-input-controls,
%remove-number-input-controls {
  appearance: textfield !important;

  &::-webkit-outer-spin-button,
  &::-webkit-inner-spin-button {
    appearance: none;
    margin: 0;
  }
}

.flex {
  width: 100%;
  display: flex;
  gap: var(--gap, 10px);
}

.inline-flex {
  display: inline-flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-100 {
  width: 100%;
  flex-basis: 100%;
}

.flex-grow-1 {
  flex-grow: 1;
}

.align-items-center {
  align-items: center;
}

.align-items-end {
  align-items: end;
}

.justify-content-space-between {
  justify-content: space-between;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-end {
  justify-content: end;
}

.position-relative {
  position: relative;
}

.inline-block {
  display: inline-block;
}

.text-decoration-line-through {
  text-decoration: line-through;
}

.max-width-100 {
  max-width: 100%;
}

@keyframes spin {
  0% {
    transform: rotate(0);
  }

  50% {
    transform: rotate(360deg);
  }

  100% {
    transform: rotate(720deg);
  }
}

/* spacer classes generation */

@each $size in $spacings {
  .p-#{$size},
  %p-#{$size} {
    padding: #{$size}px;
  }

  .px-#{$size},
  %px-#{$size} {
    padding-left: #{$size}px;
    padding-right: #{$size}px;
  }

  .py-#{$size},
  %py-#{$size} {
    padding-top: #{$size}px;
    padding-bottom: #{$size}px;
  }

  .m-#{$size},
  %m-#{$size} {
    margin: #{$size}px;
  }

  .my-#{$size},
  %my-#{$size} {
    margin-top: #{$size}px;
    margin-bottom: #{$size}px;
  }

  .mx-#{$size},
  %mx-#{$size} {
    margin-left: #{$size}px;
    margin-right: #{$size}px;
  }

  .pl-#{$size},
  %pl-#{$size} {
    padding-left: #{$size}px;
  }

  .ml-#{$size},
  %ml-#{$size} {
    margin-left: #{$size}px;
  }

  .pr-#{$size},
  %pr-#{$size} {
    padding-right: #{$size}px;
  }

  .mr-#{$size},
  %mr-#{$size} {
    margin-right: #{$size}px;
  }

  .pb-#{$size},
  %pb-#{$size} {
    padding-bottom: #{$size}px;
  }

  .mb-#{$size},
  %mb-#{$size} {
    margin-bottom: #{$size}px;
  }

  .pt-#{$size},
  %pt-#{$size} {
    padding-top: #{$size}px;
  }

  .mt-#{$size},
  %mt-#{$size} {
    margin-top: #{$size}px;
  }
}
