/* MitaBase Pro — a product of ETMITA · https://etmita.com
   Copyright © ETMITA. All rights reserved. */
/*
 * public/negin.css — Negin's corner notification pop-ups
 * (window.MT.negin, logic in /js/core/negin.js — GENERATED from
 * src/shared/negin.ts). MitaBase ink/lime tokens; logical properties
 * so Persian mirrors to the other corner; reduced-motion instant.
 */

#negin-toasts {
  position: fixed;
  inset-block-end: 18px;
  inset-inline-end: 18px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(470px, calc(100vw - 36px));
  pointer-events: none;
}

.negin-toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 44px 16px 12px;
  min-height: 96px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--mb-lime, #a4f03a) 35%, transparent);
  background: var(--mb-ink, #171717);
  color: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35),
    0 0 0 4px color-mix(in srgb, var(--mb-lime, #a4f03a) 10%, transparent);
  overflow: visible;
  pointer-events: auto;
  animation: neginIn 0.45s cubic-bezier(0, 0, 0.2, 1) backwards;
}
html[dir="rtl"] .negin-toast { padding: 14px 12px 16px 44px; }
.negin-toast-out {
  animation: neginOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.negin-toast-art {
  flex: none;
  width: 132px;
  height: auto;
  margin-block: -34px -14px;
  margin-inline: -14px -2px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.negin-toast-body { min-width: 0; flex: 1; }
.negin-toast-title {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--mb-lime, #a4f03a);
}
html[lang="fa"] .negin-toast-title,
html[lang="fa"] .negin-toast-text { font-family: var(--mb-font-fa, "Yekan Bakh"), sans-serif; }
.negin-toast-text {
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #d4d4d4;
}

.negin-toast-close {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 10px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #a3a3a3;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.negin-toast-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* the countdown IS the dismiss timer (animationend); hovering the
   card pauses the animation — and with it, the timer */
.negin-toast-bar {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  height: 3px;
  width: 100%;
  border-radius: 0 0 16px 16px;
  background: var(--mb-lime, #a4f03a);
  transform-origin: 0 50%;
  animation: neginBar var(--negin-ms, 10000ms) linear forwards;
}
html[dir="rtl"] .negin-toast-bar { transform-origin: 100% 50%; }
.negin-toast:hover .negin-toast-bar { animation-play-state: paused; }

@keyframes neginIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes neginOut {
  to { opacity: 0; transform: translateY(10px) scale(0.97); }
}
@keyframes neginBar {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .negin-toast, .negin-toast-out { animation: none !important; }
  .negin-toast-bar { animation: none !important; transform: scaleX(1); }
}
