.toast-stack {
  position: fixed;
  right: 22px;
  top: 22px;
  z-index: 220;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100% - 32px));
  pointer-events: none;
}
.toast {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr 28px;
  align-items: start;
  gap: 12px;
  padding: 18px 16px 20px;
  background: #fff;
  color: #172033;
  border: 1px solid #e0e5ec;
  border-radius: 14px;
  box-shadow: 0 12px 36px #14213d24;
  overflow: hidden;
  pointer-events: auto;
  animation: toast-enter 0.2s ease-out;
}
.toast p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.toast-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eaf5ee;
  color: #237a44;
  font-size: 15px;
  font-weight: 700;
}
.toast-error .toast-icon {
  background: #fdecef;
  color: #cf2442;
}
.toast-info .toast-icon {
  background: #edf2ff;
  color: #2455d9;
}
.toast-close {
  border: 0;
  background: transparent;
  color: #667085;
  font: 24px/1 sans-serif;
  cursor: pointer;
  padding: 0;
  min-height: 28px;
}
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #2455d9;
  transform-origin: left;
  animation: toast-progress var(--toast-duration) linear forwards;
}
.toast-error .toast-progress {
  background: #d92f47;
}
.toast-success .toast-progress {
  background: #278149;
}
.toast.is-paused .toast-progress {
  animation-play-state: paused;
}
.toast.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
  transition: 0.16s;
}
.confirm-dialog {
  border: 1px solid #e0e5ec;
  border-radius: 16px;
  padding: 26px;
  width: min(420px, calc(100% - 32px));
  color: #172033;
  box-shadow: 0 20px 70px #0d173d30;
}
.confirm-dialog::backdrop {
  background: #101b3e70;
}
.confirm-dialog h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
.confirm-dialog p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 24px;
}
.confirm-dialog .confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toast-progress {
  to {
    transform: scaleX(0);
  }
}
@media (max-width: 600px) {
  .toast-stack {
    top: auto;
    bottom: 18px;
    right: 16px;
  }
  .storefront .toast-stack {
    bottom: 82px;
  }
  .storefront:has(.checkout-mobile-action) .toast-stack {
    bottom: 116px;
  }
  .toast {
    padding: 16px 14px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
  .toast.is-leaving {
    transition: none;
  }
}
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #d92f47 !important;
  outline-color: #d92f47;
}
.toast p {
  color: #25344b;
}
.toast-progress {
  width: 100%;
}
.storefront.overlay-open .toast-stack {
  top: auto;
  bottom: calc(var(--cart-footer-size, 208px) + 16px);
}

/* Confirmation modal */
.modal-open {
  overflow: hidden;
}
.confirm-dialog {
  position: fixed;
  margin: auto;
  padding: 30px;
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid #e5e9ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 90px #09182f30;
  animation: confirm-enter 0.16s ease-out;
}
.confirm-dialog::backdrop {
  background: #13243d80;
  backdrop-filter: blur(4px);
}
.confirm-symbol {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: #edf3ff;
  color: #2455d9;
  border-radius: 15px;
  margin-bottom: 20px;
}
.confirm-symbol svg {
  width: 28px;
  height: 28px;
}
.confirm-danger .confirm-symbol {
  background: #fff0f1;
  color: #e3223f;
}
.confirm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #8b95a4;
  font-size: 26px;
  cursor: pointer;
  padding: 0;
  border-radius: 7px;
}
.confirm-close:hover {
  background: #f3f5f8;
  color: #34445c;
}
.confirm-dialog h2 {
  font-size: 22px;
  line-height: 1.35;
  margin: 0 0 10px;
  letter-spacing: -0.025em;
  padding-right: 12px;
}
.confirm-dialog p {
  color: #718095;
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 26px;
  overflow-wrap: anywhere;
}
.confirm-dialog p strong {
  color: #3b475b;
  font-weight: 600;
}
.confirm-dialog .confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.confirm-dialog .confirm-actions .btn {
  min-height: 46px;
  font-size: 14px;
  border-radius: 10px;
  justify-content: center;
  padding: 12px 14px;
  box-shadow: none;
}
.confirm-dialog .btn.red {
  background: #e5223e;
}
.confirm-dialog .btn.red:hover {
  background: #cd1832;
}
@keyframes confirm-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 540px) {
  .confirm-dialog {
    padding: 25px 22px;
    border-radius: 17px;
  }
  .confirm-dialog h2 {
    font-size: 21px;
  }
  .confirm-dialog p {
    font-size: 14px;
  }
  .confirm-dialog .confirm-actions {
    gap: 10px;
  }
  .confirm-dialog .confirm-actions .btn {
    padding: 12px 9px;
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .confirm-dialog {
    animation: none;
  }
}
