.toast-region {
  width: min(420px, calc(100vw - 118px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.app-foreground-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  padding: 13px 13px 12px;
  border: 1px solid #c9dceb;
  border-left: 4px solid #2a6de8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .2);
  color: #16324f;
  animation: foreground-toast-in .18s ease-out both;
}

.app-foreground-toast.is-warning {
  border-color: #f5d98d;
  border-left-color: #e6a100;
  background: #fffdf6;
}

.app-foreground-toast.is-critical {
  border-color: #efb7b7;
  border-left-color: #cf3030;
  background: #fff8f8;
}

.foreground-toast-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: #175bc7;
  font-size: 16px;
  font-weight: 900;
}

.app-foreground-toast.is-warning .foreground-toast-icon {
  background: #fff0bf;
  color: #9a6500;
}

.app-foreground-toast.is-critical .foreground-toast-icon {
  background: #f9d7d7;
  color: #ad2525;
}

.foreground-toast-copy {
  min-width: 0;
}

.foreground-toast-copy strong {
  display: block;
  color: #153553;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.foreground-toast-copy p {
  margin: 4px 0 0;
  color: #536b82;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.foreground-toast-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

.foreground-toast-actions button {
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
}

.foreground-toast-open {
  min-height: 30px;
  padding: 0 10px;
  background: #e9f2ff;
  color: #1359ba;
  font-size: 11px;
  font-weight: 800;
}

.foreground-toast-open:hover {
  background: #dceaff;
}

.foreground-toast-close {
  width: 30px;
  height: 30px;
  padding: 0;
  background: transparent;
  color: #6b7d90;
  font-size: 20px;
  line-height: 1;
}

.foreground-toast-close:hover {
  background: #eef3f8;
}

.app-foreground-toast.is-leaving {
  opacity: 0;
  transform: translateX(14px);
  transition: opacity .18s ease, transform .18s ease;
}

@keyframes foreground-toast-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 700px) {
  .toast-region {
    width: auto;
    max-width: none;
  }
  .app-foreground-toast {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .foreground-toast-actions {
    grid-column: 2;
    justify-content: flex-end;
  }
}
