/* Ink is shared by Rails flashes, Turbo responses, and browser-only feedback. */
.toast-stack {
  --toast-top: 24px;
  --toast-gutter: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  /* Keep the full shadow inside the scrollport; narrow screens use their existing gutters. */
  --toast-shadow-padding: 56px;
  --toast-top-padding: var(--toast-shadow-padding);
  --toast-inline-padding: min(var(--toast-shadow-padding), max(var(--toast-gutter), calc((100vw - 440px) / 2)));
  position: fixed;
  z-index: 45;
  top: calc(max(var(--toast-top), calc(env(safe-area-inset-top, 0px) + 16px)) - var(--toast-top-padding));
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  padding: var(--toast-top-padding) var(--toast-inline-padding) var(--toast-shadow-padding);
  width: calc(100% - var(--toast-gutter) - var(--toast-gutter) + var(--toast-inline-padding) + var(--toast-inline-padding));
  max-width: calc(440px + var(--toast-inline-padding) + var(--toast-inline-padding));
  max-height: calc(100dvh - max(var(--toast-top), calc(env(safe-area-inset-top, 0px) + 16px)) - env(safe-area-inset-bottom, 0px) + var(--toast-top-padding));
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  pointer-events: none;
}
/* Overflow is keyboard-focusable; keep its scrolling boundary below the navbar. */
.toast-stack[tabindex="0"] { --toast-top-padding: 16px; }
.toast-stack:focus-visible { outline: none; }
/* Turbo replacements can leave whitespace text nodes after the final card. */
.toast-stack:focus-visible:not(:has(> .toast-notification)) {
  --toast-shadow-padding: 8px;
  --toast-inline-padding: 8px;
  outline: 2px solid #656eed;
  outline-offset: 3px;
}
.toast-stack:focus-visible > .toast-notification { outline: 2px solid #656eed; outline-offset: 3px; }
.toast-notification {
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
  width: 440px;
  max-width: 100%;
  padding: 17px 12px 17px 18px;
  border: 1px solid #353c46;
  border-radius: 14px;
  background: #232830;
  color: #fff;
  box-shadow: 0 14px 34px -10px #17223760, 0 3px 8px #17223714;
  font-family: Inter, sans-serif;
  text-align: left;
  pointer-events: auto;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast-notification[data-toast-inline-value="false"] { display: none; }
.toast-stack > .toast-notification { display: flex; animation: toast-enter 200ms cubic-bezier(.2,.7,.3,1); }
.toast-notification__icon {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  height: 32px;
  border-radius: 50%;
  background: #28483f;
  color: #89dfb5;
}
.toast-notification--error .toast-notification__icon { background: #543638; color: #ffa9a0; }
.toast-notification--info .toast-notification__icon { background: #373d61; color: #b8bdfd; }
.toast-notification__copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast-notification__title { font-size: 14px; line-height: 21px; font-weight: 600; letter-spacing: -.15px; }
.toast-notification__description { margin-top: 3px; font-size: 12px; line-height: 18px; font-weight: 400; color: #c0c6d0; }
.toast-notification__copy a { color: #fff; text-decoration: underline; }
.toast-notification__actions { flex-shrink: 0; }
.toast-notification__actions form { margin: 0; }
.toast-notification :is(button, a, input).toast-notification__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #565e6b;
  border-radius: 8px;
  background: #3b424d;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.toast-notification :is(button, a, input).toast-notification__action:hover { background: #4a5362; border-color: #7e8797; }
.toast-notification .toast-notification__action:disabled { opacity: .65; cursor: wait; }
.toast-notification button.toast-notification__close {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: #b0b8c5;
  cursor: pointer;
}
.toast-notification button.toast-notification__close:hover { background: #ffffff14; color: #fff; }
.toast-notification :is(button, a, input):focus-visible { outline: 2px solid #656eed; outline-offset: 3px; }
.toast-notification--leaving { opacity: 0; transform: translateY(-6px); pointer-events: none; }
@keyframes toast-enter { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 420px) {
  .toast-notification { gap: 9px; padding: 14px 8px 14px 12px; flex-wrap: wrap; }
  .toast-notification__copy { flex-basis: calc(100% - 82px); }
  .toast-notification__actions { order: 4; margin-left: 41px; }
  .toast-notification__close { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .toast-notification { transition: none; }
  .toast-stack > .toast-notification { animation: none; }
}
