.nafsa-login-shell {
  --nafsa-overlay: linear-gradient(180deg, rgba(20, 14, 46, 0.98), rgba(33, 12, 50, 0.98));
  --nafsa-panel: rgba(255, 255, 255, 0.12);
  --nafsa-border: rgba(255, 255, 255, 0.16);
  font-family: var(--e-global-typography-primary-font-family), vazir, Tahoma, sans-serif;
  font-size: var(--nafsa-font-size, 16px);
  color: var(--nafsa-text, #fff);
  direction: rtl;
}

.nafsa-login-shell,
.nafsa-login-shell * {
  box-sizing: border-box;
}

.nafsa-login-shell [hidden] {
  display: none !important;
}

.nafsa-login-button-wrap {
  display: inline-flex;
}

.nafsa-login-open,
.nafsa-login-submit,
.nafsa-login-secondary {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.nafsa-login-open {
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(45deg, var(--nafsa-primary, #9b51e0), var(--nafsa-secondary, #ff007f));
  box-shadow: 0 14px 34px rgba(255, 0, 127, 0.28);
}

.nafsa-login-shell--inline,
.nafsa-login-shell--page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 0 16px;
  background: var(--nafsa-overlay);
}

.nafsa-login-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 0 16px;
  background: var(--nafsa-overlay);
}

.nafsa-login-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255, 0, 127, 0.14), transparent 24%),
    rgba(8, 7, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nafsa-login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
}

.nafsa-login-close {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 6;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.nafsa-login-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.nafsa-login-logo-wrap {
  position: absolute;
  top: -28px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
}

.nafsa-login-logo {
  display: block;
  width: 92px;
  height: auto;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.28));
  animation: nafsa-login-logo-float 4.8s ease-in-out infinite;
}

.nafsa-login-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(88px);
  opacity: 0.52;
}

.nafsa-login-orb--one {
  top: -110px;
  left: -90px;
  width: 240px;
  height: 240px;
  background: var(--nafsa-primary, #9b51e0);
}

.nafsa-login-orb--two {
  right: -100px;
  bottom: -130px;
  width: 280px;
  height: 280px;
  background: var(--nafsa-secondary, #ff007f);
}

.nafsa-login-main {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 78px 24px 24px;
  border-radius: var(--nafsa-radius, 24px);
  border: 1px solid var(--nafsa-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  box-shadow: var(--nafsa-shadow, 0 20px 50px rgba(0, 0, 0, 0.3));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.nafsa-login-panel {
  display: none;
}

.nafsa-login-panel.is-active {
  display: block;
}

.nafsa-login-form,
.nafsa-login-step {
  display: grid;
  gap: 14px;
}

.nafsa-login-step {
  display: none;
}

.nafsa-login-step.is-active {
  display: grid;
}

.nafsa-login-step-header {
  text-align: center;
  margin-bottom: 4px;
}

.nafsa-login-step-header h2 {
  margin: 0;
  color: #fff;
  font-size: 1.46rem;
  font-weight: 800;
}

.nafsa-field label {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 0.94rem;
  font-weight: 700;
}

.nafsa-field input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 16px;
}

.nafsa-field input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.nafsa-field input:focus {
  outline: none;
  border-color: var(--nafsa-accent, #00f0ff);
  box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.12);
}

.nafsa-field.is-error input {
  border-color: #ff7f9f;
  box-shadow: 0 0 0 4px rgba(255, 127, 159, 0.14);
}

.nafsa-input-wrap--otp {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.nafsa-login-submit,
.nafsa-login-secondary {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-radius: 15px;
  font-size: 1rem;
  font-weight: 800;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nafsa-login-submit {
  width: 100%;
  color: #fff;
  background: linear-gradient(45deg, var(--nafsa-primary, #9b51e0), var(--nafsa-secondary, #ff007f));
  box-shadow: 0 14px 30px rgba(255, 0, 127, 0.24);
}

.nafsa-login-secondary {
  min-width: 130px;
  padding-inline: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nafsa-login-submit:disabled,
.nafsa-login-secondary:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.nafsa-login-message {
  min-height: 24px;
  text-align: center;
  font-size: 0.94rem;
}

.nafsa-login-message.is-error {
  color: #ffb8c6;
}

.nafsa-login-message.is-success {
  color: #a9ffca;
}

.nafsa-login-countdown {
  min-height: 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.85rem;
}

.nafsa-button-spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-inline-start: 10px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-top-color: #fff;
  border-radius: 999px;
  animation: nafsa-login-spin 0.8s linear infinite;
}

.is-loading .nafsa-button-spinner {
  display: inline-block;
}

.nafsa-seller-choice {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  color: #fff;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.nafsa-seller-choice input {
  position: absolute;
  inset-inline-start: 18px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nafsa-seller-choice span {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.nafsa-seller-choice span::before {
  content: "";
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nafsa-seller-choice span::after {
  content: "";
  position: absolute;
  inset-inline-start: 7px;
  top: 50%;
  width: 9px;
  height: 5px;
  border-inline-start: 2px solid #082417;
  border-bottom: 2px solid #082417;
  opacity: 0;
  transform: translateY(-62%) rotate(-45deg) scale(0.6);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nafsa-seller-choice:hover,
.nafsa-seller-choice:has(input:focus-visible) {
  border-color: rgba(255, 255, 255, 0.36);
  transform: translateY(-1px);
}

.nafsa-seller-choice:has(input:checked) {
  border-color: rgba(169, 255, 202, 0.85);
  background: linear-gradient(135deg, rgba(65, 255, 154, 0.22), rgba(0, 240, 255, 0.08));
  box-shadow: 0 14px 32px rgba(65, 255, 154, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nafsa-seller-choice:has(input:checked) span::before {
  border-color: #a9ffca;
  background: #a9ffca;
  transform: scale(1.05);
}

.nafsa-seller-choice:has(input:checked) span::after {
  opacity: 1;
  transform: translateY(-62%) rotate(-45deg) scale(1);
}

.nafsa-seller-review-notice {
  padding: 12px 14px;
  border: 1px solid rgba(169, 255, 202, 0.36);
  border-radius: 14px;
  background: rgba(35, 255, 140, 0.12);
  color: #c9ffdf;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.8;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nafsa-otp-notice {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.8;
}

.nafsa-otp-notice a {
  color: #fff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nafsa-checkout-login-message {
  margin: 0 0 28px;
  padding: 8px 0 18px;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.8;
  text-align: center;
}

.nafsa-checkout-login-wrap {
  margin: 34px 0 42px;
}

.nafsa-login-alert {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.nafsa-login-alert-error {
  color: #ffb8c6;
}

.nafsa-login-standalone-body {
  min-height: 100dvh;
  margin: 0;
  background: var(--nafsa-overlay);
}

html,
body {
  min-height: 100%;
}

html.nafsa-login-opened,
body.nafsa-login-opened {
  overflow: hidden;
  width: 100%;
}

body.nafsa-login-opened {
  position: fixed;
  left: 0;
  right: 0;
}

@keyframes nafsa-login-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes nafsa-login-logo-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@media (max-width: 640px) {
  .nafsa-login-modal,
  .nafsa-login-shell--inline,
  .nafsa-login-shell--page {
    padding: 0 12px;
  }

  .nafsa-login-main {
    padding: 74px 16px 18px;
  }

  .nafsa-login-logo {
    width: 84px;
  }

  .nafsa-login-logo-wrap {
    top: -24px;
  }

  .nafsa-input-wrap--otp {
    grid-template-columns: 1fr;
  }

  .nafsa-login-secondary {
    width: 100%;
  }
}

.nafsa-login-shell,
.nafsa-login-shell *,
.nafsa-login-open,
.nafsa-login-woocommerce-ui {
  font-family: "Vazir", Vazir, Tahoma, sans-serif;
}

.nafsa-login-hide-wc-login .woocommerce form.login:not(.nafsa-login-form),
.nafsa-login-hide-wc-login .woocommerce-form-login:not(.nafsa-login-form),
.woocommerce-account #customer_login,
.woocommerce-checkout .woocommerce-form-login-toggle,
.woocommerce-checkout .woocommerce-form-login:not(.nafsa-login-form) {
  display: none !important;
}
