.commerce-notices {
  position: fixed;
  inset: 92px 20px auto auto;
  z-index: 1100;
  display: grid;
  gap: 10px;
  width: min(370px, calc(100% - 40px));
  max-height: calc(100dvh - 110px);
  overflow: auto;
  padding: 2px;
  pointer-events: none;
}

.commerce-toast {
  --notice-ink: #25574b;
  --notice-accent: #e4f2ec;
  --notice-rule: #c6e0d6;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--notice-rule);
  border-radius: 14px;
  background: #fff;
  color: var(--text-primary);
  box-shadow: 0 5px 20px #103b421f;
  pointer-events: auto;
  animation: commerce-notice-enter .22s ease-out both;
}

.commerce-toast--info {
  --notice-ink: #225966;
  --notice-accent: #e8f3f5;
  --notice-rule: #cfe3e8;
}

.commerce-toast--error {
  --notice-ink: #893e32;
  --notice-accent: #faece8;
  --notice-rule: #edcec6;
}

.commerce-toast__icon,
.commerce-toast__close {
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.commerce-toast__icon {
  width: 27px;
  height: 27px;
  background: var(--notice-accent);
  color: var(--notice-ink);
  font-weight: 800;
}

.commerce-toast__body {
  display: grid;
  gap: 7px;
  padding-block: 3px;
  font-size: .875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.commerce-toast__body ul {
  margin: 0;
  padding-inline-start: 18px;
}

.commerce-toast__body a.button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--notice-accent);
  color: var(--notice-ink);
  font-size: .8125rem;
  font-weight: 750;
  text-decoration: none;
}

.commerce-toast__close {
  width: 34px;
  height: 34px;
  color: var(--notice-ink);
  font-size: 1.125rem;
  cursor: pointer;
}

.commerce-toast__close:hover,
.commerce-toast__body a.button:hover {
  background: var(--notice-accent);
  text-decoration: underline;
}

.commerce-toast :is(a, button):focus-visible {
  outline: 2px solid var(--notice-ink);
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .commerce-notices {
    inset: 80px 10px auto;
    width: auto;
    max-width: 410px;
    margin-inline-start: auto;
  }
}

@keyframes commerce-notice-enter {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

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