/* The Codacre toast: hidden below the screen edge, slides up when the visitor reaches the bottom.
   Approved motion (Joel, 2026-11-11). Reduced motion: it simply appears. */

.toast {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  z-index: 6;
  max-width: 360px;
  display: flex;
  align-items: stretch;
  background: var(--ink);
  color: var(--chalk);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(28, 23, 20, 0.25);
  transform: translateY(calc(100% + 40px));
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s;
}

.toast-on {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.toast-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px 12px 12px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius) 0 0 var(--radius);
  transition: background-color var(--ease);
}

.toast-body:hover {
  background: var(--action-hover);
}

.toast-body img {
  flex: 0 0 32px;
}

.toast-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--fs-small);
  line-height: 1.35;
}

.toast-text span {
  opacity: 0.85;
}

.toast-close {
  flex: 0 0 44px;
  border: 0;
  background: none;
  color: var(--chalk);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: background-color var(--ease);
}

.toast-close:hover {
  background: var(--action-hover);
}

.toast :focus-visible {
  outline-color: var(--chalk);
  outline-offset: -3px;
}

.footer {
  padding-bottom: 104px;
}
