/*
  V2 Toast
  - Full width overlay toast (does not shift layout)
  - Designed to sit above header

  Toggle via JS:
    .v2-toast.is-visible
*/

.v2-toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;

  font-family: var(--v2-font-family);

  /* Hidden by default */
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;

  /* Smooth entrance/exit */
  transition: opacity 160ms ease, transform 180ms ease;

  /* Give breathing room from edges */
  padding: 10px 12px;
}

.v2-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.v2-toast__inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

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

  /* Default (info) */
  background: rgba(15, 23, 42, 0.94); /* slate-ish */
  color: #fff;

  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px);
  font-family: inherit;
}

.v2-toast__message {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 600;
  text-align: center;

  /* prevent weird wrapping in narrow spaces */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-toast__close {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;

  font-size: 18px;
  line-height: 1;
  font-weight: 700;

  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

.v2-toast__close:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Variants */
.v2-toast--success .v2-toast__inner {
  background: rgba(16, 185, 129, 0.92); /* emerald */
}

.v2-toast--error .v2-toast__inner {
  background: rgba(239, 68, 68, 0.92); /* red */
}

.v2-toast--info .v2-toast__inner {
  background: rgba(15, 23, 42, 0.94);
}

/* Mobile: allow wrapping */
@media (max-width: 480px) {
  .v2-toast__message {
    white-space: normal;
  }
}
