:root {
  --alsaaer-auth-bg: rgba(0, 0, 0, 0.55);
  --alsaaer-auth-radius: 14px;
  --alsaaer-auth-border: rgba(0, 0, 0, 0.12);
  --alsaaer-auth-primary: #111827;
  --alsaaer-auth-accent: #0ea5e9;
}

/* App-like theme (match mobile UI colors as close as possible). */
.alsaaer-site-auth--app {
  --alsaaer-auth-radius: 18px;
  --alsaaer-auth-accent: #f29f05; /* login button (brand yellow) */
  --alsaaer-auth-accent-text: #ffffff;
  --alsaaer-auth-secondary: #1a0075; /* register button */
  --alsaaer-auth-field-bg: #f5f6f8;
  --alsaaer-auth-field-border: rgba(17, 24, 39, 0.16);
  --alsaaer-auth-control-height: 54px;
  --alsaaer-auth-form-width: 330px;
  --alsaaer-auth-muted: rgba(17, 24, 39, 0.55);
}

/* Defensive reset (themes/page builders often override form elements). */
.alsaaer-site-auth,
.alsaaer-site-auth *,
.alsaaer-site-auth *::before,
.alsaaer-site-auth *::after {
  box-sizing: border-box;
}

/* Hard isolation for common offenders in themes (Woo/Elementor button styles).
   IMPORTANT: do NOT reset our own component buttons, otherwise they revert to browser defaults. */
.alsaaer-site-auth__dialog button:not(.alsaaer-site-auth__close):not(.alsaaer-site-auth__submit):not(.alsaaer-site-auth__secondary):not(.alsaaer-site-auth__link):not(.alsaaer-site-auth__icon-btn),
.alsaaer-site-auth__dialog input {
  all: revert !important;
  font-family: inherit !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.alsaaer-site-auth__dialog button,
.alsaaer-site-auth__dialog input {
  -webkit-appearance: none;
  appearance: none;
}

.alsaaer-site-auth__dialog {
  font: inherit;
  line-height: 1.35;
  text-align: right;
  contain: layout paint;
}

.alsaaer-site-auth__dialog button,
.alsaaer-site-auth__dialog input {
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.alsaaer-site-auth__open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--alsaaer-auth-border);
  background: var(--alsaaer-auth-primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* Auto-injected modal (no visible trigger) */
.alsaaer-site-auth--auto .alsaaer-site-auth__open {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.alsaaer-site-auth__modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  box-sizing: border-box;
}

/* Lock page scroll when modal is open (JS toggles this class). */
body.alsaaer-auth-no-scroll {
  overflow: hidden !important;
}

/* Standalone pages (no overlay, no scroll lock, no backdrop). */
.alsaaer-site-auth--page .alsaaer-site-auth__modal {
  position: static;
  inset: auto;
  z-index: auto;
  display: flex;
  height: auto !important;
  min-height: 0 !important;
  /* The base modal uses align-items:center which vertically centers the dialog.
     For standalone pages we want a natural layout without top blank space. */
  align-items: flex-start;
  justify-content: center;
  padding: 0;
}

/* Standalone pages: the WP page already has a title, so hide the inner modal header/title. */
.alsaaer-site-auth--page .alsaaer-site-auth__header {
  display: none;
}

.alsaaer-site-auth--page .alsaaer-site-auth__backdrop {
  display: none;
}

.alsaaer-site-auth--page .alsaaer-site-auth__dialog {
  width: min(100%, 520px);
  max-height: none;
  height: auto !important;
  margin: 0 auto;
}

/* Standalone pages: tighten spacing inside the card. */
.alsaaer-site-auth--page .alsaaer-site-auth__body {
  padding: 14px 18px 18px;
  max-height: none;
  overflow: visible;
}

.alsaaer-site-auth--page.alsaaer-site-auth--app .alsaaer-site-auth__field {
  margin-bottom: 10px;
}

.alsaaer-site-auth--page.alsaaer-site-auth--app .alsaaer-site-auth__remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px auto 10px;
}

.alsaaer-site-auth--page.alsaaer-site-auth--app .alsaaer-site-auth__view[data-view="password"] .alsaaer-site-auth__submit--login {
  margin-bottom: 8px;
}

.alsaaer-site-auth--page.alsaaer-site-auth--app .alsaaer-site-auth__view[data-view="password"] .alsaaer-site-auth__submit--register {
  margin-top: 22px;
}

/* Standalone login page: give the "forgot password" row breathing room between buttons. */
.alsaaer-site-auth--page.alsaaer-site-auth--app .alsaaer-site-auth__view[data-view="password"] .alsaaer-site-auth__submit--login + .alsaaer-site-auth__links {
  margin-top: 12px;
  margin-bottom: 28px;
}

/* Standalone login page: place "Forgot" on the right and "OTP" on the left. */
.alsaaer-site-auth--page.alsaaer-site-auth--app .alsaaer-site-auth__view[data-view="password"] .alsaaer-site-auth__links {
  justify-content: space-between;
  width: 100%;
  max-width: var(--alsaaer-auth-form-width);
  margin-left: auto;
  margin-right: auto;
}

.alsaaer-site-auth--page .alsaaer-site-auth__close {
  display: none;
}

@media (max-width: 520px) {
  .alsaaer-site-auth--page .alsaaer-site-auth__dialog {
    width: 100%;
    height: auto;
    border-radius: var(--alsaaer-auth-radius);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  }
}

/* App mode: keep centered dialog on desktop, fullscreen only on small screens. */
.alsaaer-site-auth--app .alsaaer-site-auth__modal {
  padding: 24px 12px;
}

.alsaaer-site-auth__modal.is-open {
  display: flex;
}

.alsaaer-site-auth__backdrop {
  position: fixed;
  inset: 0;
  background: var(--alsaaer-auth-bg);
  z-index: 0;
}

.alsaaer-site-auth__dialog {
  position: relative;
  z-index: 1;
  margin: 0;
  width: min(92vw, 420px);
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: var(--alsaaer-auth-radius);
  background-clip: padding-box;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  direction: rtl;
}

.alsaaer-site-auth--app .alsaaer-site-auth__dialog {
  width: min(92vw, 420px);
  height: auto;
  max-height: calc(100vh - 48px);
  border-radius: var(--alsaaer-auth-radius);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  background: #f4f5f7;
  text-align: center;
  display: block;
}

.alsaaer-site-auth__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.alsaaer-site-auth--app .alsaaer-site-auth__header {
  position: relative;
  justify-content: center;
  padding: calc(16px + env(safe-area-inset-top)) 18px 16px;
}

.alsaaer-site-auth__title {
  font-weight: 800;
  font-size: 15px;
}

.alsaaer-site-auth--app .alsaaer-site-auth__title {
  font-size: 18px;
}

.alsaaer-site-auth__close {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 8px !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  background: #fff !important;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--alsaaer-auth-primary) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: static !important;
}

.alsaaer-site-auth--app .alsaaer-site-auth__close {
  position: absolute !important;
  right: 18px;
  top: 14px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 12px !important;
  font-size: 20px;
}

.alsaaer-site-auth__body {
  padding: 12px 14px 14px;
  max-height: calc(100vh - 48px - 56px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.alsaaer-site-auth--app .alsaaer-site-auth__body {
  padding: 18px 18px 22px;
}

@media (max-width: 520px) {
  .alsaaer-site-auth--app .alsaaer-site-auth__modal {
    padding: 0;
  }

  /* On phones, bring header down a bit (more comfortable reach). */
  .alsaaer-site-auth--app .alsaaer-site-auth__header {
    padding-top: calc(28px + env(safe-area-inset-top));
  }

  .alsaaer-site-auth--app .alsaaer-site-auth__dialog {
    width: 100vw;
    height: 100vh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
  }

  .alsaaer-site-auth--app .alsaaer-site-auth__body {
    flex: 1;
    max-height: none;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Standalone pages on phones: do NOT force fullscreen/vertical centering. */
  .alsaaer-site-auth--page.alsaaer-site-auth--app .alsaaer-site-auth__dialog {
    width: 100%;
    height: auto;
    max-height: none;
    border-radius: var(--alsaaer-auth-radius);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
    display: block;
  }

  .alsaaer-site-auth--page.alsaaer-site-auth--app .alsaaer-site-auth__body {
    flex: initial;
    min-height: 0;
    display: block;
    justify-content: flex-start;
  }
}

.alsaaer-site-auth__field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  position: relative;
  width: 100%;
}

/* Register steps (phone -> details). */
.alsaaer-site-auth__step {
  width: 100%;
}

.alsaaer-site-auth__step[hidden] {
  display: none !important;
}

.alsaaer-site-auth--app .alsaaer-site-auth__field {
  margin-bottom: 14px;
  max-width: var(--alsaaer-auth-form-width);
  margin-left: auto;
  margin-right: auto;
}

.alsaaer-site-auth__field > span {
  font-size: 12px;
  opacity: 0.8;
  display: block;
  position: static;
  float: none;
}

.alsaaer-site-auth--app .alsaaer-site-auth__field > span {
  font-size: 13px;
  opacity: 1;
  font-weight: 700;
  color: #0b2f4f;
}

.alsaaer-site-auth__field > input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px !important;
  border: 1px solid rgba(0, 0, 0, 0.14) !important;
  background: #fff !important;
  padding: 10px 12px !important;
  outline: none !important;
  box-shadow: none !important;
  display: block;
  position: static;
  float: none;
  margin: 0;
  min-height: 42px !important;
}

.alsaaer-site-auth--app .alsaaer-site-auth__field > input {
  min-height: var(--alsaaer-auth-control-height) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  background: var(--alsaaer-auth-field-bg) !important;
  border-color: var(--alsaaer-auth-field-border) !important;
  font-size: 16px !important;
}

/* Enforce consistent sizing for name + OTP fields (some themes override inputs by type/name). */
.alsaaer-site-auth--app input[name="reg_name"],
.alsaaer-site-auth--app input[name="otp"],
.alsaaer-site-auth--app input[name="reg_otp"],
.alsaaer-site-auth--app input[name="reset_otp"] {
  width: 100% !important;
  min-height: var(--alsaaer-auth-control-height) !important;
  border-radius: 14px !important;
  padding: 12px 14px !important;
  font-size: 16px !important;
  border: 1px solid var(--alsaaer-auth-field-border) !important;
  background: var(--alsaaer-auth-field-bg) !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Control wrapper (for phone prefix + password eye icon). */
.alsaaer-site-auth__control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  padding: 0;
  direction: ltr;
  overflow: hidden;
}

/* Consistent focus style across browsers/themes (Chrome differs from Safari). */
.alsaaer-site-auth__control:focus-within {
  border-color: rgba(242, 159, 5, 0.75);
  box-shadow: 0 0 0 3px rgba(242, 159, 5, 0.15);
}

.alsaaer-site-auth--app .alsaaer-site-auth__control {
  background: var(--alsaaer-auth-field-bg);
  border-color: var(--alsaaer-auth-field-border);
}

.alsaaer-site-auth__control input {
  flex: 1 !important;
  min-width: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 14px !important;
  min-height: 48px !important;
  width: auto !important;
  display: block !important;
  outline: none !important;
}

/* OTP control: same container as phone but without prefix. */
.alsaaer-site-auth__control--otp {
  direction: ltr;
  height: 48px;
  min-height: 48px;
}

.alsaaer-site-auth__control--otp input {
  text-align: center !important;
  direction: ltr !important;
  letter-spacing: 6px;
  font-weight: 800;
  height: 48px !important;
  min-height: 48px !important;
  line-height: 48px !important;
  padding: 0 !important;
}

.alsaaer-site-auth--app .alsaaer-site-auth__control--otp {
  max-width: var(--alsaaer-auth-form-width);
  margin-left: auto;
  margin-right: auto;
  background: var(--alsaaer-auth-field-bg);
  border-color: var(--alsaaer-auth-field-border);
  height: var(--alsaaer-auth-control-height);
  min-height: var(--alsaaer-auth-control-height);
}

.alsaaer-site-auth--app .alsaaer-site-auth__control--otp input {
  height: var(--alsaaer-auth-control-height) !important;
  min-height: var(--alsaaer-auth-control-height) !important;
  line-height: var(--alsaaer-auth-control-height) !important;
  padding: 0 !important;
}

.alsaaer-site-auth--app .alsaaer-site-auth__control input {
  min-height: var(--alsaaer-auth-control-height) !important;
  font-size: 16px !important;
}

.alsaaer-site-auth__control--phone {
  direction: ltr;
  display: flex !important;
  align-items: center !important;
}

/* If phone input is shorter, keep the +964 prefix the same height for alignment. */
/* Phone control: keep a single consistent control height like the app screenshot. */
.alsaaer-site-auth--app .alsaaer-site-auth__control--phone input[type="tel"] {
  min-height: var(--alsaaer-auth-control-height) !important;
}

.alsaaer-site-auth__prefix {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 48px;
  border-right: 0;
  color: rgba(0, 0, 0, 0.85);
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
  background: transparent;
}

.alsaaer-site-auth--app .alsaaer-site-auth__prefix {
  height: var(--alsaaer-auth-control-height);
  padding: 0 14px;
  background: transparent;
}

.alsaaer-site-auth__flag {
  width: 22px;
  height: 14px;
  border-radius: 2px;
  display: inline-block !important;
  border: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Use SVG so it renders consistently (emoji flags vary by OS/font). */
  background-image: url("data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"22\" height=\"14\" viewBox=\"0 0 22 14\"%3E%3Crect width=\"22\" height=\"14\" fill=\"%23fff\"/%3E%3Crect width=\"22\" height=\"4.6667\" y=\"0\" fill=\"%23ce1126\"/%3E%3Crect width=\"22\" height=\"4.6667\" y=\"9.3333\" fill=\"%23000000\"/%3E%3Ctext x=\"11\" y=\"7\" text-anchor=\"middle\" dominant-baseline=\"middle\" fill=\"%2300a650\" font-size=\"5.5\" font-weight=\"700\" font-family=\"Arial, sans-serif\"%3E%D8%A7%D9%84%D9%84%D9%87%20%D8%A3%D9%83%D8%A8%D8%B1%3C/text%3E%3C/svg%3E");
}

.alsaaer-site-auth__divider {
  width: 1px;
  height: 18px;
  background: rgba(0, 0, 0, 0.18);
  display: inline-block !important;
}

/* Country code line (separate line above phone input, like the app). */
.alsaaer-site-auth__country-code {
  font-size: 16px;
  font-weight: 700;
  color: var(--alsaaer-auth-muted);
  max-width: var(--alsaaer-auth-form-width);
  margin: -2px auto 6px;
  text-align: right;
}

/* Password row (eye button aligned like the phone prefix). */
.alsaaer-site-auth__password-row {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
}
.alsaaer-site-auth--app .alsaaer-site-auth__password-row {
  max-width: var(--alsaaer-auth-form-width);
  margin-left: auto;
  margin-right: auto;
  direction: ltr;
  flex-direction: row;
  gap: 0;
  overflow: hidden;
  border-radius: 14px !important;
  background: var(--alsaaer-auth-field-bg) !important;
  border: 1px solid var(--alsaaer-auth-field-border) !important;
  min-height: var(--alsaaer-auth-control-height);
}
.alsaaer-site-auth--app .alsaaer-site-auth__password-row input {
  flex: 1 !important;
  min-width: 0 !important;
  margin: 0 !important;
  min-height: var(--alsaaer-auth-control-height) !important;
  border-radius: 0 !important;
  padding: 0 14px !important;
  background: transparent !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  order: 2 !important;
  font-size: 16px !important;
}

/* Chrome autofill can style the first password field differently; normalize it. */
.alsaaer-site-auth__password-row input:-webkit-autofill,
.alsaaer-site-auth__password-row input:-webkit-autofill:hover,
.alsaaer-site-auth__password-row input:-webkit-autofill:focus,
.alsaaer-site-auth__password-row input:-webkit-autofill:active {
  -webkit-text-fill-color: rgba(17, 24, 39, 0.95) !important;
  transition: background-color 9999s ease-in-out 0s;
}

.alsaaer-site-auth--app .alsaaer-site-auth__password-row input:-webkit-autofill,
.alsaaer-site-auth--app .alsaaer-site-auth__password-row input:-webkit-autofill:hover,
.alsaaer-site-auth--app .alsaaer-site-auth__password-row input:-webkit-autofill:focus,
.alsaaer-site-auth--app .alsaaer-site-auth__password-row input:-webkit-autofill:active {
  box-shadow: 0 0 0 1000px var(--alsaaer-auth-field-bg) inset !important;
}

.alsaaer-site-auth:not(.alsaaer-site-auth--app) .alsaaer-site-auth__password-row input:-webkit-autofill,
.alsaaer-site-auth:not(.alsaaer-site-auth--app) .alsaaer-site-auth__password-row input:-webkit-autofill:hover,
.alsaaer-site-auth:not(.alsaaer-site-auth--app) .alsaaer-site-auth__password-row input:-webkit-autofill:focus,
.alsaaer-site-auth:not(.alsaaer-site-auth--app) .alsaaer-site-auth__password-row input:-webkit-autofill:active {
  box-shadow: 0 0 0 1000px #fff inset !important;
}

/* Reduce mobile browser double-tap/auto-zoom behavior where possible. */
.alsaaer-site-auth__dialog {
  touch-action: manipulation;
}

.alsaaer-site-auth--app .alsaaer-site-auth__password-row .alsaaer-site-auth__icon-btn {
  order: 1 !important;
  height: var(--alsaaer-auth-control-height);
  min-height: var(--alsaaer-auth-control-height);
  padding: 0 12px !important;
  width: 64px;
  min-width: 64px;
  flex: 0 0 64px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative;
  border: 0 !important;
  background: transparent !important;
  color: rgba(0, 0, 0, 0.65) !important;
}

.alsaaer-site-auth__icon-btn .alsaaer-site-auth__icon {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.alsaaer-site-auth--app .alsaaer-site-auth__password-row .alsaaer-site-auth__icon-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 1px;
  height: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.alsaaer-site-auth__icon-btn {
  border: 0 !important;
  background: transparent !important;
  padding: 0 12px !important;
  height: 48px;
  color: rgba(0, 0, 0, 0.65) !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
  margin: 0 !important;
}

.alsaaer-site-auth--app .alsaaer-site-auth__icon-btn {
  width: var(--alsaaer-auth-control-height);
  height: var(--alsaaer-auth-control-height);
  flex: 0 0 var(--alsaaer-auth-control-height);
  padding: 0 !important;
  border: 1px solid var(--alsaaer-auth-field-border) !important;
  border-radius: 14px !important;
  background: #fff !important;
  color: rgba(11, 47, 79, 0.75) !important;
}

.alsaaer-site-auth__icon {
  width: 22px;
  height: 22px;
  display: inline-block;
}

.alsaaer-site-auth__control:focus-within {
  border-color: rgba(14, 165, 233, 0.7);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.alsaaer-site-auth--app .alsaaer-site-auth__control:focus-within {
  border-color: var(--alsaaer-auth-accent) !important;
  box-shadow: none !important;
}

.alsaaer-site-auth--app .alsaaer-site-auth__password-row:focus-within {
  border-color: var(--alsaaer-auth-accent) !important;
  box-shadow: none !important;
}

/* Prevent inner input from showing a second focus ring/color. */
.alsaaer-site-auth--app .alsaaer-site-auth__control input:focus,
.alsaaer-site-auth--app .alsaaer-site-auth__control input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.alsaaer-site-auth__submit {
  color: #fff;
  width: 100%;
  border: 0 !important;
  border-radius: 16px !important;
  padding: 11px 12px !important;
  font-weight: 800;
  max-width: var(--alsaaer-auth-form-width);
  margin-left: auto;
  margin-right: auto;
  background: var(--alsaaer-auth-accent) !important;
  cursor: pointer;
  display: block !important;
  position: static !important;
  float: none !important;
  text-decoration: none !important;
}

.alsaaer-site-auth--app .alsaaer-site-auth__submit {
  min-height: 56px;
  padding: 14px 16px !important;
  font-size: 16px;
  color: var(--alsaaer-auth-accent-text);
}

/* Add extra spacing between the main actions on the password view. */
.alsaaer-site-auth--app .alsaaer-site-auth__view[data-view="password"] .alsaaer-site-auth__submit--login {
  margin-bottom: 12px;
}
.alsaaer-site-auth--app .alsaaer-site-auth__view[data-view="password"] .alsaaer-site-auth__submit--register {
  margin-top: 12px;
}

.alsaaer-site-auth--app .alsaaer-site-auth__remember {
  max-width: var(--alsaaer-auth-form-width);
  margin-left: auto;
  margin-right: auto;
  justify-content: flex-end;
  flex-direction: row-reverse;
  font-size: 15px;
  color: #0b2f4f;
}
.alsaaer-site-auth--app .alsaaer-site-auth__remember input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--alsaaer-auth-accent);
}

.alsaaer-site-auth__submit--login {
  font-size: 18px !important;
  font-weight: 800;
}

.alsaaer-site-auth__link--small {
  font-size: 13px !important;
  font-weight: 700;
}
.alsaaer-site-auth__submit--register {
  background: var(--alsaaer-auth-secondary) !important;
  color: #fff;
}

.alsaaer-site-auth__submit--ghost {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.14) !important;
  color: var(--alsaaer-auth-secondary);
}

.alsaaer-site-auth__secondary {
  border: 1px solid rgba(0, 0, 0, 0.14) !important;
  border-radius: 12px !important;
  padding: 9px 10px !important;
  background: #fff !important;
  cursor: pointer;
  font-weight: 700;
  position: static !important;
  float: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* OTP send button (WhatsApp) in app mode should use brand yellow. */
.alsaaer-site-auth--app .alsaaer-site-auth__secondary {
  background: var(--alsaaer-auth-accent) !important;
  border: 0 !important;
  color: var(--alsaaer-auth-accent-text) !important;
}

.alsaaer-site-auth--app .alsaaer-site-auth__secondary {
  width: 100%;
  min-height: 52px;
  border-radius: 16px !important;
  padding: 12px 16px !important;
}

.alsaaer-site-auth__row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.alsaaer-site-auth--app .alsaaer-site-auth__row {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 14px;
  max-width: var(--alsaaer-auth-form-width);
  margin-left: auto;
  margin-right: auto;
}

.alsaaer-site-auth__hint {
  font-size: 12px;
  opacity: 0.7;
}

.alsaaer-site-auth--app .alsaaer-site-auth__hint {
  text-align: center;
  opacity: 0.75;
}

.alsaaer-site-auth__links {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Split links: right/left alignment in one row (RTL friendly). */
.alsaaer-site-auth__links--split {
  justify-content: space-between;
  width: 100%;
  max-width: var(--alsaaer-auth-form-width);
  margin-left: auto;
  margin-right: auto;
}

/* Register: keep links a bit away from the main button. */
.alsaaer-site-auth__view[data-view="register"] .alsaaer-site-auth__links--split {
  margin-top: 16px;
}

.alsaaer-site-auth--app .alsaaer-site-auth__links {
  margin: 10px 0 0;
  gap: 10px;
}

.alsaaer-site-auth__link {
  border: 0 !important;
  background: transparent !important;
  color: #0ea5e9 !important;
  cursor: pointer;
  font-weight: 700;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-block;
  text-decoration: none !important;
}

.alsaaer-site-auth--app .alsaaer-site-auth__link {
  font-size: 13px !important;
  font-weight: 700;
  color: #0b3b64 !important;
}

.alsaaer-site-auth__error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 10px;
}

.alsaaer-site-auth__error.is-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.alsaaer-site-auth__loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(244, 245, 247, 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  font-size: 14px;
  font-weight: 800;
  color: rgba(11, 47, 79, 0.92);
  text-align: center;
  padding: 16px;
}

.alsaaer-site-auth__loading[hidden] {
  display: none !important;
}

.alsaaer-site-auth__loading:not([hidden]) {
  display: flex;
}

.alsaaer-site-auth--app .alsaaer-site-auth__body {
  position: relative;
}

@media (max-width: 480px) {
  .alsaaer-site-auth__dialog {
    width: min(94vw, 420px);
  }
}
