/* ==========================================================================
   CYBER-TOAST: ULTRA-LUXURY FROSTED GLASS HUD NOTIFICATIONS
   Designed for High-End Cybersecurity & Enterprise Portals
   ========================================================================== */

/* Toast Container Viewport Positioning */
#toast-container {
  position: fixed !important;
  z-index: 99999999 !important;
  pointer-events: auto !important;
}

#toast-container.toast-top-right {
  top: 24px !important;
  right: 24px !important;
}

#toast-container.toast-top-left {
  top: 24px !important;
  left: 24px !important;
}

#toast-container.toast-bottom-right {
  bottom: 24px !important;
  right: 24px !important;
}

#toast-container.toast-bottom-left {
  bottom: 24px !important;
  left: 24px !important;
}

/* Base Toast HUD Card */
#toast-container > .toast {
  position: relative !important;
  width: 400px !important;
  max-width: calc(100vw - 36px) !important;
  margin: 0 0 16px 0 !important;
  padding: 18px 24px 18px 72px !important;
  min-height: 72px !important;
  display: block;
  border-radius: 18px !important;
  background-color: rgba(9, 14, 28, 0.94) !important;
  background-image: none !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  box-shadow: 
    0 24px 48px -12px rgba(0, 0, 0, 0.85),
    0 8px 20px -4px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.16) !important;
  opacity: 0.98;
  color: #f1f5f9 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  animation: cyberToastEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

#toast-container > .toast[style*="display: none"],
#toast-container > .toast.toast-hidden {
  display: none !important;
}

#toast-container > .toast:hover {
  transform: translateY(-3px) scale(1.01) !important;
  opacity: 1 !important;
}

/* 1. Auto-Hide Slow & Gradual Fadeout ("aste aste") */
#toast-container > .toast.cyber-toast-fadeout {
  opacity: 0 !important;
  transform: translateX(45px) scale(0.96) !important;
  filter: blur(8px) !important;
  pointer-events: none !important;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), filter 1.2s ease !important;
}

/* 2. User Instant Cross Click Close */
#toast-container > .toast.cyber-toast-closing {
  opacity: 0 !important;
  transform: translateX(65px) scale(0.9) !important;
  filter: blur(10px) !important;
  pointer-events: none !important;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease !important;
}

/* Entrance Animation with Motion Physics */
@keyframes cyberToastEntrance {
  0% {
    transform: translateX(115%) scale(0.92);
    opacity: 0;
    filter: blur(10px);
  }
  70% {
    transform: translateX(-4px) scale(1.01);
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

/* Glass Neon Hexagon/Pill Icon Container */
#toast-container > .toast::before {
  content: "" !important;
  position: absolute !important;
  left: 18px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 22px 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2 !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease !important;
}

#toast-container > .toast:hover::before {
  transform: translateY(-50%) scale(1.1) !important;
}

/* Ambient Cyber Glow Reflector in Top-Right */
#toast-container > .toast::after {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 100% !important;
  pointer-events: none !important;
  z-index: 1 !important;
  border-radius: 18px !important;
}

/* ==========================================================================
   TOAST COLOR VARIANTS
   ========================================================================== */

/* 1. SUCCESS (Ultra Neon Emerald / Mint) */
#toast-container > .toast-success {
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  background: 
    radial-gradient(ellipse 90% 120% at 10% 25%, rgba(16, 185, 129, 0.15) 0%, transparent 65%),
    rgba(8, 18, 28, 0.95) !important;
  box-shadow: 
    0 24px 48px -12px rgba(0, 0, 0, 0.85),
    0 0 35px -5px rgba(16, 185, 129, 0.28),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.18) !important;
}

#toast-container > .toast-success:hover {
  border-color: rgba(16, 185, 129, 0.7) !important;
  box-shadow: 
    0 28px 56px -12px rgba(0, 0, 0, 0.9),
    0 0 45px -2px rgba(16, 185, 129, 0.4),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.25) !important;
}

#toast-container > .toast-success::before {
  background-color: rgba(16, 185, 129, 0.14) !important;
  border: 1px solid rgba(52, 211, 153, 0.55) !important;
  box-shadow: 
    0 0 20px rgba(16, 185, 129, 0.35),
    inset 0 0 12px rgba(16, 185, 129, 0.15) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") !important;
}

#toast-container > .toast-success .toast-title {
  color: #34d399 !important;
  text-shadow: 0 0 16px rgba(52, 211, 153, 0.4) !important;
}

/* 2. INFO (Electric Cyber Cyan / Pulse Blue) */
#toast-container > .toast-info {
  border: 1px solid rgba(6, 182, 212, 0.45) !important;
  background: 
    radial-gradient(ellipse 90% 120% at 10% 25%, rgba(6, 182, 212, 0.15) 0%, transparent 65%),
    rgba(8, 18, 32, 0.95) !important;
  box-shadow: 
    0 24px 48px -12px rgba(0, 0, 0, 0.85),
    0 0 35px -5px rgba(6, 182, 212, 0.28),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.18) !important;
}

#toast-container > .toast-info:hover {
  border-color: rgba(6, 182, 212, 0.7) !important;
  box-shadow: 
    0 28px 56px -12px rgba(0, 0, 0, 0.9),
    0 0 45px -2px rgba(6, 182, 212, 0.4),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.25) !important;
}

#toast-container > .toast-info::before {
  background-color: rgba(6, 182, 212, 0.14) !important;
  border: 1px solid rgba(34, 211, 238, 0.55) !important;
  box-shadow: 
    0 0 20px rgba(6, 182, 212, 0.35),
    inset 0 0 12px rgba(6, 182, 212, 0.15) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2322d3ee' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") !important;
}

#toast-container > .toast-info .toast-title {
  color: #38bdf8 !important;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.4) !important;
}

/* 3. WARNING (Cyber Amber / Molten Gold) */
#toast-container > .toast-warning {
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  background: 
    radial-gradient(ellipse 90% 120% at 10% 25%, rgba(245, 158, 11, 0.15) 0%, transparent 65%),
    rgba(22, 16, 10, 0.95) !important;
  box-shadow: 
    0 24px 48px -12px rgba(0, 0, 0, 0.85),
    0 0 35px -5px rgba(245, 158, 11, 0.28),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.18) !important;
}

#toast-container > .toast-warning:hover {
  border-color: rgba(245, 158, 11, 0.7) !important;
  box-shadow: 
    0 28px 56px -12px rgba(0, 0, 0, 0.9),
    0 0 45px -2px rgba(245, 158, 11, 0.4),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.25) !important;
}

#toast-container > .toast-warning::before {
  background-color: rgba(245, 158, 11, 0.14) !important;
  border: 1px solid rgba(251, 191, 36, 0.55) !important;
  box-shadow: 
    0 0 20px rgba(245, 158, 11, 0.35),
    inset 0 0 12px rgba(245, 158, 11, 0.15) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23fbbf24' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") !important;
}

#toast-container > .toast-warning .toast-title {
  color: #fbbf24 !important;
  text-shadow: 0 0 16px rgba(251, 191, 36, 0.4) !important;
}

/* 4. ERROR (Vivid Cyber Crimson / Security Alert) */
#toast-container > .toast-error {
  border: 1px solid rgba(239, 68, 68, 0.5) !important;
  background: 
    radial-gradient(ellipse 90% 120% at 10% 25%, rgba(239, 68, 68, 0.16) 0%, transparent 65%),
    rgba(24, 10, 14, 0.95) !important;
  box-shadow: 
    0 24px 48px -12px rgba(0, 0, 0, 0.85),
    0 0 35px -5px rgba(239, 68, 68, 0.32),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.18) !important;
}

#toast-container > .toast-error:hover {
  border-color: rgba(239, 68, 68, 0.75) !important;
  box-shadow: 
    0 28px 56px -12px rgba(0, 0, 0, 0.9),
    0 0 45px -2px rgba(239, 68, 68, 0.45),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.25) !important;
}

#toast-container > .toast-error::before {
  background-color: rgba(239, 68, 68, 0.14) !important;
  border: 1px solid rgba(248, 113, 113, 0.6) !important;
  box-shadow: 
    0 0 20px rgba(239, 68, 68, 0.4),
    inset 0 0 12px rgba(239, 68, 68, 0.18) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f87171' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='15' y1='9' x2='9' y2='15'/%3E%3Cline x1='9' y1='9' x2='15' y2='15'/%3E%3C/svg%3E") !important;
}

#toast-container > .toast-error .toast-title {
  color: #f87171 !important;
  text-shadow: 0 0 16px rgba(248, 113, 113, 0.4) !important;
}

/* ==========================================================================
   TYPOGRAPHY & HIERARCHY
   ========================================================================== */
.toast-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.015em !important;
  margin-bottom: 4px !important;
  line-height: 1.35 !important;
  position: relative !important;
  z-index: 2 !important;
}

.toast-message {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 0.86rem !important;
  color: #cbd5e1 !important;
  line-height: 1.5 !important;
  font-weight: 450 !important;
  word-break: break-word !important;
  position: relative !important;
  z-index: 2 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* ==========================================================================
   MINIMALIST FROSTED GLASS CLOSE BUTTON
   ========================================================================== */
.toast-close-button {
  position: absolute !important;
  right: 14px !important;
  top: 14px !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #cbd5e1 !important;
  font-size: 18px !important;
  font-weight: 300 !important;
  line-height: 26px !important;
  text-align: center !important;
  text-shadow: none !important;
  opacity: 0.85 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  outline: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999 !important;
  backdrop-filter: blur(8px) !important;
}

.toast-close-button:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #ffffff !important;
  border-color: rgba(248, 113, 113, 0.5) !important;
  opacity: 1 !important;
  transform: rotate(90deg) scale(1.15) !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45) !important;
}

.toast-close-button:active {
  transform: rotate(90deg) scale(0.92) !important;
}

/* ==========================================================================
   ANIMATED LASER BEAM PROGRESS BAR
   ========================================================================== */
#toast-container > .toast > .toast-progress {
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  height: 3px !important;
  border-radius: 0 0 18px 18px !important;
  opacity: 1 !important;
  z-index: 3 !important;
}

#toast-container > .toast-success > .toast-progress {
  background: linear-gradient(90deg, #10b981 0%, #34d399 50%, #6ee7b7 100%) !important;
  box-shadow: 0 0 14px #34d399, 0 0 4px #10b981 !important;
}

#toast-container > .toast-info > .toast-progress {
  background: linear-gradient(90deg, #0284c7 0%, #06b6d4 50%, #38bdf8 100%) !important;
  box-shadow: 0 0 14px #38bdf8, 0 0 4px #06b6d4 !important;
}

#toast-container > .toast-warning > .toast-progress {
  background: linear-gradient(90deg, #d97706 0%, #f59e0b 50%, #fde047 100%) !important;
  box-shadow: 0 0 14px #fbbf24, 0 0 4px #f59e0b !important;
}

#toast-container > .toast-error > .toast-progress {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 50%, #fca5a5 100%) !important;
  box-shadow: 0 0 14px #f87171, 0 0 4px #ef4444 !important;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 576px) {
  #toast-container {
    left: 16px !important;
    right: 16px !important;
    top: 16px !important;
    width: auto !important;
  }

  #toast-container > .toast {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 12px 0 !important;
    padding: 16px 20px 16px 66px !important;
    border-radius: 16px !important;
  }

  #toast-container > .toast::before {
    left: 14px !important;
    width: 36px !important;
    height: 36px !important;
  }
}
