/**
 * Nexus Auth Tool
 * Custom Dark Tech Notifications & Toasts (notify.css)
 */

.nx-notify-container {
  position: fixed;
  top: 80px; /* below the 64px sticky header, so a toast never covers its buttons */
  right: 24px;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 380px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.nx-toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #0e1420;
  border: 1px solid #1b2436;
  border-radius: 10px;
  padding: 14px 16px 16px 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 15px rgba(74, 158, 255, 0.08);
  color: #f1f5f9;
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: nxToastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nx-toast.nx-toast-hiding {
  animation: nxToastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes nxToastSlideIn {
  from {
    opacity: 0;
    transform: translateX(110%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes nxToastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
    max-height: 120px;
    margin-bottom: 0;
  }
  to {
    opacity: 0;
    transform: translateX(110%) scale(0.9);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: -12px;
  }
}

.nx-toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.nx-toast-icon svg {
  width: 20px;
  height: 20px;
}

.nx-toast-body {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.nx-toast-title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.nx-toast-message {
  font-size: 13.5px;
  color: #cbd5e1;
  font-weight: 400;
}

.nx-toast-close {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px 4px;
  margin-left: 6px;
  margin-top: -2px;
  line-height: 1;
  font-size: 18px;
  transition: color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.nx-toast-close:hover {
  color: #f1f5f9;
  transform: scale(1.15);
}

.nx-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
}

/* Success Variant */
.nx-toast-success {
  border-left: 4px solid #10b981;
}
.nx-toast-success .nx-toast-icon {
  color: #10b981;
}
.nx-toast-success .nx-toast-title {
  color: #10b981;
}
.nx-toast-success .nx-toast-progress {
  background: #10b981;
}

/* Error Variant */
.nx-toast-error {
  border-left: 4px solid #ef4444;
}
.nx-toast-error .nx-toast-icon {
  color: #ef4444;
}
.nx-toast-error .nx-toast-title {
  color: #ef4444;
}
.nx-toast-error .nx-toast-progress {
  background: #ef4444;
}

/* Info Variant */
.nx-toast-info {
  border-left: 4px solid #4A9EFF;
}
.nx-toast-info .nx-toast-icon {
  color: #4A9EFF;
}
.nx-toast-info .nx-toast-title {
  color: #4A9EFF;
}
.nx-toast-info .nx-toast-progress {
  background: #4A9EFF;
}

/* Warning Variant */
.nx-toast-warning {
  border-left: 4px solid #f59e0b;
}
.nx-toast-warning .nx-toast-icon {
  color: #f59e0b;
}
.nx-toast-warning .nx-toast-title {
  color: #f59e0b;
}
.nx-toast-warning .nx-toast-progress {
  background: #f59e0b;
}

/* ==========================================================================
   Light Theme Support (html[data-theme="light"])
   ========================================================================== */

html[data-theme="light"] .nx-toast {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

html[data-theme="light"] .nx-toast-message {
  color: #475569;
}

html[data-theme="light"] .nx-toast-close {
  color: #94a3b8;
}

html[data-theme="light"] .nx-toast-close:hover {
  color: #0f172a;
}

/* Light Theme - Success Variant */
html[data-theme="light"] .nx-toast-success {
  border-left: 4px solid #10b981;
}
html[data-theme="light"] .nx-toast-success .nx-toast-icon {
  color: #059669;
}
html[data-theme="light"] .nx-toast-success .nx-toast-title {
  color: #047857;
}
html[data-theme="light"] .nx-toast-success .nx-toast-progress {
  background: #10b981;
}

/* Light Theme - Error Variant */
html[data-theme="light"] .nx-toast-error {
  border-left: 4px solid #ef4444;
}
html[data-theme="light"] .nx-toast-error .nx-toast-icon {
  color: #dc2626;
}
html[data-theme="light"] .nx-toast-error .nx-toast-title {
  color: #b91c1c;
}
html[data-theme="light"] .nx-toast-error .nx-toast-progress {
  background: #ef4444;
}

/* Light Theme - Info Variant */
html[data-theme="light"] .nx-toast-info {
  border-left: 4px solid #2563eb;
}
html[data-theme="light"] .nx-toast-info .nx-toast-icon {
  color: #2563eb;
}
html[data-theme="light"] .nx-toast-info .nx-toast-title {
  color: #1d4ed8;
}
html[data-theme="light"] .nx-toast-info .nx-toast-progress {
  background: #2563eb;
}

/* Light Theme - Warning Variant */
html[data-theme="light"] .nx-toast-warning {
  border-left: 4px solid #f59e0b;
}
html[data-theme="light"] .nx-toast-warning .nx-toast-icon {
  color: #d97706;
}
html[data-theme="light"] .nx-toast-warning .nx-toast-title {
  color: #b45309;
}
html[data-theme="light"] .nx-toast-warning .nx-toast-progress {
  background: #f59e0b;
}

