.info-box-stack {
  position: fixed;
  z-index: 1200;
  left: auto;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  width: min(380px, calc(100vw - 2rem));
  gap: 0.6rem;
  pointer-events: none;
}

.info-box {
  --info-accent: #2e7d32;
  --info-surface: #eef8ec;
  --info-text: #1f5a28;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  overflow: hidden;
  padding: 0.85rem 0.85rem 0.85rem 0.95rem;
  border: 1px solid rgba(20, 45, 24, 0.08);
  border-left: 4px solid var(--info-accent);
  border-radius: 12px;
  background: var(--info-surface);
  color: var(--info-text);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 12px 30px rgba(20, 45, 24, 0.16);
  transition: opacity 0.2s ease, transform 0.25s ease;
  animation: info-box-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}

.info-box-error {
  --info-accent: #c62828;
  --info-surface: #fff1f2;
  --info-text: #9f2634;
}

.info-box-warning {
  --info-accent: #c98a0a;
  --info-surface: #fff8e6;
  --info-text: #875709;
}

.info-box-info {
  --info-accent: #2f6db0;
  --info-surface: #eef5ff;
  --info-text: #24568a;
}

.info-box-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: var(--info-accent);
}

.info-box-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}

.info-box-text {
  min-width: 0;
  word-break: break-word;
}

.info-box-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--info-text);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.info-box-close svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.info-box-close:hover,
.info-box-close:focus-visible {
  background: rgba(20, 45, 24, 0.12);
  outline: none;
  transform: scale(1.08);
}

.info-box-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left center;
  background: var(--info-accent);
  opacity: 0.55;
  animation: info-box-progress 5s linear forwards;
}

.info-box.is-leaving {
  opacity: 0;
  transform: translateX(12px);
}

@keyframes info-box-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

  .info-box-progress {
    animation: none;
    opacity: 0.35;
  }
}
