/*
 * HPDP Toast styles
 * Self-contained (no Tailwind utility classes at runtime) so toasts render
 * consistently even if Tailwind is purged on a given page.
 */

.hpdp-toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: auto;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

body.admin-bar .hpdp-toast-container {
  top: 56px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .hpdp-toast-container {
    top: 70px;
  }
}

.hpdp-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 440px;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.35;
  pointer-events: auto;
  animation: hpdp-toast-in 220ms ease-out both;
  box-sizing: border-box;
}

.hpdp-toast--leaving {
  animation: hpdp-toast-out 220ms ease-in both;
}

.hpdp-toast--error {
  background-color: #842029;
}

.hpdp-toast--info {
  background-color: #1f2937;
}

.hpdp-toast__body {
  flex: 1 1 auto;
  word-break: break-word;
}

.hpdp-toast__action {
  flex: 0 0 auto;
  background-color: rgba(255, 255, 255, 0.15);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.hpdp-toast__action:hover,
.hpdp-toast__action:focus-visible {
  background-color: rgba(255, 255, 255, 0.28);
  outline: none;
}

.hpdp-toast__close {
  flex: 0 0 auto;
  background: transparent;
  color: inherit;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.hpdp-toast__close:hover,
.hpdp-toast__close:focus-visible {
  opacity: 1;
  outline: none;
}

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

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

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

@media (max-width: 780px) {
  .hpdp-toast-container {
    left: 16px;
    right: 16px;
    transform: none;
    max-width: none;
  }

  .hpdp-toast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}
