/* === TOASTS (bottom, centered, soft gradients) === */
.toast-host{
  position: fixed;
  left: 0;
  right: 0;

  /* Above bottom edit bar + safe area */
  bottom: calc(92px + env(safe-area-inset-bottom));

  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;

  /* True centering */
  align-items: center;
  justify-content: flex-end;

  padding: 0 12px;
  pointer-events: none;
}

.toast{
  pointer-events: auto;

  width: min(560px, calc(100vw - 24px));
  margin: 0;                 /* important: don't auto-margin fight flex centering */
  box-sizing: border-box;

  border-radius: 14px;
  padding: 12px 14px;

  display: flex;
  gap: 12px;
  align-items: flex-start;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);

  opacity: 0;
  transform: translateY(10px);
  transition: opacity 170ms ease, transform 170ms ease;
}

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

.toast__icon{
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 1px;
  opacity: 0.95;
}
.toast__icon svg{ width: 22px; height: 22px; }

.toast__body{ flex: 1 1 auto; min-width: 0; }
.toast__title{ font-weight: 650; font-size: 13px; letter-spacing: 0.2px; margin-bottom: 2px; }
.toast__msg{ margin: 0; font-size: 12.5px; line-height: 1.35; opacity: 0.92; word-break: break-word; }

.toast__close{
  border: 0;
  background: transparent;
  color: inherit;
  padding: 6px;
  margin: -6px -6px 0 0;
  opacity: 0.8;
  cursor: pointer;
}
.toast__close:hover{ opacity: 1; }
.toast__close svg{ width: 18px; height: 18px; }

/* ===== VARIANTS (soft gradients + gentle glow) ===== */
.toast--info{
  background: linear-gradient(135deg, rgba(80,150,255,0.22), rgba(20,20,24,0.55));
  border-color: rgba(120,170,255,0.28);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28), 0 0 0 1px rgba(120,170,255,0.10) inset;
}

.toast--success{
  background: linear-gradient(135deg, rgba(40,190,120,0.20), rgba(20,20,24,0.55));
  border-color: rgba(80,220,150,0.28);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28), 0 0 0 1px rgba(80,220,150,0.10) inset;
}

.toast--warning{
  background: linear-gradient(135deg, rgba(255,190,80,0.22), rgba(20,20,24,0.55));
  border-color: rgba(255,210,120,0.30);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28), 0 0 0 1px rgba(255,210,120,0.12) inset;
}

.toast--error{
  background: linear-gradient(135deg, rgba(255,90,120,0.22), rgba(20,20,24,0.55));
  border-color: rgba(255,120,150,0.28);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28), 0 0 0 1px rgba(255,120,150,0.10) inset;
}

/* Light mode tweaks */
@media (prefers-color-scheme: light){
  .toast{
    color: #111;
    border: 1px solid rgba(0,0,0,0.10);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  }

  .toast--info{
    background: linear-gradient(135deg, rgba(80,150,255,0.18), rgba(255,255,255,0.88));
    border-color: rgba(80,150,255,0.22);
  }
  .toast--success{
    background: linear-gradient(135deg, rgba(40,190,120,0.16), rgba(255,255,255,0.88));
    border-color: rgba(40,190,120,0.20);
  }
  .toast--warning{
    background: linear-gradient(135deg, rgba(255,190,80,0.20), rgba(255,255,255,0.88));
    border-color: rgba(255,190,80,0.22);
  }
  .toast--error{
    background: linear-gradient(135deg, rgba(255,90,120,0.16), rgba(255,255,255,0.88));
    border-color: rgba(255,90,120,0.20);
  }
}
