/*! Icinga Web 2 | (c) 2013 Icinga Development Team | GPLv2+ */

// Login page styles

#login {

  height: 100%;
  background-color: @icinga-blue;
  background-repeat:  no-repeat;
  background-position: center center;
  background-image: url(../img/icingaweb2-background.jpg);
  // fallback ie 9
  background-size: 100% 100%;
  background-size: cover;

  .login-wrapper {
    height: 100%;
    max-width: 85em;
    padding: 0 1em;
    margin: 0 auto;
    z-index: 2;
    position: relative
  }

  .login-form {
    position: relative;
    background: white;
    min-width: 288px;
    height: 100%;
    width: 33%;
    box-shadow: 0 0 4em 1em rgba(0, 0, 0, 0.2);
  }

  .logo-wrapper {
    position: absolute;
    top: 1em; right: 1em; left: 1em;
  }

  #icinga-logo {
    width: 100%;
    max-width: 18em;
    height: auto;
    margin: 0 auto;

    &:after {
      content: "";
      display: block;
      width: 100%;
      padding-bottom: 35%;
    }
  }

  .control-label {
    font-size: 1em;
    line-height: @line-height;
  }

  .control-group .errors {
    background-color: @color-critical;
    font-size: @font-size-small;
    margin: 2em 0 0 0;

    > li {
      padding: 1em;
      color: @body-bg-color;
    }
  }

  .control-group {
    margin: 0 auto; // Center horizontally
    width: 24em;
  }

  .control-label-group {
    display: block;
    padding: 0;
    text-align: left;
    width: 100%;
  }

  input[type=password],
  input[type=text] {
    border: solid 1px @gray-light;
    display: block;
    height: 2.5em;
    margin: 0;
    transition: none;
    width: 100%;

    &:focus {
      .rounded-corners(3px);
      border-radius: 0;
      padding-bottom: 3px;
    }
  }

  input:focus,
  input[type="submit"]:focus {
    outline: 3px solid fade(@icinga-blue, 50%);
  }

  .form-controls {
    margin-bottom: 2em;
    margin-top: 2em;
  }

  input[type=submit] {
    border-radius: .25em;
    background: @icinga-secondary;
    color: white;
    border: none;
    height: 2.5em;
    margin: 0;
    width: 100%;

    &:hover {
      background-color: darken(@icinga-secondary, 10)
    }
  }

  .config-note {
    background-color: @color-critical;
    margin: 0 auto 2em auto; // Center horizontally w/ bottom margin
    max-width: 50%;
    min-width: 24em;
    padding: 1em;

    a {
      color: @text-color-inverted;
      font-weight: bold;
    }
  }
}

#social {
  position: fixed;
  right: 1em; bottom: 1em;
  letter-spacing: -.417em;
  margin: 0;

  > * {
    letter-spacing: normal;
  }

  > li {
    display: inline-block;

    a {
      display: block;
      text-decoration: none;
      -webkit-transform: scale(1, 1);
         -moz-transform: scale(1, 1);
          -ms-transform: scale(1, 1);
              transform: scale(1, 1);
    }

    i {
      font-size: 3em;
      color: white;
      text-shadow: 0 0 .5em #01507B;
    }
  }

  > li a:hover {
    -webkit-transform: scale(1.2, 1.2);
       -moz-transform: scale(1.2, 1.2);
        -ms-transform: scale(1.2, 1.2);
            transform: scale(1.2, 1.2);
  }

  li:not(:last-child) {
    margin-right: 2em;
  }
}

#login-footer {
  position: absolute;
  right: 2em; bottom: .25em; left: 2em;
  border-top: 1px solid @gray-light;
  padding: .5em;
  font-size: @font-size-small;

  &:after {
    content: "";
    display: block;
    clear: both;
  }

  p {
    float: left;
    margin-bottom: 0;
  }

  a {
    float: right;
    font-weight: @font-weight-bold;
    color: @icinga-blue;

    &:hover {
      text-decoration: none;
      color: darken(@icinga-blue, 10);
    }
  }
}
