/* ============================================================
   Beni Boarding Portal — Unique popups & toasts
   ============================================================ */

/* ---- Toast stack ---- */
#bb-toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.bb-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.06);
  animation: bbToastIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  position: relative;
}
.bb-toast.bb-out {
  animation: bbToastOut 0.28s ease forwards;
}
@keyframes bbToastIn {
  from { opacity: 0; transform: translateX(24px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes bbToastOut {
  to { opacity: 0; transform: translateX(20px) scale(0.96); }
}
.bb-toast-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px; color: #fff;
}
.bb-toast-body { flex: 1; min-width: 0; }
.bb-toast-title {
  font-size: 13px; font-weight: 700; color: #0f172a; margin: 0 0 2px;
}
.bb-toast-msg {
  font-size: 13px; color: #475569; line-height: 1.4; margin: 0;
}
.bb-toast-close {
  border: none; background: transparent; color: #94a3b8;
  cursor: pointer; padding: 2px; font-size: 14px; line-height: 1;
}
.bb-toast-close:hover { color: #475569; }
.bb-toast-bar {
  position: absolute; left: 0; bottom: 0; height: 3px;
  border-radius: 0 0 14px 14px; animation: bbBar linear forwards;
}
@keyframes bbBar { from { width: 100%; } to { width: 0%; } }

/* Toast variants — unique colors */
.bb-toast.success .bb-toast-icon { background: linear-gradient(135deg, #10b981, #059669); }
.bb-toast.success .bb-toast-bar { background: linear-gradient(90deg, #10b981, #34d399); }
.bb-toast.success { border-left: 4px solid #10b981; }

.bb-toast.error .bb-toast-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }
.bb-toast.error .bb-toast-bar { background: linear-gradient(90deg, #ef4444, #f87171); }
.bb-toast.error { border-left: 4px solid #ef4444; }

.bb-toast.warning .bb-toast-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.bb-toast.warning .bb-toast-bar { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.bb-toast.warning { border-left: 4px solid #f59e0b; }

.bb-toast.info .bb-toast-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.bb-toast.info .bb-toast-bar { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.bb-toast.info { border-left: 4px solid #3b82f6; }

/* ---- Modal / confirm popup ---- */
.bb-modal-overlay {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: bbFadeIn 0.2s ease;
}
@keyframes bbFadeIn { from { opacity: 0; } to { opacity: 1; } }
.bb-modal {
  width: 100%; max-width: 420px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.28);
  overflow: hidden;
  animation: bbModalPop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes bbModalPop {
  from { opacity: 0; transform: translateY(16px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.bb-modal-top {
  padding: 28px 24px 12px;
  text-align: center;
}
.bb-modal-icon {
  width: 64px; height: 64px; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff; margin-bottom: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.15);
}
.bb-modal.success .bb-modal-icon { background: linear-gradient(135deg, #10b981, #059669); }
.bb-modal.error .bb-modal-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }
.bb-modal.warning .bb-modal-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.bb-modal.info .bb-modal-icon { background: linear-gradient(135deg, #6366f1, #7c3aed); }
.bb-modal.confirm .bb-modal-icon { background: linear-gradient(135deg, #6366f1, #4f46e5); }

.bb-modal-title {
  margin: 0 0 8px; font-size: 18px; font-weight: 700; color: #0f172a;
}
.bb-modal-msg {
  margin: 0; font-size: 14px; color: #64748b; line-height: 1.5;
}
.bb-modal-actions {
  display: flex; gap: 10px; padding: 16px 24px 24px;
  justify-content: center; flex-wrap: wrap;
}
.bb-modal-btn {
  min-width: 110px; padding: 11px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 600; cursor: pointer; border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.bb-modal-btn:hover { transform: translateY(-1px); }
.bb-modal-btn.primary {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff; box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}
.bb-modal-btn.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff; box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}
.bb-modal-btn.success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff; box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}
.bb-modal-btn.ghost {
  background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0;
}

/* Alert banner (inline page messages) */
.bb-alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 12px; margin-bottom: 16px;
  border: 1px solid transparent;
}
.bb-alert i { font-size: 18px; margin-top: 1px; }
.bb-alert.success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.bb-alert.error   { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.bb-alert.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.bb-alert.info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.bb-alert-title { font-weight: 700; font-size: 13px; margin: 0 0 2px; }
.bb-alert-msg { font-size: 13px; margin: 0; opacity: 0.95; }
