/*
 * 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.
 */

/* Toast notifications (see app/javascript/toast.js). Plain CSS so the classes
   survive Tailwind's purge, since they're only ever added at runtime. */
.toast-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 28rem;
  padding: 0 1rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  box-sizing: border-box;
  width: 100%;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-0.5rem);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast--show {
  opacity: 1;
  transform: translateY(0);
}

.toast--notice  { background-color: #16a34a; } /* green-600 */
.toast--alert   { background-color: #e11d48; } /* rose-600 */
.toast--warning { background-color: #d97706; } /* amber-600 */

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}
