/* Modern Glassmorphic Toast Notifications (Scoped & Cleanly Sized) */
#toast-container,
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 420px;
}

.toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 420px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #fff;
  opacity: 0;
  transform: translateX(40px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.toast.visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.toast.hiding {
  opacity: 0;
  transform: translateX(40px) scale(0.95);
}

/* Explicitly clamp SVG dimensions so icons can NEVER blow up */
.toast svg,
.toast svg.toast-icon,
svg.toast-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex-shrink: 0 !important;
  display: block !important;
  margin-top: 1px;
}

.toast-success svg { color: #10b981 !important; }
.toast-error svg { color: #ef4444 !important; }
.toast-warning svg { color: #f59e0b !important; }
.toast-info svg { color: #6366f1 !important; }

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.toast-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
  word-break: break-word;
}

.toast-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  color: #f8fafc;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.toast-progress-bar {
  height: 100%;
  width: 100%;
  background: #6366f1;
  transition: width linear;
}

.toast-success .toast-progress-bar { background: #10b981; }
.toast-error .toast-progress-bar { background: #ef4444; }
.toast-warning .toast-progress-bar { background: #f59e0b; }

/* ========================================================
   Glassmorphic AI Process Loader & Screen Interaction Lock
   Absorbs 100% of clicks across whole website during AI hits
   ======================================================== */
.samnvay-process-loader-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(6, 9, 17, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: auto !important; /* Absorbs all clicks across whole screen */
  cursor: wait;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.samnvay-process-loader-backdrop.visible {
  opacity: 1;
}

.process-loader-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 2.2rem 2.5rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(99, 102, 241, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  transform: scale(0.94);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f8fafc;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  user-select: none;
}

.samnvay-process-loader-backdrop.visible .process-loader-card {
  transform: scale(1);
}

.process-loader-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
}

.process-loader-spinner-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-loader-pulse-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, transparent 70%);
  animation: processPulseGlow 2s infinite ease-in-out;
}

.process-loader-spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3.5px solid rgba(255, 255, 255, 0.08);
  border-top-color: #6366f1;
  border-right-color: #a855f7;
  animation: processSpinRing 0.9s infinite linear;
}

.process-loader-center-icon {
  position: relative;
  z-index: 2;
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes processSpinRing {
  to { transform: rotate(360deg); }
}

@keyframes processPulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 0.9; transform: scale(1.18); }
}

.process-loader-text-group {
  margin-bottom: 1.25rem;
}

.process-loader-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}

.process-loader-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.process-loader-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin-bottom: 1.1rem;
}

.process-loader-progress-bar {
  position: absolute;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  border-radius: 999px;
  animation: processShimmerProgress 1.4s infinite ease-in-out;
}

@keyframes processShimmerProgress {
  0% { left: -40%; width: 40%; }
  50% { width: 60%; }
  100% { left: 100%; width: 40%; }
}

.process-loader-shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #a5b4fc;
}
