/* Toast — 对齐站点主色 / 字体 / 圆角 */

.toast-host {
  position: fixed;
  z-index: 9999;
  left: 50%;
  top: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(calc(100vw - 32px), 360px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast-item {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md, 8px);
  background: rgba(31, 31, 31, 0.92);
  box-shadow: var(--shadow-sm);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  word-break: break-word;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.toast-item.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-item.is-out {
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
}

.toast-item__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.toast-item__text {
  flex: 1 1 auto;
  min-width: 0;
}

.toast-item--success {
  background: rgba(236, 72, 153, 0.95);
}

.toast-item--success .toast-item__icon {
  background: rgba(255, 255, 255, 0.22);
}

.toast-item--error {
  background: rgba(239, 68, 68, 0.95);
}

.toast-item--warning {
  background: rgba(245, 158, 11, 0.95);
}

.toast-item--info {
  background: rgba(31, 31, 31, 0.92);
}

@media (max-width: 767px) {
  .toast-host {
    top: auto;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    width: min(calc(100vw - 24px), 320px);
  }

  .toast-item {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 18px;
  }
}
