/* Triplan site-wide toast notifications. Owned by assets/js/public/website/triplan-toast.js */

.tp-toast-region {
  position: fixed;
  z-index: 100001;
  right: clamp(16px, 4vw, 28px);
  /* Sit above the floating WhatsApp button (bottom-right). */
  bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.tp-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  border-radius: 14px;
  background: #fff;
  color: var(--tp-ink);
  box-shadow: 0 12px 30px rgb(15 27 45 / 16%);
  border-left: 4px solid var(--tp-primary);
  font: 500 14px/1.45 "Poppins", "Lato", sans-serif;
  pointer-events: auto;
  animation: tp-toast-in 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tp-toast.is-leaving {
  animation: tp-toast-out 180ms ease forwards;
}

.tp-toast__icon {
  flex: 0 0 auto;
  margin-top: 1px;
  font-size: 18px;
  line-height: 1.2;
  color: var(--tp-primary);
}

.tp-toast__body {
  flex: 1 1 auto;
  min-width: 0;
  word-wrap: break-word;
}

.tp-toast__close {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tp-muted);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.tp-toast__close:hover {
  background: var(--tp-surface-2);
  color: var(--tp-ink);
}

.tp-toast__close:focus-visible {
  outline: 3px solid rgb(64 161 183 / 45%);
  outline-offset: 2px;
}

.tp-toast--success {
  border-left-color: #1f9d6b;
}

.tp-toast--success .tp-toast__icon {
  color: #1f9d6b;
}

.tp-toast--error {
  border-left-color: #ef4444;
}

.tp-toast--error .tp-toast__icon {
  color: #ef4444;
}

.tp-toast--warning {
  border-left-color: var(--tp-accent);
}

.tp-toast--warning .tp-toast__icon {
  color: var(--tp-accent);
}

.tp-toast--info {
  border-left-color: var(--tp-primary);
}

.tp-toast--info .tp-toast__icon {
  color: var(--tp-primary);
}

@keyframes tp-toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes tp-toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(8px); }
}

@media (max-width: 560px) {
  .tp-toast-region {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
  }
}

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