:host {
  /* The host element overlays its parent v-map container.
     v-map.css sets position: relative on its host so this lines up.
     pointer-events: none lets map interactions pass through; the toasts
     themselves re-enable pointer-events so they can still be clicked. */
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

.stack {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(420px, calc(100% - 32px));
  padding: 16px;
  box-sizing: border-box;
}

:host([position='top-right']) .stack {
  top: 0;
  right: 0;
}

:host([position='top-left']) .stack {
  top: 0;
  left: 0;
}

:host([position='top']) .stack {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

:host([position='bottom-right']) .stack {
  bottom: 0;
  right: 0;
}

:host([position='bottom-left']) .stack {
  bottom: 0;
  left: 0;
}

:host([position='bottom']) .stack {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(28, 28, 32, 0.95);
  color: #fff;
  border-radius: 8px;
  border-left: 4px solid #ff5252;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  animation: v-map-error-slide-in 200ms ease-out;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.badge {
  flex: none;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 82, 82, 0.2);
  color: #ff8a8a;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.message {
  flex: 1 1 auto;
  word-break: break-word;
}

.close {
  flex: none;
  align-self: flex-start;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: -2px -4px 0 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@keyframes v-map-error-slide-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}
