@tailwind base;
@tailwind components;
@tailwind utilities;

.loading {
  display: none;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  position: absolute;
}

[busy]>.loading {
  display: block;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button {
  position: relative;
}

button:disabled::after {
  content: "";
  visibility: visible;
  height: 20px;
  width: 20px;
  position: absolute;
  left: 50%;
  margin: 0 0 0 -10px;
  z-index: 100;
  border: 3px solid theme('colors.primary.600');
  border-top: 3px solid theme('colors.primary.800');
  border-radius: 50%;
  animation: spin 0.5s linear infinite;
  background: transparent;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

button:not(:disabled)::after {
  content: "";
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

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

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

/* Progress bar for elapsed time: grow from current elapsed% to 100 */
@keyframes progress-elapsed {
  0% {
    width: var(--elapsed-pct, 0%);
  }

  100% {
    width: 100%;
  }
}

.progress-elapsed {
  width: var(--elapsed-pct, 0%);
  animation-name: progress-elapsed;
  animation-duration: var(--remaining-ms, 0ms);
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@media (prefers-reduced-motion: reduce) {
  .progress-elapsed {
    animation: none;
    width: auto;
  }
}

/* Smooth background transitions when album art changes */
.bg-transition {
  transition: background 400ms ease-in-out;
}

/* iOS safe area padding and dynamic viewport sizing */
.safe-area {
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
