/* ============================================================
   react-simple-snackbar — standalone CSS (plain class names)
   ============================================================ */

/* ── Wrapper positions ───────────────────────────────────── */

.snackbar-wrapper {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
}

.snackbar-wrapper-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.snackbar-wrapper-top-left {
  top: 24px;
  left: 24px;
}

.snackbar-wrapper-top-center {
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
}

.snackbar-wrapper-top-right {
  top: 24px;
  right: 24px;
}

.snackbar-wrapper-bottom-left {
  bottom: 24px;
  left: 24px;
}

.snackbar-wrapper-bottom-center {
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
}

.snackbar-wrapper-bottom-right {
  bottom: 24px;
  right: 24px;
}

/* ── Snackbar box ────────────────────────────────────────── */

.snackbar {
  min-width: 400px;
  max-width: 580px;
  padding: 16px 18px 16px 22px;
  background: rgba(15, 15, 20, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  font-weight: 450;
  line-height: 1.55;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  pointer-events: all;
}

/* ── Progress bar ────────────────────────────────────────── */

.snackbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  border-radius: 0 0 16px 16px;
  animation: snackbar-progress var(--snackbar-duration, 6000ms) linear forwards;
  transform-origin: left center;
}

@keyframes snackbar-progress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ── Text ────────────────────────────────────────────────── */

.snackbar__text {
  flex: 1;
}

/* ── Close button ────────────────────────────────────────── */

.snackbar__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  color: #94a3b8;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 180ms ease, color 180ms ease;
  padding: 0;
  margin: 0;
}

.snackbar__close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
}

/* ── CSSTransition animations — center ──────────────────── */

.snackbar-enter-center {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
}
.snackbar-enter-active-center {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 280ms ease, transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.snackbar-exit-center {
  opacity: 1;
}
.snackbar-exit-active-center {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 200ms ease, transform 220ms ease-in;
}

/* ── CSSTransition animations — top-center ──────────────── */

.snackbar-enter-top-center {
  opacity: 0;
  transform: translateX(-50%) translateY(-24px) scale(0.95);
}
.snackbar-enter-active-top-center {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  transition: opacity 250ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}
.snackbar-exit-top-center {
  opacity: 1;
}
.snackbar-exit-active-top-center {
  opacity: 0;
  transform: translateX(-50%) translateY(-16px) scale(0.95);
  transition: opacity 200ms ease, transform 220ms ease-in;
}

/* ── CSSTransition animations — bottom-center ───────────── */

.snackbar-enter-bottom-center {
  opacity: 0;
  transform: translateX(-50%) translateY(24px) scale(0.95);
}
.snackbar-enter-active-bottom-center {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  transition: opacity 250ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}
.snackbar-exit-bottom-center {
  opacity: 1;
}
.snackbar-exit-active-bottom-center {
  opacity: 0;
  transform: translateX(-50%) translateY(16px) scale(0.95);
  transition: opacity 200ms ease, transform 220ms ease-in;
}

/* ── CSSTransition animations — top corners ─────────────── */

.snackbar-enter-top-left,
.snackbar-enter-top-right {
  opacity: 0;
  transform: translateY(-24px) scale(0.95);
}
.snackbar-enter-active-top-left,
.snackbar-enter-active-top-right {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 250ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}
.snackbar-exit-top-left,
.snackbar-exit-top-right {
  opacity: 1;
}
.snackbar-exit-active-top-left,
.snackbar-exit-active-top-right {
  opacity: 0;
  transform: translateY(-16px) scale(0.95);
  transition: opacity 200ms ease, transform 220ms ease-in;
}

/* ── CSSTransition animations — bottom corners ──────────── */

.snackbar-enter-bottom-left,
.snackbar-enter-bottom-right {
  opacity: 0;
  transform: translateY(24px) scale(0.95);
}
.snackbar-enter-active-bottom-left,
.snackbar-enter-active-bottom-right {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 250ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}
.snackbar-exit-bottom-left,
.snackbar-exit-bottom-right {
  opacity: 1;
}
.snackbar-exit-active-bottom-left,
.snackbar-exit-active-bottom-right {
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  transition: opacity 200ms ease, transform 220ms ease-in;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 540px) {
  .snackbar-wrapper-center,
  .snackbar-wrapper-top-left,
  .snackbar-wrapper-top-center,
  .snackbar-wrapper-top-right,
  .snackbar-wrapper-bottom-left,
  .snackbar-wrapper-bottom-center,
  .snackbar-wrapper-bottom-right {
    bottom: 16px;
    left: 16px;
    right: 16px;
    top: auto;
    transform: none;
  }

  .snackbar {
    min-width: unset;
    max-width: unset;
    width: 100%;
    box-sizing: border-box;
  }
}
