/* =========================================================
   8. Toasts and modal dialogs
   ========================================================= */
.toast-container {
  position: fixed;
  z-index: 9999;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
}

@media (max-width: 420px) {
  .toast-container {
    right: 10px;
    bottom: 10px;
  }
}

.toast {
  min-width: 280px;
  max-width: 380px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: slide-in 0.25s ease;
}

@media (max-width: 420px) {
  .toast {
    min-width: 240px;
    max-width: calc(100% - 20px);
  }
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.modal-backdrop {
  position: fixed;
  z-index: 9998;
  inset: 0;
  display: none;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.62);
}

@media (max-width: 480px) {
  .modal-backdrop {
    padding: 12px;
  }
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: min(560px, 100%);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow-y: auto;
}

@media (max-width: 480px) {
  .modal {
    padding: 16px;
  }
}
