/* ============================================================
   TOAST — уведомления
   ============================================================ */

.toast-container {
  position: fixed;
  top: calc(var(--nav-h) + 16px);
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 40px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(20, 12, 35, 0.95);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(30px);
  transition:
    opacity 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.toast.show {
  opacity: 1;
  transform: translateX(0);
}
.toast.hide {
  opacity: 0;
  transform: translateX(30px);
}

.toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast-text {
  flex: 1;
  word-break: break-word;
}
.toast-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  flex-shrink: 0;
}
.toast-close:hover {
  color: var(--text);
}

.toast-success {
  border-color: rgba(74, 222, 128, 0.4);
}
.toast-success .toast-icon {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}
.toast-error {
  border-color: rgba(248, 113, 113, 0.4);
}
.toast-error .toast-icon {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}
.toast-info {
  border-color: rgba(167, 139, 250, 0.4);
}
.toast-info .toast-icon {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple-bright);
}
.toast-warning {
  border-color: rgba(251, 191, 36, 0.4);
}
.toast-warning .toast-icon {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

@media (max-width: 520px) {
  .toast-container {
    left: 16px;
    right: 16px;
    max-width: none;
  }
}
