/* ============================================
   FLOATING TOASTS  (.aitn-)  — site-wide
   Theme: navy #1e2a78 / green #22c55e / Vazirmatn
   Self-contained: own design tokens so it works
   on every page (cart, shop, single product, …).
   ============================================ */

:root {
  --aitc-font: 'Vazirmatn', 'Dana', 'Tahoma', system-ui, -apple-system, sans-serif;
  --aitc-ink: #111111;
  --aitc-muted: #6b7280;
  --aitc-line: rgba(0, 0, 0, 0.06);
  --aitc-primary: #1e2a78;
  --aitc-primary-soft: rgba(30, 42, 120, 0.08);
}

.aitn-host {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  width: min(400px, calc(100vw - 40px));
  pointer-events: none;
}

.aitn-toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  background: #fff;
  border: 1px solid var(--aitc-line);
  border-radius: 14px;
  box-shadow: 0 18px 44px -16px rgba(16, 24, 40, .30), 0 2px 6px rgba(16, 24, 40, .06);
  padding: 15px 16px 15px 15px;
  overflow: hidden;
  font-family: var(--aitc-font);
  direction: rtl;
  /* enter */
  animation: aitn-in .42s cubic-bezier(.22, 1, .36, 1);
}
.aitn-toast.is-leaving {
  animation: aitn-out .32s cubic-bezier(.4, 0, 1, 1) forwards;
}
@keyframes aitn-in {
  from { opacity: 0; transform: translateX(26px) scale(.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes aitn-out {
  to { opacity: 0; transform: translateX(26px) scale(.96); margin-top: -8px; }
}

/* leading accent bar (right edge in RTL) */
.aitn-toast::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 4px;
  background: var(--aitn-c, var(--aitc-primary));
}

.aitn-toast__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--aitn-soft, var(--aitc-primary-soft));
  color: var(--aitn-c, var(--aitc-primary));
}
.aitn-toast__icon svg { width: 20px; height: 20px; }

.aitn-toast__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 1px;
}
.aitn-toast__msg {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--aitc-ink);
  text-wrap: pretty;
}
.aitn-toast__msg b { font-weight: 800; }
.aitn-toast__undo {
  align-self: flex-start;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--aitn-c, var(--aitc-primary));
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: opacity .15s;
}
.aitn-toast__undo svg { width: 14px; height: 14px; }
.aitn-toast__undo:hover { opacity: .7; }

/* circular countdown timer = also the close button */
.aitn-toast__timer {
  flex-shrink: 0;
  position: relative;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
}
.aitn-toast__timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.aitn-toast__timer .aitn-ring-bg { stroke: var(--aitc-line); }
.aitn-toast__timer .aitn-ring-fg { stroke: var(--aitn-c, var(--aitc-primary)); transition: stroke-dashoffset .1s linear; }
.aitn-toast__timer .aitn-num {
  position: relative;
  z-index: 2;
  font-size: 12px;
  font-weight: 800;
  color: var(--aitc-muted);
  font-feature-settings: "tnum";
}
.aitn-toast__timer .aitn-x { position: relative; z-index: 2; display: none; color: var(--aitc-muted); }
.aitn-toast__timer .aitn-x svg { position: static; width: 14px; height: 14px; transform: none; }
.aitn-toast__timer:hover .aitn-num { display: none; }
.aitn-toast__timer:hover .aitn-x { display: block; }

/* type colors via CSS vars */
.aitn-toast--success { --aitn-c: #15803d; --aitn-soft: rgba(34, 197, 94, .12); }
.aitn-toast--info    { --aitn-c: #1d4ed8; --aitn-soft: rgba(29, 78, 216, .10); }
.aitn-toast--error   { --aitn-c: #dc2626; --aitn-soft: rgba(220, 38, 38, .10); }
.aitn-toast--removed { --aitn-c: #1e2a78; --aitn-soft: rgba(30, 42, 120, .08); }

@media (max-width: 600px) {
  .aitn-host { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .aitn-toast, .aitn-toast.is-leaving { animation: none !important; }
}
</content>
</invoke>
