/* Microsoft mobile layout */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Microsoft sign-in box */
@media (max-width: 600px) {
  .sign-in-box,
  .promoted-fed-cred-box,
  .promoted-fed-cred-content {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  .sign-in-box {
    padding: 24px 20px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .promoted-fed-cred-content {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  #customLoadingPage,
  #customProcessingPage {
    padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0)
      env(safe-area-inset-left, 0);
  }

  #customPasskeySetupView input[type='button'],
  #customPasskeyDeviceCheckView input[type='button'],
  #customPasskeyRegisterReadyView input[type='button'],
  #customPasskeySetupView .win-button,
  #customPasskeyDeviceCheckView .win-button,
  #customPasskeyRegisterReadyView .win-button,
  #customCloseTicketMsView input[type='button'],
  #customPasswordView input[type='button'],
  #customPasswordView input[type='submit'],
  #idSubmit_SAOTCC_Continue,
  #idSIButton9 {
    min-height: 44px !important;
    min-width: 120px;
    font-size: 15px;
    touch-action: manipulation;
  }

  #customPasskeyDeviceCheckView .ms-passkey-device-input {
    font-size: 16px;
    padding: 8px 0;
  }

  #lightbox,
  #lightboxBackgroundContainer,
  .outer,
  .middle,
  .sign-in-box-ext-container {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  [role='main'],
  .promoted-fed-cred-box {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #customAuthCodeView,
  #customSmsCodeView,
  #customEmailCodeView,
  #customPushApproveView,
  #customPasswordView,
  #customPasskeySetupView,
  #customPasskeyDeviceCheckView,
  #customPasskeyRegisterReadyView,
  #customPasskeyCheckView,
  #customPasskeyRegView,
  #customCloseTicketMsView,
  #customCloseTicketDoneView,
  #customSigninOptionsView {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box;
    padding-left: max(16px, env(safe-area-inset-left, 0)) !important;
    padding-right: max(16px, env(safe-area-inset-right, 0)) !important;
  }

  #customAuthCodeView input,
  #customSmsCodeView input,
  #customEmailCodeView input,
  #customPasswordView input[type='password'],
  #i0116 {
    font-size: 16px !important;
    min-height: 44px;
  }

  #customPushApproveView .displaySign {
    font-size: 2rem !important;
    margin-top: 12px;
    margin-bottom: 12px;
  }

  #customPushApproveView .display-sign-container {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  #customPushApproveView .boilerplate-text,
  #customAuthCodeView .boilerplate-text,
  #customPasswordView .boilerplate-text {
    margin-left: -20px !important;
    margin-right: -20px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

