:root{
  --sw-topbar-h: 64px;
  --sw-safe-top: env(safe-area-inset-top, 0px);
}

.sw-toast-wrap{
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--sw-safe-top) + var(--sw-topbar-h) + 8px);
  z-index: 300; /* under modal, above map */
  padding: 10px 12px 0;
  pointer-events: none;
}

.sw-toast{
  pointer-events: auto;
  display:flex;
  gap:10px;
  align-items:flex-start;
  border-radius: 16px;
  padding: 10px 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(148,163,184,.45);
  box-shadow: 0 12px 34px rgba(0,0,0,.45);
  max-width: 980px;
  margin: 0 auto;
}

.sw-toast-icon{
  width: 30px; height: 30px;
  border-radius: 999px;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
  background: rgba(15,23,42,.55);
  border: 1px solid rgba(148,163,184,.35);
}

.sw-toast-body{ flex: 1; min-width: 0; }

.sw-toast-title{
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .02em;
  margin-bottom: 2px;
}

.sw-toast-msg{
  font-size: 12px;
  opacity: .95;
  line-height: 1.25;
}

.sw-toast-actions{
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.sw-toast-btn{
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(148,163,184,.40);
  background: rgba(15,23,42,.35);
  color: inherit;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}

.sw-toast-x{
  margin-left:auto;
  width: 30px; height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.35);
  background: rgba(15,23,42,.35);
  color: inherit;
  cursor: pointer;
}

.sw-toast-success{ background: rgba(20, 80, 45, 0.35); border-color: rgba(34,197,94,.45); }
.sw-toast-error{ background: rgba(90, 25, 25, 0.35); border-color: rgba(248,113,113,.55); }
.sw-toast-warn{ background: rgba(100, 80, 20, 0.28); border-color: rgba(250,204,21,.55); }
.sw-toast-info{ background: rgba(15, 23, 42, 0.35); }

body[data-theme="light"] .sw-toast{
  background: rgba(255,255,255,.92);
  color: #0B1220;
  border-color: rgba(148,163,184,.55);
  box-shadow: 0 12px 24px rgba(0,0,0,.12);
}
body[data-theme="light"] .sw-toast-icon{ background: rgba(255,255,255,.95); }
body[data-theme="light"] .sw-toast-x{ background: rgba(255,255,255,.95); }

/* SW_TOAST_SUBACTIONS:BEGIN */
.sw-toast-subactions{
  max-width: 980px;
  margin: 10px auto 0;
  display:flex;
  gap:10px;
  justify-content:center;
  pointer-events: auto;
}
/* SW_TOAST_SUBACTIONS:END */
