/* ==============================================================================
   OTPMailbox – Professional Notification System
   Replaces all native alert() / confirm() / prompt() with glassmorphism UI
   ============================================================================== */

/* ── Backdrop ──────────────────────────────────────────────────────────────── */
#nb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 35, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}
#nb-overlay.nb-open {
  opacity: 1;
  pointer-events: all;
}

/* ── Dialog box ────────────────────────────────────────────────────────────── */
.nb-dialog {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  box-shadow:
    0 32px 64px rgba(15, 23, 42, 0.18),
    0 8px 24px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255,255,255,0.9);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  margin: 1rem;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#nb-overlay.nb-open .nb-dialog {
  transform: scale(1) translateY(0);
}

/* ── Icon ──────────────────────────────────────────────────────────────────── */
.nb-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.nb-icon-wrap.nb-alert   { background: linear-gradient(135deg,#ff6b6b,#ee5a24); }
.nb-icon-wrap.nb-warn    { background: linear-gradient(135deg,#ffd32a,#f0932b); }
.nb-icon-wrap.nb-success { background: linear-gradient(135deg,#05c46b,#0be881); }
.nb-icon-wrap.nb-info    { background: linear-gradient(135deg,#2563eb,#0ea5e9); }
.nb-icon-wrap.nb-confirm { background: linear-gradient(135deg,#8e44ad,#9b59b6); }
.nb-icon-wrap.nb-prompt  { background: linear-gradient(135deg,#2563eb,#0ea5e9); }

/* ── Text ──────────────────────────────────────────────────────────────────── */
.nb-title {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin: 0 0 0.5rem;
}
.nb-message {
  font-size: 0.9rem;
  color: #475569;
  text-align: center;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

/* ── Input (for prompt) ────────────────────────────────────────────────────── */
.nb-input {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  margin-bottom: 1.25rem;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.nb-input:focus { border-color: #2563eb; background: #fff; }

/* ── Copy box (for API key display) ───────────────────────────────────────── */
.nb-copy-box {
  background: #0f172a;
  color: #7dd3fc;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  word-break: break-all;
  margin-bottom: 1.25rem;
  position: relative;
  cursor: pointer;
  user-select: all;
}
.nb-copy-box:after {
  content: 'Click to copy';
  position: absolute;
  bottom: -18px;
  right: 0;
  font-size: 0.7rem;
  color: #94a3b8;
  font-family: 'Inter', sans-serif;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.nb-actions {
  display: flex;
  gap: 0.6rem;
}
.nb-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}
.nb-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.nb-btn:active { transform: translateY(0); }
.nb-btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
}
.nb-btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}
.nb-btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.nb-btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

/* ── Toast Notification ────────────────────────────────────────────────────── */
#nb-toast-stack {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}
.nb-toast {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #f1f5f9;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  pointer-events: all;
  max-width: 340px;
  border-left: 3px solid #10b981;
  animation: nbToastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.nb-toast.nb-toast-error  { border-left-color: #ef4444; }
.nb-toast.nb-toast-warn   { border-left-color: #f59e0b; }
.nb-toast.nb-toast-info   { border-left-color: #0ea5e9; }
.nb-toast.nb-toast-out {
  animation: nbToastOut 0.25s ease forwards;
}
@keyframes nbToastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes nbToastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ==============================================================================
   Glassmorphic Floating Notification Banner & Detail Modal
   ============================================================================== */

/* ── Top-Right Glassmorphic Notification Banner Stack ──────────────────────── */
#glassNotifContainer {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-width: 440px;
  width: calc(100vw - 3rem);
}

.glass-notif-card {
  pointer-events: all;
  background: rgba(15, 23, 42, 0.90);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  color: #f8fafc;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  animation: glassNotifSlideIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  overflow: hidden;
}

.glass-notif-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.55);
}

.glass-notif-card.theme-refund-declined {
  border-left: 4px solid #ef4444;
}
.glass-notif-card.theme-refund-approved {
  border-left: 4px solid #10b981;
}
.glass-notif-card.theme-deposit {
  border-left: 4px solid #10b981;
}
.glass-notif-card.theme-system {
  border-left: 4px solid #3b82f6;
}

.glass-notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}
.glass-notif-icon.icon-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.glass-notif-icon.icon-success {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.glass-notif-icon.icon-info {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.glass-notif-content {
  flex-grow: 1;
  min-width: 0;
}
.glass-notif-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #f8fafc;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.glass-notif-body {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.glass-notif-hint {
  font-size: 0.72rem;
  color: #38bdf8;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.glass-notif-close {
  background: transparent;
  border: none;
  color: #64748b;
  padding: 0;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.15s;
}
.glass-notif-close:hover {
  color: #f1f5f9;
}

@keyframes glassNotifSlideIn {
  from {
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
.glass-notif-out {
  animation: glassNotifSlideOut 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
@keyframes glassNotifSlideOut {
  to {
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
  }
}

/* ── Glassmorphic Detail Modal ─────────────────────────────────────────────── */
#notificationDetailModal .modal-content {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: 0 35px 70px -15px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}
#notificationDetailModal .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 1.5rem;
}
#notificationDetailModal .modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.5rem;
}
.glass-telemetry-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  margin-top: 1rem;
}
.glass-credit-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  margin-top: 1rem;
}
.glass-info-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  margin-top: 1rem;
}

/* ── Dropdown Notification Center (Header Navbar) ────────────────────────── */
#notifDropdownMenu {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  margin-top: 0.5rem !important;
  width: 360px !important;
  max-width: calc(100vw - 2rem) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  overflow: hidden;
  background: #ffffff;
  display: none;
  z-index: 1060 !important;
  transition: opacity 0.15s ease;
}

#notifDropdownMenu.show {
  display: block !important;
}

[data-bs-theme="dark"] #notifDropdownMenu,
.theme-dark #notifDropdownMenu {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.notif-dropdown-header {
  padding: 0.9rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(248, 250, 252, 0.85);
}

[data-bs-theme="dark"] .notif-dropdown-header,
.theme-dark .notif-dropdown-header {
  background: rgba(30, 41, 59, 0.6) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.notif-dropdown-heading {
  color: #0f172a;
}

[data-bs-theme="dark"] .notif-dropdown-heading,
.theme-dark .notif-dropdown-heading {
  color: #f8fafc;
}

.notif-item {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.notif-item:hover {
  background: rgba(59, 130, 246, 0.06);
}

[data-bs-theme="dark"] .notif-item,
.theme-dark .notif-item {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .notif-item:hover,
.theme-dark .notif-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notif-item.is-unread {
  background: rgba(59, 130, 246, 0.08);
}

[data-bs-theme="dark"] .notif-item.is-unread,
.theme-dark .notif-item.is-unread {
  background: rgba(59, 130, 246, 0.15);
}

.notif-item-title {
  font-weight: 600;
  font-size: 0.84rem;
  color: #0f172a;
}

[data-bs-theme="dark"] .notif-item-title,
.theme-dark .notif-item-title {
  color: #f1f5f9;
}

.notif-item-body {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.35;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

[data-bs-theme="dark"] .notif-item-body,
.theme-dark .notif-item-body {
  color: #94a3b8;
}


