@media screen and (max-width: 500px) {
  .app-page {
    position: relative !important;
    top: 3.8rem !important;
    padding: 2rem !important;
    width: 100% !important;
    min-height: 100vh !important;
    text-align: center !important;
    background: var(--mobile-bg-color) !important;
    border: none !important;
    box-shadow: none !important;
    border-top: 1px solid var(--border-color) !important;
  }

  #totp-container-card {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  .app-login body {
    background-color: var(--mobile-bg-color) !important;
    background-image: none !important;
  }

  .via-logo {
    position: absolute !important;
    top: 1.8rem !important;
    left: 4.1rem !important;
    transform: translate(-2.8rem, -.5rem) !important;

    img {
      width: 70px !important;
    }
  }

  #tnc-login {
    position: relative !important;
    bottom: 3rem;
  }

  #tnc-login p {
    font-size: var(--font-base-mobile) !important;
    display: flex;
    flex-direction: column;
    line-height: .8rem;
  }

  .totp-input-group {
    flex-direction: column !important;
    gap: 1.5rem;
    margin-top: -.7rem;
  }


  /* Form Styles */
  #kc-totp-settings-form {
    margin-top: 1rem;
  }

  p.totp-instruction {
    font-size: .9rem;
    margin-bottom: 5px;
  }

  .totp-input-label {
    font-size: .9rem;
  }

  .totp-field-wrapper {
    margin-bottom: -.3rem;
  }

  .totp-field-wrapper-login {
    margin-bottom: -.3rem;
  }

  #kc-registration {
    bottom: 12.9rem;
  }

  .custom-modal-download-title {
    font-size: var(--font-title-mobile);
  }

  .totp-main-title {
    font-size: var(--font-title-mobile);
    margin-top: -1.3rem;
    margin-bottom: 0;
  }

  .totp-details-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: column;
    grid-template-rows: auto auto;
    gap: 5px 0.9rem;
    list-style: none;
    padding: 0;
    margin: 1rem auto;
    width: fit-content;
  }

  .totp-details-list span {
    display: none;
  }

  .totp-details-list li {
    padding: 0.25rem 0;
    text-align: center;
    font-size: 14px;
  }

  #kc-totp-settings-form {
    margin-top: 1px;
  }

  .totp-header-section {
    margin-top: 2.7rem;
  }

  .title-header-wrapper {
    margin: 0 auto;
  }

  .qr-code-loading {
    max-width: 300px;
    max-height: 300px;
  }

  .qr-code-loading::after {
    content: "";
    position: absolute;
    top: -5rem;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translate(-50%, -50%);
    background-image: linear-gradient(90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0));
    animation: shimmer 1000ms infinite;
  }

  .instruction {
    padding-top: 2.3rem;
  }

  #input-error-otp-code {
    margin: 0 auto !important;
    text-align: left;
    padding: .5rem;
  }
}



/* tablet view  */
@media screen and (min-width: 501px) and (max-width: 1024px) {

  .app-login body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    color: var(--base-color);
    margin: 0;
    z-index: 1;
    background-color: var(--background-color);
  }

  .app-login body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/via-bg-dark.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    will-change: transform;
  }

  .custom-modal-overlay {
    overflow: hidden;
  }

  .app-page {
    min-width: 91%;
    min-height: 80vh;
    position: absolute;
    top: 5rem;
  }

  .esotap-subtitle {
    font-size: var(--font-base-desktop);
  }

  .company-logo img {
    width: 100px !important;
  }

  .via-logo {
    position: absolute;
    top: 2rem;
    left: 5.1rem;
    transform: translate(-2.8rem, -.5rem);

    img {
      width: 90px !important;
    }
  }

  #menu-icon {
    right: 2.5rem;
  }

  #kc-form-options span {
    font-size: 1.1rem;
    color: var(--base-color);
  }

  #tnc-register {
    max-width: 70%;
  }

  #tnc-register p {
    font-size: 1.1rem !important;
  }

  #tnc-register a {
    font-size: 1.1rem !important;
  }


  .btn-verify {
    max-width: 330px !important;
  }

  .totp-details-list {
    align-items: center;
    justify-content: center;
  }

  #kc-registration {
    font-size: var(--font-base-mobile);
    color: var(--app-muted-color);
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    bottom: 10rem;
    width: 100%;
    font-size: 1.1rem;
  }

  h1 {
    font-size: var(--font-title-desktop);
    line-height: 34px;
  }

  .menu-popup {
    top: 60px;
    border-radius: 0;
  }

  .totp-field-wrapper input[type="number"] {
    width: 270px;
  }
}


/* desktop view  */
@media screen and (min-width: 1025px) {

  .page-title {
    font-size: 32px;
  }

  .esotap-subtitle {
    font-size: var(--font-base-desktop);
  }


  h1 {
    margin: 2rem auto;
    font-size: var(--font-title-desktop);
    line-height: 34px;
  }

  p {
    font-size: var(--font-base-desktop);
  }

  .app-page {
    top: 0;
    width: 95%;
    max-width: 583px;
  }

  .menu-popup {
    top: 60px;
  }

  .menu-popup a {
    font-size: var(--font-base-desktop);
  }

  #kc-content {
    position: relative;
    min-height: 584px;
  }

  .help-content {
    position: relative;
    min-height: 584px;
  }

  .via-logo {
    position: absolute;
    top: 15px;
    left: 19px;
    transform: translate(0, 0);
  }

  .qr-box {
    margin: 1rem auto 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 425px;
    height: 100%;
    max-height: 425px;
    border: .4rem solid transparent;
    /* The width of the gradient border */
    border-image: linear-gradient(35deg,
        #F18930 0%,
        #F88821 30%,
        #F18930 45%,
        #4CD5FA 70%,
        #50D3F5 100%) 1;
  }

  #kc-registration {
    font-size: var(--font-base-desktop);
    bottom: 13rem;
  }

  .sign-in-btn-outlined {
    font-size: var(--font-caption-desktop);
  }

  .sign-in-btn-outlined-small {
    font-size: var(--font-caption-desktop);
  }

  .sign-out-btn-outlined {
    font-size: var(--font-caption-desktop);
  }

  .sign-in-btn {
    font-size: var(--font-caption-desktop);
  }

  #kc-form-options span {
    font-size: var(--font-base-desktop);
  }

  .instruction {
    font-size: var(--font-base-desktop);
  }

  #kc-logout-confirm>#kc-info-message {
    font-size: var(--font-caption-desktop);
  }

  .text-button {
    font-size: var(--font-base-desktop);
  }

  .menu-popup {
    top: 60px;
    border-radius: 0;
  }

}
