.mz-account-popover__form,
.mz-account-popover__card {
  box-sizing: border-box !important;
}

.mz-account-popover__form .mz-account-popover__submit-row,
.mz-account-popover__submit-row {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  clear: both !important;
  margin: 0 0 22px !important;
  padding: 0 !important;
}

.mz-account-popover__submit-row::before,
.mz-account-popover__submit-row::after {
  content: "" !important;
  display: table !important;
}

.mz-account-popover__submit-row::after {
  clear: both !important;
}

.mz-account-popover__submit-row .mz-account-popover__primary,
.mz-account-popover__form button.mz-account-popover__primary,
.mz-account-popover__form .button.mz-account-popover__primary,
.mz-account-popover__form .woocommerce-button.mz-account-popover__primary,
.mz-account-popover__form .woocommerce-Button.mz-account-popover__primary,
.mz-account-popover__form .woocommerce-form-login__submit.mz-account-popover__primary,
.mz-account-popover__form .woocommerce-form-register__submit.mz-account-popover__primary {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 18px !important;
  text-align: center !important;
}

@media (min-width: 1025px) {
  .mz-account-popover__submit-row .mz-account-popover__primary,
  .mz-account-popover__form button.mz-account-popover__primary,
  .mz-account-popover__form .button.mz-account-popover__primary,
  .mz-account-popover__form .woocommerce-button.mz-account-popover__primary,
  .mz-account-popover__form .woocommerce-Button.mz-account-popover__primary {
    height: 48px !important;
  }
}

.mz-account-popover__panel[data-mz-auth-panel="lost"] .mz-account-popover__description {
  color: #666666 !important;
  font-family: Linux Biolinum, IBM Plex Sans Thai, sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 22px !important;
  margin: 0 0 20px !important;
  text-align: left !important;
}

.mz-account-popover__panel[data-mz-auth-panel="lost"] .mz-account-popover__form {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 14px !important;
  width: 100% !important;
}

.mz-account-popover__panel[data-mz-auth-panel="lost"] .mz-account-popover__field,
.mz-account-popover__panel[data-mz-auth-panel="lost"] .form-row-first {
  display: block !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.mz-account-popover__panel[data-mz-auth-panel="lost"] .mz-account-popover__field input.input-text,
.mz-account-popover__panel[data-mz-auth-panel="lost"] .mz-account-popover__field input[type=email] {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  height: 48px !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 12px !important;
  padding: 12px !important;
  font-size: 14px !important;
  line-height: 20px !important;
}

.mz-account-popover__panel[data-mz-auth-panel="lost"] .clear {
  display: none !important;
}

.mz-account-popover__panel[data-mz-auth-panel="lost"] .mz-account-popover__submit-row {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.mz-account-popover__panel[data-mz-auth-panel="lost"] .mz-account-popover__primary {
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  border-radius: 40px !important;
  font-size: 16px !important;
  line-height: 18px !important;
}

.mz-account-popover__panel[data-mz-auth-panel="lost"] .mz-account-popover__switch {
  margin-top: 20px !important;
}

/* Figma mobile login sizing: 390px wide form, 24px padding, compact controls. */
@media (max-width: 1024px) {
  .mz-account-popover {
    align-items: stretch !important;
    background: #ffffff !important;
    display: flex !important;
    height: 100vh !important;
    height: 100dvh !important;
    justify-content: center !important;
    overflow: auto !important;
    width: 100% !important;
  }

  .mz-account-popover__card {
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    max-width: 390px !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding: 24px !important;
    width: 100% !important;
  }

  .mz-account-popover__title {
    font-size: 28px !important;
    line-height: 32px !important;
    margin: 0 48px 20px 0 !important;
  }

  .mz-account-popover__close {
    font-size: 24px !important;
    height: 32px !important;
    right: 24px !important;
    top: 24px !important;
    width: 32px !important;
  }

  .mz-account-popover__field {
    margin-bottom: 12px !important;
  }

  .mz-account-popover__field input.input-text,
  .mz-account-popover__field input[type=email],
  .mz-account-popover__field input[type=text],
  .mz-account-popover__field input[type=password] {
    border-radius: 12px !important;
    font-size: 14px !important;
    height: 48px !important;
    line-height: 20px !important;
    padding: 12px !important;
  }

  .mz-account-popover__error {
    font-size: 12px !important;
    line-height: 15px !important;
    margin-top: 4px !important;
  }

  .mz-account-popover__row {
    gap: 12px !important;
    margin: 0 0 20px !important;
    min-height: 28px !important;
  }

  .mz-account-popover__checkbox {
    gap: 4px !important;
  }

  .mz-account-popover__checkbox,
  .mz-account-popover__link,
  .mz-account-popover__switch,
  .mz-account-popover__switch button {
    font-size: 16px !important;
    line-height: 18px !important;
  }

  .mz-account-popover__checkbox span {
    font-size: 14px !important;
    line-height: 16px !important;
  }

  .mz-account-popover__checkbox input[type=checkbox] {
    height: 20px !important;
    width: 20px !important;
  }

  .mz-account-popover__submit-row {
    margin: 0 0 20px !important;
  }

  .mz-account-popover__primary.button,
  button.mz-account-popover__primary,
  .woocommerce-button.mz-account-popover__primary,
  .woocommerce-Button.mz-account-popover__primary {
    border-radius: 40px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    height: 48px !important;
    line-height: 18px !important;
  }

  .mz-account-popover__switch {
    margin-top: 20px !important;
  }
}

@media (max-width: 1024px) {
  .woocommerce-account .mz-auth-page--login,
  .woocommerce-account .mz-auth-page--lost-password,
  .woocommerce-account .mz-auth-page--reset-password {
    align-items: stretch !important;
    background: #ffffff !important;
    display: flex !important;
    justify-content: center !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding: 0 !important;
  }

  .woocommerce-account .mz-auth-page--login .mz-auth-panel,
  .woocommerce-account .mz-auth-page--lost-password .mz-auth-panel,
  .woocommerce-account .mz-auth-page--reset-password .mz-auth-panel {
    max-width: 390px !important;
    width: 100% !important;
  }

  .woocommerce-account .mz-auth-card--login,
  .woocommerce-account .mz-auth-card--lost-password,
  .woocommerce-account .mz-auth-card--reset-password {
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding: 24px !important;
    width: 100% !important;
  }

  .woocommerce-account .mz-auth-title {
    font-size: 28px !important;
    line-height: 32px !important;
    margin: 0 48px 20px 0 !important;
  }

  .woocommerce-account .mz-auth-close {
    font-size: 24px !important;
    height: 32px !important;
    right: 24px !important;
    top: 24px !important;
    width: 32px !important;
  }

  .woocommerce-account .mz-auth-field {
    margin-bottom: 12px !important;
  }

  .woocommerce-account .mz-auth-field input.input-text,
  .woocommerce-account .mz-auth-field input[type=email],
  .woocommerce-account .mz-auth-field input[type=text],
  .woocommerce-account .mz-auth-field input[type=password] {
    border-radius: 12px !important;
    font-size: 14px !important;
    height: 48px !important;
    line-height: 20px !important;
    padding: 12px !important;
  }

  .woocommerce-account .mz-field-error {
    font-size: 12px !important;
    line-height: 15px !important;
    margin-top: 4px !important;
  }

  .woocommerce-account .mz-auth-row--options {
    gap: 12px !important;
    margin: 0 0 20px !important;
    min-height: 28px !important;
  }

  .woocommerce-account .mz-auth-checkbox {
    gap: 4px !important;
  }

  .woocommerce-account .mz-auth-checkbox,
  .woocommerce-account .mz-auth-link,
  .woocommerce-account .mz-auth-switch,
  .woocommerce-account .mz-auth-switch a,
  .woocommerce-account .mz-auth-social-title {
    font-size: 16px !important;
    line-height: 18px !important;
  }

  .woocommerce-account .mz-auth-checkbox span {
    font-size: 14px !important;
    line-height: 16px !important;
  }

  .woocommerce-account .mz-auth-checkbox input[type=checkbox] {
    height: 20px !important;
    width: 20px !important;
  }

  .woocommerce-account .mz-auth-submit-row {
    margin: 0 0 20px !important;
  }

  .woocommerce-account .mz-auth-primary.button,
  .woocommerce-account button.mz-auth-primary,
  .woocommerce-account .woocommerce-button.mz-auth-primary,
  .woocommerce-account .woocommerce-Button.mz-auth-primary {
    border-radius: 40px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    height: 48px !important;
    line-height: 18px !important;
  }

  .woocommerce-account .mz-auth-social {
    gap: 8px !important;
  }

  .woocommerce-account .mz-social-btn {
    border-radius: 12px !important;
    font-size: 16px !important;
    height: 44px !important;
    line-height: 18px !important;
  }

  .woocommerce-account .mz-social-icon {
    font-size: 16px !important;
    height: 20px !important;
    left: 16px !important;
    width: 20px !important;
  }

  .woocommerce-account .mz-social-icon--facebook {
    font-size: 24px !important;
  }

  .woocommerce-account .mz-social-icon--line {
    font-size: 7px !important;
  }

  .woocommerce-account .mz-auth-switch {
    margin-top: 20px !important;
  }
}
