/* =========================================================
   Noor Shop - Toast Notifications
   ========================================================= */
.ns-toast-host {
  position: fixed;
  top: 24px;
  inset-inline-end: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.ns-toast {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px 14px;
  padding: 16px 16px 18px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(7, 28, 31, 0.08);
  color: var(--ns-ink);
  box-shadow:
    0 18px 40px rgba(7, 28, 31, 0.14),
    0 2px 8px rgba(7, 28, 31, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translate3d(18px, -6px, 0) scale(0.98);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}

html[lang="ar"] .ns-toast,
html[dir="rtl"] .ns-toast {
  transform: translate3d(-18px, -6px, 0) scale(0.98);
}

.ns-toast.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.ns-toast.is-leaving {
  opacity: 0;
  transform: translate3d(12px, -8px, 0) scale(0.98);
}

html[lang="ar"] .ns-toast.is-leaving,
html[dir="rtl"] .ns-toast.is-leaving {
  transform: translate3d(-12px, -8px, 0) scale(0.98);
}

.ns-toast__icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
  font-size: 15px;
}

.ns-toast--success .ns-toast__icon {
  background: rgba(42, 74, 17, 0.12);
  color: #2a4a11;
  box-shadow: inset 0 0 0 1px rgba(42, 74, 17, 0.12);
}

.ns-toast--error .ns-toast__icon {
  background: rgba(178, 58, 58, 0.12);
  color: #a32626;
  box-shadow: inset 0 0 0 1px rgba(178, 58, 58, 0.14);
}

.ns-toast__body {
  min-width: 0;
  padding-top: 1px;
}

.ns-toast__title {
  margin: 0 0 4px;
  font-family: var(--ltn__heading-font, 'Rajdhani', sans-serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ns-ink);
}

.ns-toast__text {
  margin: 0;
  color: var(--ns-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.ns-toast__action {
  display: inline-flex;
  margin-top: 10px;
  color: #2a4a11 !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(42, 74, 17, 0.25);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ns-toast__action:hover {
  color: #1e360c !important;
  border-bottom-color: #1e360c;
}

.ns-toast__close {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ns-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.ns-toast__close:hover {
  background: rgba(7, 28, 31, 0.06);
  color: var(--ns-ink);
}

.ns-toast__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  transform-origin: left center;
  animation: nsToastProgress 4.2s linear forwards;
}

html[lang="ar"] .ns-toast__progress,
html[dir="rtl"] .ns-toast__progress {
  transform-origin: right center;
}

.ns-toast--success .ns-toast__progress {
  background: linear-gradient(90deg, #889346, #2a4a11);
}

.ns-toast--error .ns-toast__progress {
  background: linear-gradient(90deg, #d97979, #a32626);
}

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

@media (max-width: 575px) {
  .ns-toast-host {
    top: auto;
    bottom: 20px;
    inset-inline: 16px;
    width: auto;
  }

  .ns-toast,
  html[lang="ar"] .ns-toast,
  html[dir="rtl"] .ns-toast {
    transform: translate3d(0, 14px, 0) scale(0.98);
  }

  .ns-toast.is-visible {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

