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

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  min-width: 320px;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-left: 4px solid #94a3b8;
  pointer-events: auto;
  animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}

.toast-body {
  flex: 1;
}

.toast-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.toast-message {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.4;
}

.toast-close {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  transition: all 0.15s;
}

.toast-close:hover {
  background: #f1f5f9;
  color: #475569;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 4px;
  height: 3px;
  border-radius: 0 0 12px 0;
  animation: toastProgress var(--duration) linear forwards;
}

/* Types */
.toast.success { border-left-color: #10b981; }
.toast.success .toast-icon { background: #ecfdf5; color: #10b981; }
.toast.success .toast-progress { background: #10b981; }

.toast.error { border-left-color: #f43f5e; }
.toast.error .toast-icon { background: #fef2f2; color: #f43f5e; }
.toast.error .toast-progress { background: #f43f5e; }

.toast.warning { border-left-color: #f59e0b; }
.toast.warning .toast-icon { background: #fffbeb; color: #f59e0b; }
.toast.warning .toast-progress { background: #f59e0b; }

.toast.info { border-left-color: #4361ee; }
.toast.info .toast-icon { background: #eef2ff; color: #4361ee; }
.toast.info .toast-progress { background: #4361ee; }

/* Animations */
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); max-height: 100px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateX(100px); max-height: 0; margin-bottom: -10px; }
}

@keyframes toastProgress {
  from { width: calc(100% - 4px); }
  to   { width: 0%; }
}
