/* Toasts — django-htmx-messages (Bootstrap .toast-container) theme */

/* Primary toast surface */
.toast-container .toast {
  pointer-events: auto !important;
  min-width: 300px !important;
  margin-bottom: 0.5rem !important;
  background-color: #3D255A !important; /* brand purple */
  color: #ffffff !important;
  border-radius: 2px !important;
  border: 1px solid #d2b5fd !important; /* lavender border */
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* If the integration renders alerts instead of .toast */
.toast-container > *,
.toast-container .alert {
  background-color: #3D255A !important;
  color: #ffffff !important;
  border-radius: 2px !important;
  border: 1px solid #d2b5fd !important;
}

/* Neutralize Bootstrap bg-* utilities inside the toast so theme dominates */
.toast-container .bg-success,
.toast-container .bg-info,
.toast-container .bg-warning,
.toast-container .bg-danger,
.toast-container .bg-primary,
.toast-container .bg-secondary,
.toast-container .bg-light,
.toast-container .bg-dark {
  background-color: transparent !important;
  color: inherit !important;
}

/* Body and header inherit the parent toast’s background */
.toast-container .toast-body,
.toast-container .toast-header {
  background-color: transparent !important;
  color: #ffffff !important;
}

/* Ensure the close icon is visible on dark background */
.toast-container .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}
/* Center the toast container horizontally and 35% from top */
.toast-container {
  position: fixed !important;
  top: 35% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  right: auto !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  pointer-events: none !important; /* allow clicks to pass except toasts */
}

/* Make each toast clickable while container is non-interactive */
.toast-container .toast { pointer-events: auto !important; border-radius: 10px !important; }


/* Level-specific overrides (django messages tags) */
/* Success */
.toast-container .toast.success,
.toast-container .alert.success {
  background-color: #198754 !important; /* Bootstrap success green */
  color: #ffffff !important;
  border-color: #9fe0c2 !important;
}
/* Info */
.toast-container .toast.info,
.toast-container .alert.info {
  background-color: #1176d3 !important; /* blue */
  color: #eef7ff !important;
  border-color: #58b2ff !important;
}
/* Warning */
.toast-container .toast.warning,
.toast-container .alert.warning {
  background-color: #f4b000 !important; /* amber */
  color: #0b0b0b !important;
  border-color: #ffde59 !important;
}
/* Error */
.toast-container .toast.error,
.toast-container .alert.error {
  background-color: #d03a3a !important; /* red */
  color: #ffffff !important;
  border-color: #ff5a5a !important;
}


/* Debug (link to primary theme color) */
.toast-container .toast.debug,
.toast-container .alert.debug {
  background-color: var(--bs-primary, #0d6efd) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,0.4) !important;
}
