/* Success confirmations stay visible above long forms on every screen size. */
.toast-region {
  position: fixed;
  top: calc(5.5rem + env(safe-area-inset-top, 0px));
  right: max(1rem, env(safe-area-inset-right, 0px));
  z-index: 1000;
  display: grid;
  gap: .75rem;
  width: min(26rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 7.5rem - env(safe-area-inset-top, 0px));
  overflow-y: auto;
  padding: .25rem;
  filter: drop-shadow(0 .5rem 1rem rgba(10, 53, 43, .16));
  pointer-events: none;
}
.access-page .toast-region { top: max(1rem, env(safe-area-inset-top, 0px)); }
.toast {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem;
  align-items: start;
  gap: .75rem;
  padding: 1rem .65rem 1rem 1rem;
  color: #153f35;
  background: linear-gradient(120deg, #fff 55%, #f0faf5);
  border: 1px solid #cce6d9;
  border-left: .3rem solid #16835c;
  border-radius: 1rem;
  pointer-events: auto;
  animation: toast-arrive .24s ease-out both;
  transition: opacity .18s ease, transform .18s ease;
}
.toast__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #08794f;
  background: #e0f4e9;
  border-radius: 50%;
}
.toast__icon svg { width: 1.3rem; height: 1.3rem; }
.toast__title { display: block; margin: .05rem 0 .2rem; font-size: .95rem; font-weight: 800; line-height: 1.4; }
.toast__message { color: #31574c; font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere; }
.toast__message p { margin: 0; }
.toast__close {
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  margin: -.25rem -.2rem 0 0;
  padding: 0;
  color: #496a60;
  background: transparent;
  border: 0;
  border-radius: .65rem;
  font: inherit;
  cursor: pointer;
}
.toast__close svg { width: 1.1rem; height: 1.1rem; }
.toast__close:hover { color: #123f31; background: #e1f1e8; }
.toast__close:focus-visible { outline: .15rem solid #16835c; outline-offset: .1rem; }
.toast.is-leaving { opacity: 0; transform: translateY(-.4rem); animation: none; }
@keyframes toast-arrive { from { opacity: 0; transform: translateY(-.65rem); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 34rem) {
  .toast-region { left: max(.75rem, env(safe-area-inset-left, 0px)); right: max(.75rem, env(safe-area-inset-right, 0px)); width: auto; }
  .toast { gap: .6rem; padding: .85rem .5rem .85rem .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-leaving { animation: none; transition: none; transform: none; }
}
