/* === Flash Messages === */

.flash-container {
  position: fixed;
  top: 4.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(90%, 420px);
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  animation: slideDown 0.25s ease-out;
}

/* Categories */

.flash-success {
  border-left: 4px solid #22c55e;
}

.flash-error {
  border-left: 4px solid #ef4444;
}

.flash-info {
  border-left: 4px solid #3b82f6;
}

.flash-warning {
  border-left: 4px solid #fbbf24;
}

/* Animation */

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}


.flash-close {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.flash-close:hover {
  color: var(--text);
}

/* Exit animation */
.flash.hide {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}