/* ==========================================================================
   SaharShop Login / Registration V2 — sa-* namespace
   Pixel-close to sahar-login-v2 reference; preserves iverify auth logic.
   Loaded last on auth page; neutralizes nested-card / max-width conflicts.
   ========================================================================== */

/* —— Page shell: kill nested cards & chrome —— */
body.lang-rtl#module-iverify-authentication {
  --sa-ink: #10182f;
  --sa-pink: #f00868;
  --sa-dark: #bd004b;
  --sa-muted: #606779;
  --sa-line: #dde2ef;
  --sa-u: clamp(0.82px, 0.078vw, 1.2px);
  background:
    radial-gradient(ellipse at 70% 20%, #fff0fa 0%, transparent 65%),
    radial-gradient(ellipse at 22% 87%, #eee9fa, transparent 70%),
    #f6f1fc !important;
  color: var(--sa-ink);
  min-height: 100vh;
  overflow-x: clip;
}

body.lang-rtl#module-iverify-authentication #header,
body.lang-rtl#module-iverify-authentication .header-container,
body.lang-rtl#module-iverify-authentication .header-top,
body.lang-rtl#module-iverify-authentication .header-main,
body.lang-rtl#module-iverify-authentication .l-header,
body.lang-rtl#module-iverify-authentication #footer,
body.lang-rtl#module-iverify-authentication .footer-container,
body.lang-rtl#module-iverify-authentication .l-footer,
body.lang-rtl#module-iverify-authentication .sahar-footer,
body.lang-rtl#module-iverify-authentication .ss-footer,
body.lang-rtl#module-iverify-authentication .breadcrumb,
body.lang-rtl#module-iverify-authentication .bread,
body.lang-rtl#module-iverify-authentication .mobile-bottom-nav,
body.lang-rtl#module-iverify-authentication .bottom-nav,
body.lang-rtl#module-iverify-authentication .mobile-nav,
body.lang-rtl#module-iverify-authentication #notifications,
body.lang-rtl#module-iverify-authentication .notification,
body.lang-rtl#module-iverify-authentication .support-widget,
body.lang-rtl#module-iverify-authentication .sahar-support,
body.lang-rtl#module-iverify-authentication .support-fab,
body.lang-rtl#module-iverify-authentication .chat-widget {
  display: none !important;
}

body.lang-rtl#module-iverify-authentication #wrapper,
body.lang-rtl#module-iverify-authentication #main,
body.lang-rtl#module-iverify-authentication #content-wrapper,
body.lang-rtl#module-iverify-authentication #content,
body.lang-rtl#module-iverify-authentication .page-content,
body.lang-rtl#module-iverify-authentication .card,
body.lang-rtl#module-iverify-authentication .container,
body.lang-rtl#module-iverify-authentication .container-fluid {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  float: none !important;
}

body.lang-rtl#module-iverify-authentication #content {
  margin-top: 0 !important;
}

/* Kill legacy si-auth / ss-auth nested chrome when sa-page is present */
body.lang-rtl#module-iverify-authentication .sa-page .si-auth,
body.lang-rtl#module-iverify-authentication .sa-page .ss-auth,
body.lang-rtl#module-iverify-authentication .sa-page .ss-auth__card {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  float: none !important;
  display: contents;
}

body.lang-rtl#module-iverify-authentication .sa-page .ss-auth,
body.lang-rtl#module-iverify-authentication .sa-page #create.ss-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

body.lang-rtl#module-iverify-authentication .sa-page .verifysitelogo {
  display: none !important;
}

body.lang-rtl#module-iverify-authentication .sa-page .box {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.lang-rtl#module-iverify-authentication .sa-page .justify-center-verif {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0 !important;
  float: none !important;
}

body.lang-rtl#module-iverify-authentication .sa-page .justify-center-verif > [class*="col-"] {
  width: 100% !important;
  max-width: calc(500 * var(--sa-u)) !important;
  flex: none !important;
  padding: 0 !important;
  float: none !important;
}

/* —— Layout —— */
body.lang-rtl#module-iverify-authentication .sa-page,
body.lang-rtl#module-iverify-authentication .sa-page * {
  box-sizing: border-box;
}

body.lang-rtl#module-iverify-authentication .sa-page {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  display: grid;
  place-items: center;
  padding: calc(65 * var(--sa-u)) 24px;
  font-family: inherit;
  color: var(--sa-ink);
  overflow-x: clip;
}

body.lang-rtl#module-iverify-authentication .sa-card {
  width: min(100%, calc(1120 * var(--sa-u)));
  max-width: min(1120px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: 58.5% 41.5%;
  padding: calc(54 * var(--sa-u)) calc(24 * var(--sa-u)) calc(42 * var(--sa-u));
  background: linear-gradient(145deg, #fff, #fffdfd);
  border: 1px solid #fff;
  border-radius: calc(50 * var(--sa-u));
  box-shadow: 0 24px 55px #58427d24;
  overflow: hidden;
}

body.lang-rtl#module-iverify-authentication .sa-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(12 * var(--sa-u)) calc(30 * var(--sa-u)) calc(55 * var(--sa-u));
  min-width: 0;
  width: 100%;
}

body.lang-rtl#module-iverify-authentication .sa-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(70 * var(--sa-u));
  margin-bottom: calc(58 * var(--sa-u));
  text-decoration: none;
}

body.lang-rtl#module-iverify-authentication .sa-logo img {
  width: calc(215 * var(--sa-u));
  max-width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
}

/* —— Tabs —— */
body.lang-rtl#module-iverify-authentication .sa-tabs {
  display: flex;
  width: 82%;
  border: 1px solid #dce0ee;
  border-radius: 999px;
  background: #f5f5fa;
  margin-bottom: calc(42 * var(--sa-u));
  overflow: hidden;
}

body.lang-rtl#module-iverify-authentication .sa-tabs .sa-tab {
  width: 50%;
  height: calc(65 * var(--sa-u));
  border: 0;
  background: transparent;
  color: var(--sa-ink);
  font-size: calc(20 * var(--sa-u));
  font-weight: 800;
  cursor: pointer;
  border-radius: 999px;
  font-family: inherit;
  line-height: 1;
  box-shadow: none !important;
  margin: 0 !important;
  min-height: 0 !important;
}

body.lang-rtl#module-iverify-authentication .sa-tabs .sa-tab[aria-pressed="true"],
body.lang-rtl#module-iverify-authentication .sa-tabs .sa-tab.is-active {
  background: linear-gradient(170deg, #ff086b, #c4004c);
  color: #fff;
}

body.lang-rtl#module-iverify-authentication .sa-title,
body.lang-rtl#module-iverify-authentication .sa-page h1.page-subheading,
body.lang-rtl#module-iverify-authentication .sa-page h3.page-subheading {
  font-size: calc(31 * var(--sa-u)) !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  text-align: center;
  font-weight: 900 !important;
  color: var(--sa-ink) !important;
}

body.lang-rtl#module-iverify-authentication .sa-intro {
  font-size: calc(18 * var(--sa-u));
  line-height: 1.9;
  color: var(--sa-muted);
  text-align: center;
  margin: calc(20 * var(--sa-u)) 0 calc(54 * var(--sa-u));
  font-weight: 600;
}

/* —— Form —— */
body.lang-rtl#module-iverify-authentication .sa-form,
body.lang-rtl#module-iverify-authentication .sa-page #create-account_form,
body.lang-rtl#module-iverify-authentication .sa-page #login_form,
body.lang-rtl#module-iverify-authentication .sa-page #account-creation_form {
  width: 100%;
  max-width: calc(500 * var(--sa-u));
}

body.lang-rtl#module-iverify-authentication .sa-label,
body.lang-rtl#module-iverify-authentication .sa-page label.form-control-label,
body.lang-rtl#module-iverify-authentication .sa-page .form-group > label {
  display: block;
  font-weight: 800;
  font-size: calc(20 * var(--sa-u));
  margin-bottom: calc(15 * var(--sa-u));
  color: var(--sa-ink);
  text-align: right;
}

body.lang-rtl#module-iverify-authentication .sa-input {
  position: relative;
}

body.lang-rtl#module-iverify-authentication .sa-page svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.lang-rtl#module-iverify-authentication .sa-input svg {
  position: absolute;
  left: calc(23 * var(--sa-u));
  top: 50%;
  transform: translateY(-50%);
  color: #687080;
  pointer-events: none;
  z-index: 1;
}

body.lang-rtl#module-iverify-authentication .sa-page #phone_mobile,
body.lang-rtl#module-iverify-authentication .sa-page input.form-control,
body.lang-rtl#module-iverify-authentication .sa-page input[type="tel"],
body.lang-rtl#module-iverify-authentication .sa-page input[type="text"],
body.lang-rtl#module-iverify-authentication .sa-page input[type="password"],
body.lang-rtl#module-iverify-authentication .sa-page input[type="number"],
body.lang-rtl#module-iverify-authentication .sa-page input[name="code"] {
  width: 100% !important;
  height: calc(77 * var(--sa-u)) !important;
  min-height: calc(77 * var(--sa-u)) !important;
  border: 1.5px solid var(--sa-line) !important;
  border-radius: calc(15 * var(--sa-u)) !important;
  background: #fff !important;
  padding: 0 calc(22 * var(--sa-u)) !important;
  font-size: calc(23 * var(--sa-u)) !important;
  color: var(--sa-ink) !important;
  font-weight: 700;
  box-shadow: none !important;
  direction: ltr;
  text-align: left;
}

body.lang-rtl#module-iverify-authentication .sa-page .sa-input #phone_mobile {
  padding-left: calc(65 * var(--sa-u)) !important;
  padding-right: calc(22 * var(--sa-u)) !important;
}

body.lang-rtl#module-iverify-authentication .sa-page input::placeholder {
  color: #999;
  font-weight: 700;
}

body.lang-rtl#module-iverify-authentication .sa-page input[aria-invalid="true"],
body.lang-rtl#module-iverify-authentication .sa-page input.is-invalid {
  border-color: #c4004c !important;
}

body.lang-rtl#module-iverify-authentication .sa-page :focus-visible {
  outline: 3px solid #e83a85;
  outline-offset: 3px;
}

body.lang-rtl#module-iverify-authentication .sa-page input:focus {
  border-color: #f00868 !important;
  box-shadow: 0 0 0 3px rgba(240, 8, 104, 0.12) !important;
  outline: none;
}

/* —— Submit —— */
body.lang-rtl#module-iverify-authentication .sa-submit,
body.lang-rtl#module-iverify-authentication .sa-page button.btn-primary,
body.lang-rtl#module-iverify-authentication .sa-page button[type="submit"].btn,
body.lang-rtl#module-iverify-authentication .sa-page #SubmitCreate,
body.lang-rtl#module-iverify-authentication .sa-page #SubmitLogin,
body.lang-rtl#module-iverify-authentication .sa-page #SubmitReverse,
body.lang-rtl#module-iverify-authentication .sa-page button.btn-success {
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: 100% !important;
  height: calc(75 * var(--sa-u)) !important;
  min-height: calc(75 * var(--sa-u)) !important;
  border: 0 !important;
  border-radius: calc(25 * var(--sa-u)) !important;
  font-size: calc(24 * var(--sa-u)) !important;
  font-weight: 800 !important;
  margin-top: calc(36 * var(--sa-u)) !important;
  box-shadow: 0 12px 22px #c4004c23 !important;
  cursor: pointer;
  background: linear-gradient(170deg, #ff086b, #c4004c) !important;
  color: #fff !important;
  font-family: inherit;
  line-height: 1;
  padding: 0 20px !important;
}

body.lang-rtl#module-iverify-authentication .sa-submit:hover,
body.lang-rtl#module-iverify-authentication .sa-page button.btn-primary:hover,
body.lang-rtl#module-iverify-authentication .sa-page #SubmitCreate:hover,
body.lang-rtl#module-iverify-authentication .sa-page #SubmitLogin:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

body.lang-rtl#module-iverify-authentication .sa-submit:disabled,
body.lang-rtl#module-iverify-authentication .sa-page button[type="submit"]:disabled,
body.lang-rtl#module-iverify-authentication .sa-page button.is-loading {
  opacity: 0.65;
  cursor: wait;
  transform: none;
  pointer-events: none;
}

body.lang-rtl#module-iverify-authentication .sa-submit svg,
body.lang-rtl#module-iverify-authentication .sa-page .sa-submit svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  flex-shrink: 0;
}

body.lang-rtl#module-iverify-authentication .sa-back {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: var(--sa-ink);
  text-decoration: none;
  font-size: calc(21 * var(--sa-u));
  font-weight: 700;
  margin-top: calc(54 * var(--sa-u));
}

body.lang-rtl#module-iverify-authentication .sa-back:hover {
  color: var(--sa-pink);
}

body.lang-rtl#module-iverify-authentication .sa-back svg {
  color: var(--sa-pink);
  width: 26px;
  height: 26px;
}

body.lang-rtl#module-iverify-authentication .sa-alert,
body.lang-rtl#module-iverify-authentication .sa-page .alert-danger,
body.lang-rtl#module-iverify-authentication .sa-page .iverify-error {
  width: 100%;
  max-width: calc(500 * var(--sa-u));
  border-radius: 14px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  box-sizing: border-box;
}

body.lang-rtl#module-iverify-authentication .sa-page .iverify-error ol {
  margin: 0;
  padding: 0 1.2rem 0 0;
  text-align: right;
}

/* —— Art column —— */
body.lang-rtl#module-iverify-authentication .sa-art {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(830 * var(--sa-u));
  padding: calc(70 * var(--sa-u)) 12px calc(105 * var(--sa-u));
  border-radius: calc(46 * var(--sa-u)) 0 0 calc(46 * var(--sa-u));
  background: linear-gradient(145deg, #f9e3fa, #fff3f9 70%, #ffe0f6);
}

body.lang-rtl#module-iverify-authentication .sa-art::before,
body.lang-rtl#module-iverify-authentication .sa-art::after {
  content: "";
  position: absolute;
  bottom: -12%;
  width: 120%;
  height: 24%;
  border-radius: 50%;
  background: #f7b9eb55;
  transform: rotate(22deg);
  pointer-events: none;
}

body.lang-rtl#module-iverify-authentication .sa-art::after {
  transform: rotate(-25deg);
  left: 20%;
  background: #f6aee64d;
}

body.lang-rtl#module-iverify-authentication .sa-art img {
  width: 100%;
  max-width: 344px;
  height: auto;
  mix-blend-mode: multiply;
  position: relative;
  z-index: 1;
}

body.lang-rtl#module-iverify-authentication .sa-art h2 {
  font-size: calc(34 * var(--sa-u));
  line-height: 1.6;
  margin: calc(24 * var(--sa-u)) 0 8px;
  font-weight: 900;
  color: var(--sa-ink);
  position: relative;
  z-index: 1;
}

body.lang-rtl#module-iverify-authentication .sa-mark {
  width: 100px;
  height: 10px;
  border-top: 3px solid var(--sa-pink);
  border-radius: 50%;
  transform: rotate(-6deg);
  display: block;
  position: relative;
  z-index: 1;
}

body.lang-rtl#module-iverify-authentication .sa-art p {
  font-size: calc(24 * var(--sa-u));
  line-height: 1.8;
  color: #555e70;
  margin: 12px 0 0;
  position: relative;
  z-index: 1;
}

/* —— OTP / secondary steps —— */
body.lang-rtl#module-iverify-authentication .sa-page #verify,
body.lang-rtl#module-iverify-authentication .sa-page #login {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.lang-rtl#module-iverify-authentication .sa-page .verify-loginform,
body.lang-rtl#module-iverify-authentication .sa-page #verify .sa-intro {
  text-align: center;
  font-size: calc(18 * var(--sa-u));
  font-weight: 700;
  color: var(--sa-muted);
  margin: calc(12 * var(--sa-u)) 0 calc(12 * var(--sa-u));
}

body.lang-rtl#module-iverify-authentication .sa-page .sa-phone {
  direction: ltr;
  display: inline-block;
  color: var(--sa-ink);
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-left: 8px;
}

body.lang-rtl#module-iverify-authentication .sa-page .sa-change,
body.lang-rtl#module-iverify-authentication .sa-page #change_number {
  color: var(--sa-pink) !important;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

body.lang-rtl#module-iverify-authentication .sa-page .sa-otp-hint {
  text-align: center;
  color: var(--sa-muted);
  font-size: calc(16 * var(--sa-u));
  font-weight: 600;
  margin: 0 0 calc(28 * var(--sa-u));
  line-height: 1.8;
  max-width: calc(500 * var(--sa-u));
}

body.lang-rtl#module-iverify-authentication .sa-page .sa-input--otp input {
  text-align: center !important;
  letter-spacing: 0.28em;
  font-size: calc(28 * var(--sa-u)) !important;
  font-weight: 900 !important;
}

body.lang-rtl#module-iverify-authentication .sa-page #timerofsendcode,
body.lang-rtl#module-iverify-authentication .sa-page .sa-timer {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto !important;
  min-width: 140px;
  margin: 20px auto 0 !important;
  padding: 10px 22px !important;
  background: #f5f5fa !important;
  border: 1px solid #dce0ee !important;
  border-radius: 999px !important;
  color: var(--sa-muted) !important;
  font-weight: 800;
  box-shadow: none !important;
  min-height: 44px !important;
  height: auto !important;
  cursor: default;
}

body.lang-rtl#module-iverify-authentication .sa-page #resend,
body.lang-rtl#module-iverify-authentication .sa-page a.resendsms,
body.lang-rtl#module-iverify-authentication .sa-page .sa-resend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: calc(500 * var(--sa-u));
  margin-top: 16px;
  background: #f5f5fa !important;
  border: 1px solid #dce0ee !important;
  border-radius: 999px !important;
  color: var(--sa-ink) !important;
  font-weight: 800;
  min-height: 48px;
  text-decoration: none;
  box-shadow: none !important;
  font-size: 15px;
}

body.lang-rtl#module-iverify-authentication .sa-page #resend h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

body.lang-rtl#module-iverify-authentication .sa-page .sa-reverse-wrap,
body.lang-rtl#module-iverify-authentication .sa-page .sa-reverse {
  text-align: center;
  margin-top: 18px;
  color: var(--sa-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

body.lang-rtl#module-iverify-authentication .sa-page .sa-reverse:hover {
  color: var(--sa-pink);
}

/* OTP step without leftover bootstrap column width */
body.lang-rtl#module-iverify-authentication .justify-center-verif:has(.sa-page),
body.lang-rtl#module-iverify-authentication .justify-center-verif:has(#sa-auth-root) {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
}

body.lang-rtl#module-iverify-authentication .sa-page .justify-center-verif,
body.lang-rtl#module-iverify-authentication .sa-page #verify.col-xs-12,
body.lang-rtl#module-iverify-authentication .sa-page #verify[class*="col-"] {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  padding: 0 !important;
}

body.lang-rtl#module-iverify-authentication .sa-page .loginsms .btn-info,
body.lang-rtl#module-iverify-authentication .sa-page a.btn-info {
  background: #f5f5fa !important;
  border: 1px solid #dce0ee !important;
  color: var(--sa-ink) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-weight: 800;
}

body.lang-rtl#module-iverify-authentication .sa-page #createacc .account_creation,
body.lang-rtl#module-iverify-authentication .sa-page #createacc .page-subheading {
  text-align: center;
}

body.lang-rtl#module-iverify-authentication .sa-page #createacc .row {
  margin-left: 0;
  margin-right: 0;
}

body.lang-rtl#module-iverify-authentication .sa-page #createacc [class*="col-"] {
  padding-left: 0;
  padding-right: 0;
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  margin-bottom: 14px;
}

/* —— Responsive —— */
@media (max-width: 900px) {
  body.lang-rtl#module-iverify-authentication .sa-page {
    padding: 24px 16px;
    --sa-u: 0.85px;
  }

  body.lang-rtl#module-iverify-authentication .sa-card {
    grid-template-columns: 1fr;
    width: min(100%, 520px);
    max-width: calc(100vw - 32px);
    padding: 22px;
    border-radius: 28px;
  }

  body.lang-rtl#module-iverify-authentication .sa-content {
    padding: 8px 0 20px;
    order: 1;
  }

  body.lang-rtl#module-iverify-authentication .sa-art {
    order: 2;
    min-height: 0;
    border-radius: 20px;
    padding: 16px;
  }

  body.lang-rtl#module-iverify-authentication .sa-logo {
    margin-bottom: 24px;
  }

  body.lang-rtl#module-iverify-authentication .sa-tabs {
    width: 100%;
    margin-bottom: 24px;
  }

  body.lang-rtl#module-iverify-authentication .sa-intro {
    margin: 12px 0 28px;
  }

  body.lang-rtl#module-iverify-authentication .sa-form,
  body.lang-rtl#module-iverify-authentication .sa-page #create-account_form,
  body.lang-rtl#module-iverify-authentication .sa-page #login_form {
    max-width: none;
  }

  body.lang-rtl#module-iverify-authentication .sa-submit,
  body.lang-rtl#module-iverify-authentication .sa-page #SubmitCreate,
  body.lang-rtl#module-iverify-authentication .sa-page #SubmitLogin {
    margin-top: 20px !important;
  }

  body.lang-rtl#module-iverify-authentication .sa-back {
    margin-top: 28px;
  }

  body.lang-rtl#module-iverify-authentication .sa-art img {
    width: 135px;
  }

  body.lang-rtl#module-iverify-authentication .sa-art h2 {
    font-size: 19px;
    margin: 6px 0;
  }

  body.lang-rtl#module-iverify-authentication .sa-art h2 br,
  body.lang-rtl#module-iverify-authentication .sa-art p br {
    display: none;
  }

  body.lang-rtl#module-iverify-authentication .sa-art p {
    font-size: 14px;
  }

  body.lang-rtl#module-iverify-authentication .sa-mark {
    display: none;
  }
}

@media (max-width: 700px) {
  body.lang-rtl#module-iverify-authentication .sa-page {
    --sa-u: 0.8px;
    place-items: start center;
    padding-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.lang-rtl#module-iverify-authentication .sa-page * {
    scroll-behavior: auto;
  }
}
