/* Independent account screens. Keep browser pinch zoom available. */
body.wellness-auth-screen {
  padding-bottom: 0;
  background: var(--wp-cream, #faf6ef);
}

.wellness-auth-screen #wp-main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
}

.wellness-auth-screen .wp-auth-page,
.wellness-auth-screen #wp-main > .wp-container {
  width: 100%;
  max-width: 560px;
  padding: 0;
  margin: 0 auto;
}

.wellness-auth-screen .wp-auth-wrap {
  width: 100%;
  padding: 0;
}

.wellness-auth-screen .wp-auth-card {
  width: 100%;
  max-width: none;
  overflow: visible;
}

.wellness-auth-screen .wp-auth-head {
  overflow: visible;
  border-radius: var(--wp-r-l) var(--wp-r-l) 0 0;
  z-index: 5;
}

.wellness-auth-screen .wp-auth-head::before {
  border-radius: inherit;
  pointer-events: none;
}

.wellness-auth-screen .wp-auth-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.wellness-auth-screen .wp-auth-heading-row h1 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.wellness-auth-screen .wp-auth-language {
  flex: 0 0 auto;
  max-width: 60%;
}

.wellness-auth-screen .wp-auth-body {
  position: relative;
  z-index: 1;
}

/* Native WooCommerce login and email recovery keep their original form markup. */
.wellness-auth-screen .woocommerce {
  width: 100%;
  padding: 24px;
  background: var(--wp-paper, #fffdf8);
  border: 1px solid var(--wp-line);
  border-radius: var(--wp-r-l);
}

.wellness-auth-screen .wp-native-auth-heading {
  position: relative;
  z-index: 5;
  margin-bottom: 24px;
}

.wellness-auth-screen .wp-native-auth-heading + h2,
.wellness-auth-screen .wp-native-auth-heading + #customer_login .u-column1 > h2 {
  display: none;
}

.wellness-auth-screen #customer_login .u-column1,
.wellness-auth-screen #customer_login .u-column2 {
  float: none;
  width: 100%;
}

.wellness-auth-screen .woocommerce form.login,
.wellness-auth-screen .woocommerce form.register {
  margin: 0 0 24px;
}

/* The old full-width select plus flex:none hid the actual phone input.
   Give only the dialing-code control a fixed width and let the tel field fill the rest. */
.wellness-auth-screen .wp-auth-card .wp-phone-field > select.wp-phone-code {
  flex: 0 0 104px;
  width: 104px;
  min-width: 0;
  max-width: 38%;
  border: 0;
  border-right: 1px solid var(--wp-line);
  border-radius: 0;
  padding: 0 26px 0 10px;
}

.wellness-auth-screen .wp-auth-card .wp-phone-field > input[type="tel"] {
  flex: 1 1 0%;
  display: block;
  width: 0;
  min-width: 0;
  max-width: none;
  padding: 12px;
  border-radius: 0;
}

/* iOS Safari normally zooms focused controls below 16px. Fix control text size,
   without maximum-scale/user-scalable restrictions or resetting the viewport. */
.wellness-auth-screen .wp-auth-card .wp-field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.wellness-auth-screen .wp-auth-card .wp-field select,
.wellness-auth-screen .wp-auth-card .wp-field textarea,
.wellness-auth-screen .woocommerce-form input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.wellness-auth-screen .woocommerce-form select,
.wellness-auth-screen .woocommerce-ResetPassword input:not([type="hidden"]) {
  font-size: 16px;
  font-size: max(16px, var(--wp-font-base, 16px));
  min-height: 48px;
  line-height: 1.45;
}

.wellness-auth-screen .wp-auth-card .wp-field input::placeholder {
  font-size: inherit;
  opacity: 1;
  color: var(--wp-ink3);
}

.wellness-auth-screen .wp-code-field {
  align-items: stretch;
}

.wellness-auth-screen .wp-send-code {
  white-space: normal;
  overflow-wrap: break-word;
  max-width: 45%;
}

@media (max-width: 600px) {
  body.wellness-auth-screen {
    background: var(--wp-paper, #fffdf8);
  }

  .wellness-auth-screen #wp-main {
    padding: 0;
  }

  .wellness-auth-screen .wp-auth-page,
  .wellness-auth-screen #wp-main > .wp-container {
    max-width: 100%;
  }

  .wellness-auth-screen .wp-auth-card {
    min-height: 100vh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .wellness-auth-screen .wp-auth-head {
    border-radius: 0;
    padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 22px max(18px, env(safe-area-inset-left));
  }

  .wellness-auth-screen .wp-auth-body {
    padding: 24px max(18px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  }

  .wellness-auth-screen .woocommerce {
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    border: 0;
    border-radius: 0;
  }
}
