/* Modern toast notifications */

.app-toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1070;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  max-width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}

.app-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  max-width: 400px;
  padding: 1rem 1rem 1rem 0.85rem;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.06);
  pointer-events: auto;
  overflow: hidden;
  transform: translateX(110%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.app-toast.is-visible {
  transform: translateX(0);
  opacity: 1;
}

.app-toast.is-leaving {
  transform: translateX(110%);
  opacity: 0;
}

.app-toast-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  line-height: 1;
}

.app-toast--success .app-toast-icon {
  background: #dcfce7;
  color: #16a34a;
}

.app-toast--error .app-toast-icon {
  background: #fee2e2;
  color: #dc2626;
}

.app-toast--info .app-toast-icon {
  background: #dbeafe;
  color: #2563eb;
}

.app-toast--warning .app-toast-icon {
  background: #ffedd5;
  color: #ea580c;
}

.app-toast-body {
  flex: 1;
  min-width: 0;
  padding-top: 0.1rem;
}

.app-toast-title {
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.2rem;
  letter-spacing: -0.01em;
}

.app-toast-message {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.45;
  margin: 0;
}

.app-toast-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: -0.15rem -0.15rem 0 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.app-toast-close:hover {
  color: #0f172a;
  background: rgba(148, 163, 184, 0.15);
}

.app-toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform linear;
}

.app-toast--success .app-toast-progress {
  background: #22c55e;
}

.app-toast--error .app-toast-progress {
  background: #ef4444;
}

.app-toast--info .app-toast-progress {
  background: #3b82f6;
}

.app-toast--warning .app-toast-progress {
  background: #f97316;
}

@media (max-width: 575.98px) {
  .app-toast-container {
    top: auto;
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    align-items: stretch;
    max-width: none;
  }

  .app-toast {
    max-width: none;
    transform: translateY(110%);
  }

  .app-toast.is-visible {
    transform: translateY(0);
  }

  .app-toast.is-leaving {
    transform: translateY(110%);
  }
}
