/**
 * GoldLedger Non-Blocking Toast Notifications
 * مجوهرات السعادة
 */

.toast-container {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none; /* Non-blocking by default */
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: toastSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.toast.hiding {
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
}

@keyframes toastSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-24px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.toast-body {
  flex: 1;
  line-height: 1.35;
}

.toast-title {
  font-weight: 800;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.toast-desc {
  font-size: 0.82rem;
  opacity: 0.9;
}

/* Toast Variants */
.toast-success {
  background: rgba(16, 185, 129, 0.92);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #064e3b;
}

.toast-success .toast-title, .toast-success .toast-desc {
  color: #f0fdf4;
}

.toast-error {
  background: rgba(220, 38, 38, 0.94);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fef2f2;
}

.toast-warning {
  background: rgba(217, 119, 6, 0.94);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fffbeb;
}

.toast-info {
  background: rgba(30, 58, 138, 0.94);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #eff6ff;
}

/* Progress bar inside toast */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.4);
  transform-origin: left;
  animation: toastProgress 4s linear forwards;
}

@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
