:root {
  --alsh-auth-brand: #003375;
  --alsh-auth-brand-hover: #00265a;
  --alsh-auth-link-hover: #2f6fe4;
  --alsh-auth-bg: #ffffff;
  --alsh-auth-card: #ffffff;
  --alsh-auth-btn: #ffffff;
  --alsh-auth-text: #172033;
  --alsh-auth-muted: #6b7280;
  --alsh-auth-border: #e5e7eb;
  --alsh-auth-overlay: rgba(15, 23, 42, 0.42);
  --alsh-auth-radius: 22px;
  --alsh-auth-input-bg: #f8fafc;
  --alsh-auth-input-border: #d9dee8;
  --alsh-auth-input-active: #ffffff;
  --alsh-auth-soft-bg: #f3f6fb;
  --alsh-auth-danger: #d92d20;
  --alsh-auth-success: #039855;
}

body.alsh-auth-no-scroll {
  overflow: hidden !important;
}

body.alsh-auth-no-scroll > *:not(#alsh-auth-overlay) {
  filter: blur(6px);
  transition: filter 0.2s ease;
  pointer-events: none;
  user-select: none;
}

.alsh-auth-widget {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.alsh-auth-widget-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.alsh-auth-trigger,
.alsh-auth-account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-height: 34px;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none !important;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.alsh-auth-trigger {
  background: var(--alsh-auth-brand);
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(0, 51, 117, 0.18);
}

.alsh-auth-trigger:hover {
  background: var(--alsh-auth-brand-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.alsh-auth-account-link {
  background: #f1f5f9;
  color: var(--alsh-auth-brand) !important;
  border: 1px solid #dbe3ef;
}

.alsh-auth-account-link:hover {
  background: var(--alsh-auth-brand);
  color: #ffffff !important;
  border-color: var(--alsh-auth-brand);
}

.alsh-auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--alsh-auth-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.alsh-auth-overlay.is-open {
  display: flex;
}

.alsh-auth-modal {
  width: 800px;
  max-width: 100%;
  height: 500px;
  max-height: 500px;
  background: var(--alsh-auth-card);
  color: var(--alsh-auth-text);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--alsh-auth-radius);
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.24);
  direction: rtl;
}

.alsh-auth-close,
.alsh-auth-back {
  position: absolute;
  top: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.alsh-auth-close {
  right: 16px;
  left: auto;
}

.alsh-auth-back {
  left: 16px;
  right: auto;
  padding: 0;
  margin: 0;
}

.alsh-auth-back--global {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 8;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.alsh-auth-back--global.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease, visibility 0s linear 0s;
}

.alsh-auth-close:hover,
.alsh-auth-back:hover {
  background: #f8fafc;
  color: var(--alsh-auth-brand);
  border-color: #cbd5e1;
}

.alsh-auth-modal__image {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: var(--alsh-auth-soft-bg);
  padding: 12px;
}

.alsh-auth-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 25% 20%, rgba(0, 51, 117, 0.14), transparent 38%),
    linear-gradient(135deg, #ffffff, #edf3fb);
  color: var(--alsh-auth-brand);
  font-size: 24px;
  line-height: 1.5;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.3px;
  border-radius: 18px;
}

.alsh-auth-image-placeholder img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 18px !important;
}

.alsh-auth-modal__content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px;
  overflow: hidden;
  direction: rtl;
  background: #ffffff;
}

.alsh-auth-view {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% - 72px);
  max-width: 320px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 10px));
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
  will-change: opacity, transform;
}

.alsh-auth-view.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0s;
}

.alsh-auth-view.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, calc(-50% - 10px));
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}

.alsh-auth-title {
  margin: 0 0 24px;
  color: #111827;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

.alsh-auth-title--center {
  text-align: center;
}

.alsh-auth-option-btn,
.alsh-auth-submit-btn {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--alsh-auth-border);
  border-radius: 14px;
  background: var(--alsh-auth-btn);
  color: var(--alsh-auth-text);
  cursor: pointer;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.alsh-auth-option-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.alsh-auth-submit-btn {
  background: var(--alsh-auth-brand);
  border-color: var(--alsh-auth-brand);
  color: #ffffff;
}

.alsh-auth-submit-btn:hover {
  background: var(--alsh-auth-brand-hover);
  border-color: var(--alsh-auth-brand-hover);
}

.alsh-auth-option-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f3f4f6;
  color: #94a3b8;
}

.alsh-auth-option-btn__label {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.alsh-auth-option-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--alsh-auth-brand);
  flex: 0 0 auto;
}

.alsh-auth-submit-btn .alsh-auth-option-btn__icon,
.alsh-auth-submit-btn svg {
  color: #ffffff;
}

.alsh-auth-option-btn {
  gap: 10px;
}

.alsh-auth-or {
  text-align: center;
  color: var(--alsh-auth-muted);
  font-size: 14px;
  margin: 16px 0;
}

.alsh-auth-chooser-register {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
}

.alsh-auth-chooser-register__muted,
.alsh-auth-signup-muted {
  color: var(--alsh-auth-muted);
  font-size: 13px;
}

.alsh-auth-inline-link,
.alsh-auth-link {
  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  background: transparent !important;
  color: var(--alsh-auth-brand) !important;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0 !important;
  margin: 0;
  text-decoration: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.alsh-auth-inline-link:hover,
.alsh-auth-inline-link:focus,
.alsh-auth-inline-link:active,
.alsh-auth-link:hover,
.alsh-auth-link:focus,
.alsh-auth-link:active {
  background: transparent !important;
  color: var(--alsh-auth-link-hover) !important;
  opacity: 1;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
}

.alsh-auth-inline-link--small,
.alsh-auth-link {
  font-size: 13px;
}

.alsh-auth-form {
  width: 100%;
}

.alsh-auth-field {
  margin-bottom: 12px;
  text-align: right;
  width: 100%;
}

.alsh-auth-password-wrap {
  position: relative;
  width: 100%;
}

.alsh-auth-field input,
.alsh-auth-field input[type="email"],
.alsh-auth-field input[type="password"],
.alsh-auth-field input[type="text"] {
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 54px !important;
  border-radius: 14px !important;
  border: 1px solid var(--alsh-auth-input-border) !important;
  background: var(--alsh-auth-input-bg) !important;
  color: var(--alsh-auth-text) !important;
  padding: 0 16px !important;
  outline: none;
  box-sizing: border-box !important;
  text-align: right;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none !important;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.alsh-auth-password-wrap input,
.alsh-auth-password-wrap input[type="password"],
.alsh-auth-password-wrap input[type="text"] {
  padding-left: 64px !important;
}

.alsh-auth-field input::placeholder {
  color: #94a3b8;
}

.alsh-auth-field input:hover,
.alsh-auth-field input:focus {
  background: var(--alsh-auth-input-active) !important;
  border-color: var(--alsh-auth-brand) !important;
  box-shadow: 0 0 0 3px rgba(0, 51, 117, 0.10) !important;
}

.alsh-auth-field input:not(:placeholder-shown):not(:focus) {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

.alsh-auth-field input:-webkit-autofill,
.alsh-auth-field input:-webkit-autofill:hover,
.alsh-auth-field input:-webkit-autofill:focus,
.alsh-auth-field input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--alsh-auth-text) !important;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  border: 1px solid #cbd5e1 !important;
}



/* Remove native/browser/WooCommerce password reveal icons inside this popup only */
.alsh-auth-password-wrap input[type="password"]::-ms-reveal,
.alsh-auth-password-wrap input[type="password"]::-ms-clear,
.alsh-auth-password-wrap input[type="text"]::-ms-reveal,
.alsh-auth-password-wrap input[type="text"]::-ms-clear {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.alsh-auth-password-wrap input[type="password"]::-webkit-credentials-auto-fill-button,
.alsh-auth-password-wrap input[type="password"]::-webkit-contacts-auto-fill-button,
.alsh-auth-password-wrap input[type="password"]::-webkit-caps-lock-indicator,
.alsh-auth-password-wrap input[type="text"]::-webkit-credentials-auto-fill-button,
.alsh-auth-password-wrap input[type="text"]::-webkit-contacts-auto-fill-button,
.alsh-auth-password-wrap input[type="text"]::-webkit-caps-lock-indicator {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

.alsh-auth-password-wrap input::-webkit-textfield-decoration-container {
  visibility: hidden !important;
  pointer-events: none !important;
}

.alsh-auth-password-wrap .show-password-input,
.alsh-auth-password-wrap .woocommerce-password-strength,
.alsh-auth-password-wrap .woocommerce-password-hint,
.alsh-auth-password-wrap .password-input::before,
.alsh-auth-password-wrap .password-input::after {
  display: none !important;
  visibility: hidden !important;
  content: none !important;
}

.alsh-auth-password-toggle {
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  background: #ffffff !important;
  color: var(--alsh-auth-brand) !important;
  cursor: pointer;
  width: 44px;
  height: 38px;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  outline: none !important;
  z-index: 5;
}

.alsh-auth-password-toggle::before {
  content: "" !important;
  position: absolute;
  inset: -2px -4px;
  display: block !important;
  background: #ffffff !important;
  border-radius: 12px;
  z-index: 0;
}

.alsh-auth-password-toggle::after {
  content: none !important;
  display: none !important;
}

.alsh-auth-password-toggle i,
.alsh-auth-password-toggle svg {
  position: relative;
  z-index: 1;
  pointer-events: none;
  line-height: 1;
}

.alsh-auth-password-wrap:focus-within .alsh-auth-password-toggle,
.alsh-auth-password-wrap:focus-within .alsh-auth-password-toggle::before {
  background: #ffffff !important;
}

.alsh-auth-password-toggle:hover,
.alsh-auth-password-toggle:focus,
.alsh-auth-password-toggle:active {
  background: #ffffff !important;
  color: var(--alsh-auth-link-hover) !important;
  box-shadow: none !important;
  outline: none !important;
}

.alsh-auth-password-toggle:hover::before,
.alsh-auth-password-toggle:focus::before,
.alsh-auth-password-toggle:active::before {
  background: #ffffff !important;
}

.alsh-auth-password-toggle__hide {
  display: none !important;
}

.alsh-auth-password-toggle.is-active .alsh-auth-password-toggle__show {
  display: none !important;
}

.alsh-auth-password-toggle.is-active .alsh-auth-password-toggle__hide {
  display: inline-block !important;
}

.alsh-auth-submit-btn {
  display: flex;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  justify-content: center;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 800;
  box-sizing: border-box !important;
}

.alsh-auth-links,
.alsh-auth-register-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.alsh-auth-link--forgot {
  color: var(--alsh-auth-brand) !important;
}

.alsh-auth-signup-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.alsh-auth-register-footer {
  justify-content: center;
  flex-wrap: wrap;
}

.alsh-auth-message {
  display: none;
  margin-bottom: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.alsh-auth-message.is-error {
  display: block;
  background: #fff3f2;
  border: 1px solid #fecdca;
  color: var(--alsh-auth-danger);
}

.alsh-auth-message.is-success {
  display: block;
  background: #ecfdf3;
  border: 1px solid #abefc6;
  color: var(--alsh-auth-success);
}

.alsh-auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

@media (max-width: 767px) {
  .alsh-auth-overlay {
    padding: 16px;
  }

  .alsh-auth-modal {
    width: 100%;
    max-width: 420px;
    height: auto;
    min-height: 420px;
    grid-template-columns: 1fr;
  }

  .alsh-auth-modal__image {
    display: none;
  }

  .alsh-auth-modal__content {
    padding: 54px 24px 28px;
    min-height: 420px;
    align-items: center;
  }

  .alsh-auth-title {
    font-size: 24px;
  }

  .alsh-auth-view {
    width: calc(100% - 48px);
    max-width: 100%;
  }

  .alsh-auth-links,
  .alsh-auth-register-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .alsh-auth-view--register .alsh-auth-register-footer {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
  }

  .alsh-auth-view--register .alsh-auth-register-footer .alsh-auth-signup-muted,
  .alsh-auth-view--register .alsh-auth-register-footer .alsh-auth-inline-link {
    font-size: 12px;
  }

  .alsh-auth-signup-wrap {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .alsh-auth-view,
  .alsh-auth-view.is-active,
  .alsh-auth-view.is-leaving {
    transition: none;
  }
}

@media (min-width: 768px) {
  .alsh-auth-modal__image,
  .alsh-auth-image-placeholder {
    height: 476px;
    max-height: 476px;
  }

  .alsh-auth-view--register .alsh-auth-title,
  .alsh-auth-view--forgot .alsh-auth-title,
  .alsh-auth-view--email .alsh-auth-title {
    margin-bottom: 18px;
  }
}
