/* Invari Toman: beats prior neon-capsule and old two-line pseudo-element rules. */
html body:not(#__invari_toman_priority_one):not(#__invari_toman_priority_two) .invari-toman-symbol {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  order: 20 !important; /* RTL: currency icon on the left of the number */
  width: 21px !important;
  min-width: 21px !important;
  max-width: 21px !important;
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  padding: 0 !important;
  margin: 0 3px 0 0 !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  color: #f56d00 !important;
  font-size: 0 !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  direction: rtl !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  overflow: visible !important;
}

/* Clear previous :before/:after "تو/مان" that may have been pasted into CSS. */
html body:not(#__invari_toman_priority_one):not(#__invari_toman_priority_two) .invari-toman-symbol::before,
html body:not(#__invari_toman_priority_one):not(#__invari_toman_priority_two) .invari-toman-symbol::after {
  content: none !important;
  display: none !important;
}
html body:not(#__invari_toman_priority_one):not(#__invari_toman_priority_two) .invari-toman-symbol > .invari-toman-top,
html body:not(#__invari_toman_priority_one):not(#__invari_toman_priority_two) .invari-toman-symbol > .invari-toman-bottom {
  display: block !important;
  position: static !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  color: inherit !important;
  font-family: "Vazirmatn", "Vazir", Tahoma, sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: -.4px !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}
html body:not(#__invari_toman_priority_one):not(#__invari_toman_priority_two) .invari-toman-symbol > .invari-toman-top {
  font-size: 11px !important;
  line-height: 11px !important;
}
html body:not(#__invari_toman_priority_one):not(#__invari_toman_priority_two) .invari-toman-symbol > .invari-toman-bottom {
  font-size: 10px !important;
  line-height: 10px !important;
  margin-top: -1px !important;
}

/* For price rows where currency and number are separate nodes. */
html body .mt-sp-price { direction: rtl !important; }
html body .woocommerce-Price-amount bdi { direction: rtl !important; }

html body del .invari-toman-symbol,
html body del .invari-toman-symbol > span {
  color: #999 !important;
}

@media (max-width: 767px) {
  html body:not(#__invari_toman_priority_one):not(#__invari_toman_priority_two) .invari-toman-symbol {
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 19px !important;
    min-height: 19px !important;
    max-height: 19px !important;
    margin-right: 2px !important;
  }
  html body:not(#__invari_toman_priority_one):not(#__invari_toman_priority_two) .invari-toman-symbol > .invari-toman-top {
    font-size: 10px !important;
    line-height: 10px !important;
  }
  html body:not(#__invari_toman_priority_one):not(#__invari_toman_priority_two) .invari-toman-symbol > .invari-toman-bottom {
    font-size: 9px !important;
    line-height: 9px !important;
  }
}


/* ================================================================
 * Invari Toman v1.2.0 – precise fix for MT Selected Products.
 * INSPECTED: .mt-sp-price > span.mt-sp-toman (empty span)
 * Original theme renders `تومان` via .mt-sp-toman::before.
 * An empty span cannot be found by text-based JavaScript; override
 * the real ::before and paint both lines with pure CSS.
 * ================================================================ */
html body .mt-sp-price {
  direction: rtl !important;
}
html body .mt-sp-price > span.mt-sp-toman:last-child,
html body .mt-sp-price > span.mt-sp-toman:first-child,
html body .mt-sp-price span.mt-sp-toman {
  display: inline-flex !important;
  flex-flow: column nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  flex: 0 0 auto !important;
  order: 10 !important;
  width: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  margin: 0 3px 0 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  overflow: visible !important;
  opacity: 1 !important;
  color: #f56d00 !important;
  font-size: 0 !important;
  line-height: 1 !important;
  direction: rtl !important;
  white-space: nowrap !important;
  letter-spacing: 0 !important;
}
html body .mt-sp-price span.mt-sp-toman::before,
html body .mt-sp-price > span.mt-sp-toman:last-child::before {
  content: "تو" !important;
  display: block !important;
  position: static !important;
  width: auto !important;
  height: 11px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  box-shadow: none !important;
  border: 0 !important;
  color: inherit !important;
  opacity: 1 !important;
  font: 900 11px/11px "Vazirmatn", "Vazir", Tahoma, sans-serif !important;
  letter-spacing: -.5px !important;
  text-shadow: none !important;
}
html body .mt-sp-price span.mt-sp-toman::after,
html body .mt-sp-price > span.mt-sp-toman:last-child::after {
  content: "مان" !important;
  display: block !important;
  position: static !important;
  width: auto !important;
  height: 10px !important;
  padding: 0 !important;
  margin: -1px 0 0 !important;
  background: none !important;
  box-shadow: none !important;
  border: 0 !important;
  color: inherit !important;
  opacity: 1 !important;
  font: 900 10px/10px "Vazirmatn", "Vazir", Tahoma, sans-serif !important;
  letter-spacing: -.3px !important;
  text-shadow: none !important;
}
@media (max-width: 767px) {
  html body .mt-sp-price > span.mt-sp-toman:last-child,
  html body .mt-sp-price > span.mt-sp-toman:first-child,
  html body .mt-sp-price span.mt-sp-toman {
    width: 19px !important;
    min-width: 19px !important;
    max-width: 19px !important;
    height: 19px !important;
    min-height: 19px !important;
    max-height: 19px !important;
    margin-right: 2px !important;
  }
  html body .mt-sp-price span.mt-sp-toman::before {
    height: 10px !important;
    font-size: 10px !important;
    line-height: 10px !important;
  }
  html body .mt-sp-price span.mt-sp-toman::after {
    height: 9px !important;
    font-size: 9px !important;
    line-height: 9px !important;
  }
}
