.notification-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 100001;
  width: min(420px, calc(100vw - 1.5rem));
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.notification-container--top-left {
  left: 1.25rem;
  right: auto;
}

.notification-container--top-right {
  right: 1.25rem;
  left: auto;
}

.notification-item {
  --notification-accent: var(--pp-info-700, #1e3a8a);
  --notification-text: #0f172a;
  --notification-bg: #c5ddff;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(27, 27, 27, 0.17);
  background-color: var(--notification-bg);
  color: var(--notification-text);
  padding: 0.75rem 0.85rem;
  pointer-events: auto;
  transform: translateX(106%);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease, box-shadow 220ms ease;
}

.notification-item.is-visible {
  transform: translateX(0);
  opacity: 1;
}

.notification-item.is-leaving {
  transform: translateX(106%);
  opacity: 0;
}

.notification-item:hover {
  box-shadow: 0 10px 26px rgba(27, 27, 27, 0.22);
}

.notification-content {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.notification-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--notification-accent);
}

.notification-icon svg {
  width: 1.02rem;
  height: 1.02rem;
}

.notification-text {
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--notification-text);
  user-select: none;
  word-break: break-word;
}

.notification-close {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  padding: 0.14rem;
  background: transparent;
  transition: background-color 180ms ease, transform 180ms ease;
}

.notification-close:hover {
  background-color: rgba(255, 255, 255, 0.35);
}

.notification-close:active {
  transform: scale(1.07);
}

.notification-progress-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--notification-accent);
  transform-origin: left center;
}

.notification-item.success {
  --notification-accent: var(--pp-success-700, #047857);
  --notification-text: #064e3b;
  --notification-bg: #7dffbc;
}

.notification-item.info {
  --notification-accent: var(--pp-primary-700, #1e3a8a);
  --notification-text: #172554;
  --notification-bg: #7eb8ff;
}

.notification-item.warning {
  --notification-accent: var(--pp-warning-700, #78350f);
  --notification-text: #78350f;
  --notification-bg: #ffe57e;
}

.notification-item.error {
  --notification-accent: var(--pp-error-700, #7f1d1d);
  --notification-text: #7f1d1d;
  --notification-bg: #ff7e7e;
}

.notification-item.loading {
  --notification-accent: var(--pp-primary-700, #1d4ed8);
  --notification-text: #1e3a8a;
  --notification-bg: #bfdbfe;
}

.notification-item.loading .notification-icon svg {
  animation: notification-spin 1s linear infinite;
}

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

@keyframes notification-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .notification-container,
  .notification-container--top-right,
  .notification-container--top-left {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }
}
