.spinner {
  border: 3px solid var(--color-spinner-track);
  border-top: 3px solid var(--color-spinner-spin);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  text-align: center;
  animation: spin 2s linear infinite;
}

.spinner-small {
  border: 3px solid var(--color-spinner-track);
  border-top: 3px solid var(--color-spinner-spin);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  text-align: center;
  animation: spin 2s linear infinite;
}

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

.spinner--small-margin {
  margin-left: 4px;
}

.spinner__no-margin {
  margin: 0;
  margin-bottom: 108px;
}

.homepage__spinner__wrapper {
  position: fixed;
  height: 100dvh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Style the background of the progress bar */
.custom-progress::-webkit-progress-bar {
  background-color: var(--color-bg-tertiary);
  border-radius: 3px;
  height: 5px;
}

/* Style the filled portion of the progress bar */
.custom-progress::-webkit-progress-value {
  background-color: var(--color-primary);
  border-radius: 3px;
}

/* For Firefox */
.custom-progress::-moz-progress-bar {
  background-color: var(--color-primary);
  border-radius: 3px;
}

/* Adjust the overall progress bar appearance */
.custom-progress {
  width: 100%;
  height: 5px;
  appearance: none; /* Remove default styling */
  border: none;
}

.custom-progress-failed {
  width: 100%;
  height: 5px;
  appearance: none;
  border-radius: 3px;
  border: none;
  background-color: var(--color-danger);
  margin-top: 15px;
}

.custom-progress-success {
  width: 100%;
  height: 5px;
  appearance: none;
  border-radius: 3px;
  border: none;
  margin-top: 15px;
  background-color: var(--color-success);
}

.custom-progress.indeterminate {
  position: relative;
  overflow: hidden;
}

/* Animation for indeterminate progress */
.custom-progress.indeterminate::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-primary),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -50%;
    width: 50%;
  }
  50% {
    left: 25%;
    width: 50%;
  }
  100% {
    left: 100%;
    width: 50%;
  }
}
