/* ===== Toast 遮罩 ===== */
.toast-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* 显示状态 */
.toast-mask.show {
  opacity: 1;
  pointer-events: auto;
}

/* ===== Toast 本体 ===== */
.toast {
  min-width: 120px;
  max-width: 70%;
  padding: 16px 20px;
  background: rgba(60, 60, 60, 0.88);
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  text-align: center;
  box-sizing: border-box;
  transform: scale(0.9);
  transition: transform 0.25s ease;
}

/* 出现动画 */
.toast-mask.show .toast {
  transform: scale(1);
}

/* ===== icon ===== */
.toast-icon {
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
}

/* loading */
.toast-loading {
  width: 26px;
  height: 26px;
  margin-left: auto;
  margin-right: auto;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: toast-spin 1s linear infinite;
}

/* success / error */
.toast-success::before {
  content: "✔";
  font-size: 22px;
}

.toast-error::before {
  content: "✖";
  font-size: 22px;
}

@keyframes toast-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== iPhone 安全区 ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .toast {
    margin-bottom: env(safe-area-inset-bottom);
  }
}
