/* ═══════════════════════════════════════════════════════════════
   HABIBAYAN TOAST / SNACKBAR
   Injected into all Jinja pages via hooks.py web_include_css.
   Replaces native alert() with a non-blocking snackbar that stays
   on screen until the member dismisses it.
   ═══════════════════════════════════════════════════════════════ */

.hb-toast-stack {
  position: fixed;
  z-index: 99999;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  max-width: min(420px, calc(100vw - 48px));
  pointer-events: none;
}

.hb-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid rgba(28, 26, 22, 0.08);
  border-left: 4px solid var(--text-mid, #5A5248);
  box-shadow: 0 10px 32px rgba(26, 26, 46, 0.18);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-dark, #1C1A16);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.hb-toast.hb-toast-in {
  opacity: 1;
  transform: translateY(0);
}

.hb-toast.hb-toast-out {
  opacity: 0;
  transform: translateY(12px);
}

.hb-toast-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.hb-toast-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.hb-toast-body { flex: 1 1 auto; min-width: 0; }

.hb-toast-title {
  font-weight: 700;
  margin: 0 0 2px;
  font-size: 0.92rem;
}

.hb-toast-message {
  margin: 0;
  color: var(--text-mid, #5A5248);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.hb-toast-close {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  padding: 2px;
  margin: -2px -2px 0 0;
  cursor: pointer;
  border-radius: 6px;
  color: var(--text-light, #9C9080);
  line-height: 0;
  transition: color 0.15s, background 0.15s;
}

.hb-toast-close:hover {
  color: var(--text-dark, #1C1A16);
  background: rgba(28, 26, 22, 0.06);
}

.hb-toast-close svg { width: 16px; height: 16px; display: block; }

/* ─── Variants ─── */
.hb-toast-success { border-left-color: var(--accent-green, #2D6A4F); }
.hb-toast-success .hb-toast-icon { color: var(--accent-green, #2D6A4F); }

.hb-toast-error { border-left-color: #C0392B; }
.hb-toast-error .hb-toast-icon { color: #C0392B; }

.hb-toast-info { border-left-color: var(--sunset, #E8622A); }
.hb-toast-info .hb-toast-icon { color: var(--sunset, #E8622A); }

/* ─── Mobile ─── */
@media (max-width: 640px) {
  .hb-toast-stack {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hb-toast { transition: none; }
}
