/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@keyframes delayed-show {
  to {
    opacity: 1;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.lazy-spinner {
  opacity: 0;
  animation: delayed-show 0ms 500ms forwards;
}

/* [data-anchor-tabs-target="panel"] turbo-frame > * { */
/*   animation: fade-in 0.5s ease-in-out; */
/* } */

@keyframes appear-then-fade {
  0%,
  100% {
    opacity: 0;
  }
  5%,
  60% {
    opacity: 1;
  }
}

.flash {
  position: fixed;
  top: 64px;

  html[data-hotwire-native] & {
    top: calc(10px + env(safe-area-inset-top));
  }

  right: 1rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  .message {
    animation: appear-then-fade 3s 300ms both;
  }
}
