// 888                   d8b
// 888                   Y8P
// 888
// 888  .d88b.   .d88b.  888 88888b.
// 888 d88""88b d88P"88b 888 888 "88b
// 888 888  888 888  888 888 888  888
// 888 Y88..88P Y88b 888 888 888  888
// 888  "Y88P"   "Y88888 888 888  888
//                   888
//              Y8b d88P
//               "Y88P"

.login-error input {
  border-color: $color-state-error-border;
}

.login-form {
  background-color: color(grey, 95);
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: auto;
  margin: 0 auto;
  max-width: 400px;
  width: 100%;

  @include breakpoint(l) {
    grid-gap: $grid-gap-row $grid-gap-col;
    grid-template-columns: 10rem repeat(3, 1fr);
    max-width: 100%;
  }

  @include breakpoint(l) {
    max-width: 1200px;
  }

  &.login-error,
  &.login-message,
  &.login-success,
  &.login-warning {
    > div {
      @include breakpoint(l) {
        padding: 0 0 $space-m;
      }

      &:last-child {
        @include breakpoint(l) {
          padding: 0 $space-m $space-m 0;
        }
      }
    }

    .login-error-message {
      @include breakpoint(l) {
        grid-column-start: 2;
        grid-column-end: 5;
      }
    }

    .login-icon-wrapper {
      @include breakpoint(m) {
        grid-row-start: 1;
        grid-row-end: 3;
        justify-self: stretch;
        padding: 0;
      }
    }
  }

  > div {
    padding: 0 $space-m;

    @include breakpoint(l) {
      padding: $space-m 0;
    }

    &:last-child {
      @include breakpoint(l) {
        padding: $space-m $space-m $space-m 0;
      }
    }

    &.panel {
      @include breakpoint(l) {
        padding: $space-m;
      }
    }
  }

  input {
    display: block;
    width: 100%;
  }

  button {
    font-size: $font-size-m;
    height: $line-height-form;
    margin: $space-m 0;
    text-transform: uppercase;
    width: 100%;
  }

  .login-icon {
    display: block;

    @include breakpoint(l) {
      height: 6rem;
      width: 6rem;
    }
  }

  .login-icon-wrapper {
    align-items: center;
    background-color: color(grey, 70);
    color: color(white);
    display: grid;
    justify-items: center;
    padding: $space-m;
  }

  .panel {
    border-style: solid;
    border-width: 1px;
    margin: $space-m $space-m 0;

    &.margin-bottom {
      margin-bottom: $space-m;
    }

    @include breakpoint(l) {
      grid-column-start: 2;
      grid-column-end: 5;
      margin: $space-m $space-m 0 0;
    }
  }
}

.login-form-label {
  align-self: center;
}

.login-form-password {
  h2 {
    line-height: $line-height-base;
    margin: $space-m 0 0;
    text-align: center;

    @include breakpoint(l) {
      margin-top: 0;
      text-align: right;
    }
  }

  label {
    align-self: center;
  }
}

.login-form-reset {
  margin: 0 auto $space-l;
}

.login-links {
  align-self: center;

  @include breakpoint(l) {
    font-size: $font-size-s;
  }

  ul {
    padding-left: 0;
    text-align: center;

    @include breakpoint(l) {
      text-align: left;
    }
  }

  li {
    display: inline-block;
    line-height: 1;
    list-style: none;
    padding: 0 $space-s;
    white-space: nowrap;

    @include breakpoint(l) {
      display: block;
      padding: 0;
    }
  }
}

.login-password-strength {
  font-size: $font-size-s;

  h2 {
    font-size: $font-size-m;
  }
}

.password-header {
  text-align: center;

  @include breakpoint(l) {
    text-align: left;
  }
}

.site-login {
  display: flex;
  flex-direction: column;

  > main {
    flex: 1;
    padding: $space-m;
  }

  h2 {
    color: color(cyan, 30);
    font-weight: $font-weight-bold;
  }
}
