/* Site-wide toast region. Tokens from theme.css; dark/light swap automatically. */
.cc-toast-region {
  position: fixed;
  right: 16px;
  /* Every page carries this region, so it is the widest-reach occupant of the
     bottom edge. max(): a lone floating element, not a rung of a scale. */
  bottom: max(16px, var(--safe-bottom));
  z-index: 1080;                 /* above Bootstrap modals' backdrop siblings */
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;          /* the region itself is click-through */
}

.cc-toast {
  pointer-events: auto;          /* toasts are interactive */
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  font-size: .9rem;
  line-height: 1.35;
  /* enter/exit state */
  opacity: 0;
  transform: translateY(var(--motion-rise-distance));
  transition: opacity var(--motion-med) var(--ease-enter),
              transform var(--motion-med) var(--ease-enter);
}
.cc-toast.is-in { opacity: 1; transform: translateY(0); }
.cc-toast.is-out {
  opacity: 0;
  transform: translateY(var(--motion-rise-distance));
  transition: opacity var(--motion-med) var(--ease-exit),
              transform var(--motion-med) var(--ease-exit);
}

.cc-toast--success { border-left-color: var(--success); }
.cc-toast--error   { border-left-color: var(--accent-interest); }
.cc-toast--info    { border-left-color: var(--brand); }

.cc-toast__icon { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }
.cc-toast--success .cc-toast__icon { color: var(--success); }
.cc-toast--error   .cc-toast__icon { color: var(--accent-interest); }
.cc-toast--info    .cc-toast__icon { color: var(--brand); }

.cc-toast__msg { flex: 1 1 auto; word-break: break-word; }

.cc-toast__action {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 0 2px;
  color: var(--brand);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.cc-toast__close {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 0 2px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.cc-toast__close:hover { color: var(--text); }

@media (max-width: 575.98px) {
  .cc-toast-region {
    left: 12px;
    right: 12px;
    bottom: max(12px, var(--safe-bottom));
    max-width: none;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-toast, .cc-toast.is-out {
    transition: opacity var(--motion-med) linear;
    transform: none;
  }
  .cc-toast.is-in { transform: none; }
}
