#butterfly-toast-container {
  position: fixed;
  z-index: 100000;
  left: 50%;
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 16px));
  display: flex;
  width: min(560px, calc(100vw - 32px));
  transform: translateX(-50%);
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  pointer-events: none;
}

.butterfly-toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(23, 43, 73, .16);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: auto;
}

.butterfly-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.butterfly-toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}

.butterfly-toast--error {
  border-color: #f0a2ae;
  background: #fff1f3;
  color: #a42338;
}

.butterfly-toast--success {
  border-color: #9bd6ad;
  background: #effbf2;
  color: #23783c;
}

.butterfly-toast--info {
  border-color: #a9caff;
  background: #eef5ff;
  color: #245da9;
}

.butterfly-toast__content,
.butterfly-toast__content > * {
  min-width: 0;
}

.butterfly-toast__content > .woocommerce-error,
.butterfly-toast__content > .woocommerce-info,
.butterfly-toast__content > .woocommerce-message,
.butterfly-toast__content > .checkout-inline-error-message {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.butterfly-toast__content > .woocommerce-error::before,
.butterfly-toast__content > .woocommerce-info::before,
.butterfly-toast__content > .woocommerce-message::before {
  display: none !important;
}

.butterfly-toast__content ul {
  list-style: none;
}

.butterfly-toast__content li + li {
  margin-top: 5px;
}

.butterfly-toast__content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.butterfly-toast__close {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .66);
  color: currentColor;
  font-size: 21px;
  line-height: 24px;
  cursor: pointer;
}

.butterfly-toast__close:hover,
.butterfly-toast__close:focus-visible {
  background: rgba(255, 255, 255, .95);
}

@media (max-width: 650px) {
  #butterfly-toast-container {
    width: min(100% - 24px, 560px);
    bottom: max(12px, calc(env(safe-area-inset-bottom) + 10px));
  }

  .butterfly-toast {
    padding: 12px 13px;
    border-radius: 12px;
  }

  .butterfly-toast__content > .woocommerce-error,
  .butterfly-toast__content > .woocommerce-info,
  .butterfly-toast__content > .woocommerce-message,
  .butterfly-toast__content > .checkout-inline-error-message {
    font-size: 13px;
  }
}

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