/* Care First toasts — shared by the public site, the static admin and the React admin. */
.cf-toaster {
  --toast-ink: #172d2a;
  --toast-paper: #fffdf9;
  --toast-line: rgba(23, 45, 42, .1);
  --toast-ease: cubic-bezier(.22, 1, .36, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  inset: 20px 20px auto auto;
  max-width: calc(100vw - 32px);
  pointer-events: none;
  position: fixed;
  width: 380px;
  z-index: 1000;
}

.cf-toast {
  --accent: #2f8f6b;
  --accent-soft: rgba(47, 143, 107, .12);
  align-items: flex-start;
  backdrop-filter: blur(14px);
  background: var(--toast-paper);
  border: 1px solid var(--toast-line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23, 45, 42, .06), 0 18px 40px -12px rgba(23, 45, 42, .28);
  color: var(--toast-ink);
  display: grid;
  font-family: 'DM Sans', system-ui, sans-serif;
  gap: 2px 12px;
  grid-template-columns: 36px 1fr 28px;
  overflow: hidden;
  padding: 14px 12px 16px 14px;
  pointer-events: auto;
  position: relative;
  animation: cf-toast-in .5s var(--toast-ease) both;
}
.cf-toast[data-variant="error"] { --accent: #c2493a; --accent-soft: rgba(194, 73, 58, .12); }
.cf-toast[data-variant="info"] { --accent: #3d6f8f; --accent-soft: rgba(61, 111, 143, .12); }
.cf-toast[data-variant="warning"] { --accent: #b7791f; --accent-soft: rgba(183, 121, 31, .14); }

.cf-toast::before { /* accent rail */
  background: var(--accent);
  border-radius: 0 4px 4px 0;
  content: '';
  inset: 12px auto 12px 0;
  position: absolute;
  width: 3px;
}

.cf-toast__icon {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 50%;
  color: var(--accent);
  display: flex;
  grid-row: span 2;
  height: 36px;
  justify-content: center;
  width: 36px;
}
.cf-toast__icon svg { height: 18px; width: 18px; }
.cf-toast[data-variant="success"] .cf-toast__icon svg path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: cf-toast-check .45s .2s ease-out forwards; }

.cf-toast__title { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; margin: 1px 0 0; }
.cf-toast__message { color: rgba(23, 45, 42, .72); font-size: 13.5px; grid-column: 2; line-height: 1.45; margin: 0; }

.cf-toast__close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: rgba(23, 45, 42, .5);
  cursor: pointer;
  display: flex;
  grid-column: 3;
  grid-row: 1;
  height: 28px;
  justify-content: center;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
  width: 28px;
}
.cf-toast__close:hover { background: rgba(23, 45, 42, .07); color: var(--toast-ink); transform: rotate(90deg); }
.cf-toast__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cf-toast__close svg { height: 14px; width: 14px; }

.cf-toast__action {
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  font: 700 13px 'DM Sans', system-ui, sans-serif;
  grid-column: 2;
  justify-self: start;
  margin-top: 6px;
  padding: 0;
}
.cf-toast__action:hover { text-decoration: underline; }

.cf-toast__progress {
  background: var(--accent);
  bottom: 0;
  height: 3px;
  left: 0;
  opacity: .55;
  position: absolute;
  transform-origin: left;
  width: 100%;
  animation: cf-toast-progress linear forwards;
  animation-duration: var(--toast-duration, 5000ms);
}
.cf-toast:hover .cf-toast__progress,
.cf-toast:focus-within .cf-toast__progress,
.cf-toast[data-paused] .cf-toast__progress { animation-play-state: paused; }

.cf-toast[data-leaving] { animation: cf-toast-out .32s var(--toast-ease) forwards; }

@keyframes cf-toast-in {
  from { opacity: 0; transform: translateX(28px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes cf-toast-out {
  to { opacity: 0; transform: translateX(28px) scale(.96); margin-top: calc(var(--toast-height, 80px) * -1 - 10px); }
}
@keyframes cf-toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes cf-toast-check { to { stroke-dashoffset: 0; } }

@media (max-width: 640px) {
  .cf-toaster { inset: auto 12px 76px 12px; flex-direction: column-reverse; width: auto; }
  @keyframes cf-toast-in { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  .cf-toast, .cf-toast[data-leaving] { animation-duration: 1ms; }
  .cf-toast__progress { display: none; }
}
