.panel {
  background: $primary-dark;
  background-size: 245px;
  width: 100%;
  height: 256px;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 0;
  p.error,
  p.info,
  p.warning {
    width: 600px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }
  h1 {
    color: $white;
    width: 100%;
    position: relative;
    margin: 40px auto;
    font-size: 40px;
    line-height: 1em;
    text-align: center;
  }
  label {
    display: block;
    width: auto;
    margin-bottom: 5px;
  }
  form:not(.nostyle) {
    margin-left: auto;
    margin-right: auto;
    max-width: 1000px;
    background: $white;
    border-radius: 3px;
    padding: 30px;
    box-sizing: border-box;
    @include material-card(5px, 18px);
  }
  .content {
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
    width: calc(100% - 60px);
    background: $white;
    border-radius: 3px;
    padding: 30px;
    box-sizing: border-box;
    @include material-card(5px, 18px);
  }
  &.browser-container {
    > h1 {
      color: $primary-dark;
    }
  }
  .browser {
    margin-left: auto;
    margin-right: auto;
    width: 600px;
    background: $white;
    border-radius: 3px;
    padding: 10px 30px;
    box-sizing: border-box;
    box-shadow: 0 5px 18px $shadow;
    border-radius: 2px;
    h1 {
      color: $primary-dark;
    }
    .update {
      img {
        height: 50px;
        width: 50px;
      }
    }
    .download {
      img {
        height: 30px;
        width: 30px;
      }
    }
  }
  button.flat-button,
  input[type="submit"].flat-button {
    background: $white;
  }
  &.activation {
    input[type="email"],
    input[type="tel"] {
      width: 100%;
      float: none;
    }
  }
  input.ng-invalid.ng-dirty {
    border-bottom: 2px solid $red;
  }
  input[type="checkbox"].ng-invalid.ng-dirty {
    box-shadow: 0 0 10px $red;
  }
  .button-bar {
    margin-top: 30px;
    padding-top: 20px;
    > * {
      display: inline-block;
      vertical-align: middle;
    }
  }
  input-password {
    input[type="password"],
    input[type="text"] {
      width: calc(100% - 50px);
      margin: 0;
      height: 32px;
      display: inline-block;
      float: none;
    }
  }
  input[type="text"].large-input {
    width: 90%;
    margin: 0;
    height: 32px;
    display: inline-block;
    float: none;
  }
  &.activation {
    form {
      margin: auto !important;
    }
  }
  &.login,
  &.activation {
    .panels-container {
      overflow: hidden;
      width: 90%;
      min-height: 500px;
      margin: auto;
      display: flex;
      justify-content: center;
      align-items: flex-start;
    }
    .welcome-text {
      display: block;
      max-width: 520px;
      float: left;
      background-color: $white;
      box-shadow: 0 5px 18px $shadow;
      border-radius: 2px;
      padding: 30px;
      box-sizing: border-box;
      h1 {
        margin: 0;
        margin-bottom: 20px;
        color: $primary;
        display: block;
      }
      h2 {
        margin-bottom: 20px;
      }
      p {
        font-size: 13px;
      }
    }
    form {
      a {
        margin-top: 10px;
        font-size: 22px;
        &.forgot-link {
          font-size: 18px;
          margin: 0;
        }
      }
    }
    .welcome-text + form {
      width: auto;
      overflow: hidden;
    }
    .welcome-text,
    form {
      margin: 15px;
      min-width: 40%;
      min-height: 345px;
    }
    input#email {
      width: 100%;
      height: 32px;
      margin-top: 5px;
      margin-bottom: 0;
      float: none;
    }
    input[type="checkbox"]#rememberMe {
      width: 11px;
    }
  }
  form.nostyle {
    overflow: hidden;
    input {
      width: auto;
    }
  }
  form.rowstyle {
    margin-top: 5px;
    input {
      height: 35px;
    }
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"] {
      width: 80%;
      float: left;
    }
  }
  form[name="resetForm"] p:last-of-type {
    overflow: hidden;
    margin-bottom: 0;
  }
  &.activation form {
    width: calc(100% - 60px);
  }
}

@media screen and (max-width: $tablette) {
  body {
    .login.panel {
      box-sizing: border-box;
      h1 {
        display: none;
      }
      h1 + form {
        margin-top: 70px;
      }
      .panels-container {
        display: block;
        margin-top: 70px;
      }
      .welcome-text,
      .welcome-text + form,
      form {
        min-width: 0;
        width: 90%;
        margin-left: auto;
        margin-right: auto;
        clear: both;
        float: none;
      }
    }
    .panel {
      background-size: 200px;
      h1 {
        margin: 65px auto 30px;
        font-size: 26px;
      }
      input-password {
        button {
          padding: 5px 0;
          &::before {
            position: relative;
            line-height: 23px;
            font-size: 16px;
            left: 0;
          }
        }
      }
    }
  }
}

@media screen and (max-width: $small-mobile) {
  .panel form:not(.nostyle) {
    padding: 15px;
  }
}
