.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  z-index: 1;

  &__spinner {
    max-width: 50px;
    max-height: 50px;
    min-width: 50px;
    min-height: 50px;
    border: var(--tide-booking-spinner-border);
    border-top-color: var(--tide-booking-spinner-border-top-color);
    border-radius: 50%;
    border-radius: 50%;
    animation: spin 2s linear infinite;

    &--dots {
      width: auto;
      height: auto;
      border: none;
      border-radius: initial;
      animation: initial;

      &:after {
        content: " .";
        font-size: 20px;
        animation: dots 1s steps(5, end) infinite;
      }
    }

  }

  &--centered {
    width: 100%;
    align-items: center;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes dots {
  0%,
  20% {
    color: rgba(0, 0, 0, 0);
    text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
  }

  40% {
    color: var(--tide-booking-spinner-animation-color);
    text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
  }

  60% {
    text-shadow: 0.25em 0 0 var(--tide-booking-spinner-animation-color), 0.5em 0 0 rgba(0, 0, 0, 0);
  }

  80%,
  100% {
    text-shadow: 0.25em 0 0 var(--tide-booking-spinner-animation-color), 0.5em 0 0 var(--tide-booking-spinner-animation-color);
  }
}
