/* —— Auth app mockup — exact light UI —— */
.magic-auth-page .site-main.magic-auth-main {
  position: relative;
  min-height: calc(100vh - 5rem);
  padding: 1rem 0 2.5rem;
  overflow: clip;
  background: #fff;
}

.magic-auth-page .magic-auth-atmosphere {
  display: none;
}

.magic-auth--app {
  position: relative;
  z-index: 1;
  max-width: 400px;
  margin: 0 auto;
  padding: 0.25rem 0.25rem 1.5rem;
  display: block !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: visible !important;
  animation: none;
}

.magic-auth-brand {
  text-align: center;
  margin-bottom: 1.35rem;
}

.magic-auth-brand__link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: inherit;
}

.magic-auth-brand__link img,
.magic-auth-brand__link .brand-logo,
.magic-auth-brand__link picture,
.magic-auth-brand__logo {
  width: auto !important;
  height: 52px !important;
  object-fit: contain;
}

.magic-auth-brand__name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a56db;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.magic-auth-brand__tagline {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #8b97ab;
}

.magic-auth-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  margin: 0 0 0.35rem;
  color: #0b1220;
  border-radius: 999px;
  text-decoration: none;
}

.magic-auth-head {
  text-align: center;
  margin-bottom: 1.15rem;
}

.magic-auth-head h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: #0b1220;
}

.magic-auth-head p {
  margin: 0 auto;
  max-width: 28ch;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #8b97ab;
}

/* Tabs: active = solid blue + white (exact mockup) */
.magic-auth-method {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.magic-auth-method__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.85rem;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: 12px;
  background: #eef1f6;
  color: #5a6b7f;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.magic-auth-method__tab.is-active {
  color: #fff !important;
  background: #1a56db !important;
  box-shadow: 0 8px 18px rgba(26, 86, 219, 0.28);
}

.magic-auth-method__icon {
  display: inline-flex;
  color: currentColor;
}

.magic-auth-method__icon svg {
  display: block;
}

/* Fields */
.magic-auth-field {
  position: relative;
  margin: 0 0 0.8rem;
}

.magic-auth--app .magic-auth-field .input-text,
.magic-auth--app .magic-auth-field input[type="text"],
.magic-auth--app .magic-auth-field input[type="email"],
.magic-auth--app .magic-auth-field input[type="password"],
.magic-auth--app .magic-auth-form .magic-auth-field input.input-text {
  width: 100%;
  min-height: 3.2rem;
  padding-block: 0.75rem !important;
  padding-inline-start: 3.25rem !important; /* space for icon (RTL = right) */
  padding-inline-end: 1rem !important;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f3f5f9 !important;
  color: #0b1220;
  font-size: 0.95rem;
  box-shadow: none !important;
}

.magic-auth--app .magic-auth-field.magic-auth-pass-field .input-text,
.magic-auth--app .magic-auth-field.magic-auth-pass-field input[type="password"] {
  padding-inline-end: 2.85rem !important;
}

.magic-auth-field__icon {
  position: absolute;
  inset-inline-start: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  display: inline-flex;
  pointer-events: none;
  z-index: 1;
}

.magic-auth-pass-toggle {
  position: absolute;
  inset-inline-end: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #94a3b8;
  padding: 0.4rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.magic-auth-pass-toggle:hover,
.magic-auth-pass-toggle[aria-pressed="true"] {
  color: #1a56db;
}

.magic-auth-field input:focus {
  outline: none;
  border-color: #1a56db;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12) !important;
}

.magic-auth-form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0.1rem 0 1rem;
  font-size: 0.88rem;
}

.magic-auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #0b1220;
  cursor: pointer;
  font-weight: 600;
}

.magic-auth-remember input {
  accent-color: #1a56db;
  width: 1.1rem;
  height: 1.1rem;
}

.magic-auth-forgot {
  color: #1a56db;
  font-weight: 700;
  text-decoration: none;
}

.magic-auth-agree {
  margin: 0.2rem 0 1rem;
  font-size: 0.86rem;
  color: #5a6b7f;
  line-height: 1.5;
}

.magic-auth-agree label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.magic-auth-agree input {
  margin-top: 0.15rem;
  accent-color: #1a56db;
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
}

.magic-auth-agree a {
  color: #1a56db;
  font-weight: 700;
  text-decoration: none;
}

.magic-auth-form__submit {
  margin: 0.15rem 0 0 !important;
}

.magic-auth-submit,
.magic-auth--app .magic-auth-submit,
.magic-auth--app button.magic-auth-submit {
  width: 100%;
  min-height: 3.25rem;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.02rem;
  color: #fff !important;
  background: #1a56db !important;
  box-shadow: 0 10px 22px rgba(26, 86, 219, 0.28);
  cursor: pointer;
}

.magic-auth-submit:hover {
  background: #1546b8 !important;
}

.magic-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.2rem 0 0.95rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.magic-auth-divider::before,
.magic-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.magic-auth-social {
  display: grid;
  gap: 0.65rem;
}

.magic-auth-social__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 3.1rem;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #0b1220;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.magic-auth-social__btn:hover:not(:disabled) {
  border-color: #1a56db;
}

.magic-auth-social__btn:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}

.magic-auth-social__g,
.magic-auth-social__google-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  display: block;
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  mask: none !important;
  -webkit-mask: none !important;
}

.magic-auth-social__apple {
  width: 1.15rem;
  height: 1.15rem;
  background: #0b1220;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16.4 12.3c0-2 1.6-3 1.7-3.1-0.9-1.4-2.4-1.5-2.9-1.6-1.2-.1-2.4.7-3 .7s-1.6-.7-2.7-.7c-1.4 0-2.7.8-3.4 2.1-1.5 2.5-.4 6.3 1 8.4.7 1 1.5 2.1 2.6 2.1s1.4-.7 2.7-.7 1.6.7 2.7.7 1.8-1 2.5-2c.8-1.1 1.1-2.2 1.1-2.2s-2.1-.8-2.1-3.2zM14.3 6.5c.6-.8 1.1-1.8.9-2.9-0.9.1-2 .6-2.6 1.4-.6.7-1.1 1.8-.9 2.8 1 .1 2-.5 2.6-1.3z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16.4 12.3c0-2 1.6-3 1.7-3.1-0.9-1.4-2.4-1.5-2.9-1.6-1.2-.1-2.4.7-3 .7s-1.6-.7-2.7-.7c-1.4 0-2.7.8-3.4 2.1-1.5 2.5-.4 6.3 1 8.4.7 1 1.5 2.1 2.6 2.1s1.4-.7 2.7-.7 1.6.7 2.7.7 1.8-1 2.5-2c.8-1.1 1.1-2.2 1.1-2.2s-2.1-.8-2.1-3.2zM14.3 6.5c.6-.8 1.1-1.8.9-2.9-0.9.1-2 .6-2.6 1.4-.6.7-1.1 1.8-.9 2.8 1 .1 2-.5 2.6-1.3z'/%3E%3C/svg%3E") center / contain no-repeat;
  flex-shrink: 0;
}

.magic-auth-foot {
  margin: 1.35rem 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: #5a6b7f;
}

.magic-auth-foot a {
  color: #1a56db;
  font-weight: 800;
  text-decoration: none;
}

.magic-auth-phone-hint {
  padding: 1.1rem 1rem;
  border-radius: 12px;
  background: #f3f5f9;
  text-align: center;
  color: #5a6b7f;
  font-size: 0.92rem;
  line-height: 1.55;
}

.magic-auth-phone-hint p {
  margin: 0;
}

.magic-auth-phone-hint__sub {
  margin-top: 0.4rem !important;
  font-size: 0.84rem;
  color: #94a3b8;
}

.magic-auth-pane[hidden] {
  display: none !important;
}

.magic-auth--app .magic-otp-panel,
.magic-auth--app .magic-otp-panel--compact {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.magic-auth--app .magic-otp-panel h2,
.magic-auth--app .magic-otp-panel--compact h2 {
  display: none;
}

.magic-auth--app .magic-otp-panel input,
.magic-auth--app .magic-otp-panel button[type="submit"] {
  border-radius: 12px;
  min-height: 3.1rem;
}

.magic-auth--app .magic-otp-panel button[type="submit"] {
  background: #1a56db !important;
  color: #fff !important;
  font-weight: 800;
}

/* Dark mode still readable */
[data-theme="dark"] .magic-auth-page .site-main.magic-auth-main {
  background: var(--bg, #05070b);
}

[data-theme="dark"] .magic-auth-head h1,
[data-theme="dark"] .magic-auth-remember,
[data-theme="dark"] .magic-auth-social__btn {
  color: var(--text);
}

[data-theme="dark"] .magic-auth-method__tab {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

[data-theme="dark"] .magic-auth-method__tab.is-active {
  background: #1a56db !important;
  color: #fff !important;
}

[data-theme="dark"] .magic-auth-field .input-text,
[data-theme="dark"] .magic-auth-field input {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

[data-theme="dark"] .magic-auth-social__btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .magic-auth-social__apple {
  background: #fff;
}

[data-theme="dark"] .magic-auth-phone-hint {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

/* Lost / reset password — same shell as login */
body.magic-auth-page--lost.woocommerce-account .woocommerce,
body.magic-auth-page--lost .woocommerce {
  display: block !important;
}

.magic-auth-page--lost .woocommerce-MyAccount-content--auth,
.magic-auth-page--lost .woocommerce-MyAccount-content {
  max-width: none;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  width: 100% !important;
}

.magic-auth-page--lost .woocommerce-MyAccount-navigation,
.magic-auth-page--lost .magic-account-welcome {
  display: none !important;
}

.magic-auth--lost .magic-auth-form {
  margin-top: 0.25rem;
}

@media (min-width: 900px) {
  .magic-auth--app {
    max-width: 420px;
    padding-top: 0.75rem;
  }
}
