.nologin {
  #page-wrapper {
    background: none;
  }

  // layout
  #wrapper {
    height: 100vh;

    #page-wrapper {
      display: flex;
      align-items: center;
      height: 100vh;
      margin-top: 0px;

      .main {
        width: 100vw;

        > .row {
          margin-right: 20px;
          margin-left: 20px;
        }

        .login-header {
          display: flex;
          flex-direction: column;
          align-items: center;
          padding-top: 30px;
          padding-bottom: 10px;
        }

        .login-form-errors {
          width: 100%;

          .alert {
            padding: 5px;
            margin-top: 10px;
            margin-bottom: 0;

            ul {
              padding-left: 1.5em;
            }
          }
        }
      }

      // .main
    }

    // #page-wrapper
  }

  // #wrapper

  // styles
  .login-header {
    h1 {
      font-size: 22px;
      line-height: 1em;
    }
  }

  .dropdown-with-icon {
    .dropdown-toggle {
      @extend .form-control;
    }
    i {
      @extend .input-group-text;
      margin-right: -1px;
    }
  }

  .input-group {
    margin-bottom: 10px;

    .input-group-text {
      text-align: center;
      border: none;
      border-radius: 0;
    }
  }

  .input-group:not(.has-error) {
    .form-control {
      border: transparent;
    }
  }

  .collapse-external-auth {
    overflow: hidden;
  }

  $btn-fill-colors: (
    'login': (
      rgba($danger, 0.4),
      rgba(#7e4153, 0.7),
    ),
    'register': (
      rgba($success, 0.4),
      rgba(#3f7263, 0.7),
    ),
    'google': (
      rgba(#24292e, 0.4),
      $gray-700,
    ),
    'github': (
      rgba(lighten(black, 20%), 0.4),
      $gray-700,
    ),
    'facebook': (
      rgba(#29487d, 0.4),
      $gray-700,
    ),
    'twitter': (
      rgba(#1da1f2, 0.4),
      $gray-700,
    ),
    'oidc': (
      rgba(#24292e, 0.4),
      $gray-700,
    ),
    'saml': (
      rgba(#55a79a, 0.4),
      $gray-700,
    ),
    'basic': (
      rgba(#24292e, 0.4),
      $gray-700,
    ),
  );

  @each $label, $colors in $btn-fill-colors {
    .btn-fill##{$label} {
      .btn-label {
        background-color: nth($colors, 1);
      }
      .eff {
        background-color: nth($colors, 2);
      }
    }
  }

  // footer link text
  .link-growi-org {
    font-size: smaller;
    font-weight: bold;

    &,
    .growi,
    .org {
      transition: color 0.8s;
    }
  }

  .link-switch {
    color: $gray-200;

    &:hover {
      color: white;
    }
  }
}

.login-page {
  // layout
  .main .row .login-header,
  .login-dialog {
    width: 320px;
  }

  .link-growi-org {
    position: absolute;
    bottom: 9px;
    z-index: 3;
  }

  // To adjust the behavior, this problem is not solved.
  // See https://github.com/AaronCCWong/react-card-flip/issues/56
  .react-card-front,
  .react-card-back {
    height: 0% !important;
  }
}

.invited,
.nologin.error {
  .main .row {
    @media (min-width: 510px) {
      .offset-sm-4 {
        margin-left: calc(50% - 240px);
      }

      .col-sm-4 {
        width: 480px;
      }
    }
  }
}

.login-header,
.login-dialog {
  max-width: 480px;
}

.nologin.error {
  .alert h2 {
    line-height: 1em;
  }
}
