.emi-payment-popup-open { overflow: hidden; }
.emi-payment-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(7, 18, 51, .45);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  font-family: "Yekan Bakh", "IRANYekan", "Vazirmatn", Tahoma, sans-serif;
  direction: rtl;
}
.emi-payment-dialog {
  --emi-main: #265cff;
  --emi-dark: #012087;
  --emi-pale: #eef3ff;
  --emi-border: #dce5ff;
  box-sizing: border-box;
  position: relative;
  width: min(100%, 430px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border: 1px solid var(--emi-border);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(1, 32, 135, .20);
  color: #202435;
  text-align: right;
}
.emi-payment-dialog[data-method="sibpay"] {
  --emi-main: #f4c72e;
  --emi-dark: #302400;
  --emi-pale: #fff8dc;
  --emi-border: #f5e7aa;
}
.emi-payment-dialog[data-method="sibpay"] .emi-payment-ok { background: #f4c72e; color: #302400; }
.emi-payment-dialog, .emi-payment-dialog * { box-sizing: border-box; }
.emi-payment-accent { height: 6px; background: linear-gradient(90deg, var(--emi-dark), var(--emi-main)); }
.emi-payment-inner { padding: 28px 26px 24px; }
.emi-payment-close {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: #f6f6f6;
  color: var(--emi-dark);
  font: 24px/1 Tahoma, sans-serif;
  cursor: pointer;
}
.emi-payment-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 14px;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--emi-pale);
  color: var(--emi-dark);
  font-size: 13px;
  font-weight: 800;
}
.emi-payment-title {
  margin: 0;
  color: var(--emi-dark);
  font-size: 25px;
  line-height: 1.55;
  font-weight: 900;
}
.emi-payment-lead {
  margin: 12px 0 26px;
  color: #5b6070;
  font-size: 14px;
  line-height: 2;
}
.emi-payment-lead strong, .emi-payment-note strong { color: var(--emi-dark); font-weight: 900; }
.emi-payment-steps { display: flex; flex-direction: column; margin: 0 0 26px; }
.emi-payment-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  min-height: 74px;
  position: relative;
}
.emi-payment-step:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 23px;
  top: 46px;
  width: 2px;
  height: 44px;
  background: var(--emi-border);
}
.emi-payment-num {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--emi-border);
  border-radius: 15px;
  background: #fff;
  color: var(--emi-main);
  font-size: 17px;
  font-weight: 900;
}
.emi-payment-step:last-child .emi-payment-num {
  border-color: var(--emi-main);
  background: var(--emi-main);
  color: #fff;
}
.emi-payment-step-content { padding-top: 7px; }
.emi-payment-step-title { margin-bottom: 3px; color: #202435; font-size: 15px; font-weight: 900; }
.emi-payment-step-note { color: #777d8f; font-size: 12.5px; line-height: 1.8; }
.emi-payment-note {
  margin-top: 2px;
  padding: 14px 16px;
  border: 1px solid var(--emi-border);
  border-radius: 16px;
  background: var(--emi-pale);
  color: #45506a;
  font-size: 12.5px;
  line-height: 1.9;
}
.emi-payment-ok {
  width: 100%;
  margin-top: 18px;
  padding: 15px 18px;
  border: 0;
  border-radius: 15px;
  background: var(--emi-dark);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}
.emi-payment-ok:hover { filter: brightness(1.12); }
.emi-payment-close:focus-visible, .emi-payment-ok:focus-visible { outline: 3px solid var(--emi-main); outline-offset: 3px; }
@media (max-width: 480px) {
  .emi-payment-overlay { padding: 12px 16px; }
  .emi-payment-dialog { width: min(100%, 380px); max-height: calc(100vh - 24px); border-radius: 20px; }
  .emi-payment-accent { height: 4px; }
  .emi-payment-inner { padding: 18px 20px 18px; }
  .emi-payment-close { top: 14px; left: 14px; width: 32px; height: 32px; border-radius: 10px; font-size: 21px; }
  .emi-payment-eyebrow { min-height: 28px; margin-bottom: 8px; padding: 5px 11px; font-size: 11.5px; }
  .emi-payment-title { font-size: 19px; line-height: 1.4; }
  .emi-payment-lead { margin: 8px 0 14px; font-size: 12.5px; line-height: 1.75; }
  .emi-payment-steps { margin-bottom: 14px; }
  .emi-payment-step { grid-template-columns: 36px 1fr; gap: 10px; min-height: 50px; }
  .emi-payment-step:last-child { min-height: 54px; }
  .emi-payment-num { width: 34px; height: 34px; border-radius: 11px; font-size: 14px; }
  .emi-payment-step:not(:last-child)::after { right: 16px; top: 34px; height: 17px; }
  .emi-payment-step-content { padding-top: 4px; }
  .emi-payment-step-title { margin-bottom: 1px; font-size: 13.5px; }
  .emi-payment-step-note { font-size: 11px; line-height: 1.5; }
  .emi-payment-note { padding: 10px 12px; border-radius: 12px; font-size: 11.5px; line-height: 1.7; }
  .emi-payment-ok { min-height: 43px; margin-top: 12px; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; }
}
@supports (height: 100dvh) {
  @media (max-width: 480px) {
    .emi-payment-dialog { max-height: calc(100dvh - 24px); }
  }
}
