/* HOLZCOM toast notifications — shared visual and mobile-safe contract. */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--hc-z-toast, 120);
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: start;
  gap: 10px;
  overflow: hidden;
  padding: 14px 14px 16px;
  color: var(--hc-ink, #1a1714);
  background: rgba(255, 255, 255, .98);
  border: 1px solid var(--hc-line-2, rgba(26, 23, 20, .15));
  border-radius: 14px;
  box-shadow: 0 20px 48px -24px rgba(26, 23, 20, .55);
  pointer-events: auto;
  animation: hc-toast-in .22s ease-out both;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  background: var(--hc-info, #3a6a8a);
}

.toast--success .toast-icon { background: var(--hc-success, #3d6b4f); }
.toast--danger .toast-icon { background: var(--hc-danger, #c9433a); }
.toast--warn .toast-icon { background: var(--hc-warning, #a67426); }

.toast-body { min-width: 0; }
.toast-title { font-weight: 700; line-height: 1.3; }
.toast-msg { margin-top: 2px; color: var(--hc-ink-soft, rgba(26, 23, 20, .7)); line-height: 1.4; }

.toast-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.toast-close:hover { background: var(--hc-accent-soft, rgba(139, 115, 85, .08)); }

.toast-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  opacity: .22;
  transform-origin: left;
  animation: hc-toast-progress linear forwards;
}

.toast.is-closing { animation: hc-toast-out .22s ease-in both; }

@keyframes hc-toast-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hc-toast-out {
  to { opacity: 0; transform: translateY(8px) scale(.98); }
}

@keyframes hc-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 700px) {
  .toast-stack {
    top: calc(64px + env(safe-area-inset-top, 0px));
    right: 12px;
    bottom: auto;
    left: 12px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast.is-closing,
  .toast-progress { animation: none; }
}
