/* ======================================================
   Toast Notifications
   ====================================================== */

#toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  width: 100%;
  max-width: 460px;
  padding: 0 1rem;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius, 0.5rem);
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 0.85rem;
  line-height: 1.5;
  pointer-events: auto;
  animation: toast-in 0.35s cubic-bezier(.16,1,.3,1) forwards;
  box-shadow: 0 4px 24px rgba(0,0,0,.5), 0 1px 4px rgba(0,0,0,.3);
}

.toast--error {
  background: rgba(14,14,22,.96);
  border: 1px solid rgba(139,34,50,.4);
  color: var(--crimson-light, #b83a4e);
}

.toast--success {
  background: rgba(14,14,22,.96);
  border: 1px solid rgba(92,184,92,.35);
  color: #5cb85c;
}

.toast-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.toast-msg {
  flex: 1;
  word-break: break-word;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  padding: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
}

/* --- Animations --- */
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}

.toast--removing {
  animation: toast-out 0.3s cubic-bezier(.16,1,.3,1) forwards;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  #toast-container {
    top: 12px;
    max-width: 100%;
  }

  .toast {
    font-size: 0.8rem;
  }
}
