/*
Copyright (C) 2017  Cloudbase Solutions SRL

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

@import '../variables.scss';

.root {
  height: 100%;
  background-image: url('../../public/images/star-bg.jpg');
  background-position: center center;
  position: relative;
  .coriolisText {
    width: 208px;
    height: 40px;
    margin: 24px auto 0;
    svg {
      width: 100%;
      height: 100%;
    }
  }
  .footerLogo {
    .text {
      opacity: 0.72;
      font-size: 9px;
      color: #FFFFFF;
      margin-bottom: 12px;
    }
    .coriolisLogo {

    }
    position: absolute;
    bottom: 40px;
    left: 50%;
    margin-left: -64px;
    width: 132px;
  }
}
.loginContainer {
  margin: 64px auto 0;
  padding: 32px 32px 16px;
  background-color: rgba(221, 224, 229, 0.5);
  box-sizing: border-box;
  border-radius: 8px;
  &:after {
    content: "";
    display: table;
    clear: both;
  }
  input, button {
    width: 100%;
  }
}
.loginSocialButtons, .loginUsername {
  &:after {
    clear: both;
    display: block;
    content: " ";
    height: 0;
  }
}
.loginSeparator {
  position: relative;
  margin: 8px 0 24px;
  opacity: 0.5;
  .line {
    border-top: 1px solid #FFF;
    height: 1px;
    width: 124px;
    position: absolute;
    top: 10px;
    left: 0px;
    &:nth-child(3) {
      left: auto;
      right: 0px;
    }
  }
  .text {
    font-size: 12px;
    color: #FFF;
  }
}
.loginBtn {
  float: left;
  display: block;
  width: 192px;
  height: 32px;
  padding-left: 32px;
  text-align: left;
  box-sizing: border-box;
  border-radius: $border-radius;
  border: 1px solid transparent;
  line-height: 32px;
  text-decoration: none;
  position: relative;
  &:nth-child(2n) {
    float: right;
  }
  &:nth-child(3), &:nth-child(4) {
    margin-top: 16px;
  }
  .icon {
    position: absolute;
    top: 6px;
    left: 7px;
  }
  &:global(.google) {
    background-color: #FFF;
    border: 1px solid $grayish;
    color: #616870;
    .icon {
      background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMThweCIgaGVpZ2h0PSIxOHB4IiB2aWV3Qm94PSIwIDAgMTggMTgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+DQogICAgPGcgaWQ9IlN5bWJvbHMiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPg0KICAgICAgICA8ZyBpZD0ic3VwZXItZyI+DQogICAgICAgICAgICA8cGF0aCBkPSJNOSwzLjQ4IEMxMC42OSwzLjQ4IDExLjgzLDQuMjEgMTIuNDgsNC44MiBMMTUuMDIsMi4zNCBDMTMuNDYsMC44OSAxMS40MywwIDksMCBDNS40OCwwIDIuNDQsMi4wMiAwLjk2LDQuOTYgTDMuODcsNy4yMiBDNC42LDUuMDUgNi42MiwzLjQ4IDksMy40OCBMOSwzLjQ4IFoiIGlkPSJTaGFwZSIgZmlsbD0iI0VBNDMzNSI+PC9wYXRoPg0KICAgICAgICAgICAgPHBhdGggZD0iTTE3LjY0LDkuMiBDMTcuNjQsOC40NiAxNy41OCw3LjkyIDE3LjQ1LDcuMzYgTDksNy4zNiBMOSwxMC43IEwxMy45NiwxMC43IEMxMy44NiwxMS41MyAxMy4zMiwxMi43OCAxMi4xMiwxMy42MiBMMTQuOTYsMTUuODIgQzE2LjY2LDE0LjI1IDE3LjY0LDExLjk0IDE3LjY0LDkuMiBMMTcuNjQsOS4yIFoiIGlkPSJTaGFwZSIgZmlsbD0iIzQyODVGNCI+PC9wYXRoPg0KICAgICAgICAgICAgPHBhdGggZD0iTTMuODgsMTAuNzggQzMuNjksMTAuMjIgMy41OCw5LjYyIDMuNTgsOSBDMy41OCw4LjM4IDMuNjksNy43OCAzLjg3LDcuMjIgTDAuOTYsNC45NiBDMC4zNSw2LjE4IDAsNy41NSAwLDkgQzAsMTAuNDUgMC4zNSwxMS44MiAwLjk2LDEzLjA0IEwzLjg4LDEwLjc4IEwzLjg4LDEwLjc4IFoiIGlkPSJTaGFwZSIgZmlsbD0iI0ZCQkMwNSI+PC9wYXRoPg0KICAgICAgICAgICAgPHBhdGggZD0iTTksMTggQzExLjQzLDE4IDEzLjQ3LDE3LjIgMTQuOTYsMTUuODIgTDEyLjEyLDEzLjYyIEMxMS4zNiwxNC4xNSAxMC4zNCwxNC41MiA5LDE0LjUyIEM2LjYyLDE0LjUyIDQuNiwxMi45NSAzLjg4LDEwLjc4IEwwLjk3LDEzLjA0IEMyLjQ1LDE1Ljk4IDUuNDgsMTggOSwxOCBMOSwxOCBaIiBpZD0iU2hhcGUiIGZpbGw9IiMzNEE4NTMiPjwvcGF0aD4NCiAgICAgICAgICAgIDxwb2x5Z29uIGlkPSJTaGFwZSIgcG9pbnRzPSIwIDAgMTggMCAxOCAxOCAwIDE4Ij48L3BvbHlnb24+DQogICAgICAgIDwvZz4NCiAgICA8L2c+DQo8L3N2Zz4=');
      width: 18px;
      height: 18px;
    }
  }
}
.forgotPassText {
  line-height: 32px;
  color: #FFF;
  text-decoration: none;
}
.container {
  margin: 0 auto;
  padding: 8vh 0 40px;
  width: 464px;
  text-align: center;
  .logo {
    .large {
      display: block;
    }
    .small {
      display: none;
    }
  }
  :global {
    .form-group {
      margin-bottom: 16px;
      width: 50%;
      float: left;
      box-sizing: border-box;
      &:nth-child(2n) {
        padding-left: 8px;
      }
      &:nth-child(2n+1) {
        padding-right: 8px;
      }
      label {
        text-align: left;
        text-transform: uppercase;
        font-size: 9px;
        font-weight: 500;
        color: #FFF;
        display: block;
        margin-bottom: 6px;
      }
    }
  }
  &.oneColumn {
    width: 256px;
    :global {
      .form-group {
        width: 100%;
        padding: 0 !important;
        &:last-child {
          margin-bottom: 0;
        }
      }
    }
    .loginSeparator {
      margin: 16px 0 16px;
      .line {
        width: 16px;
      }
    }
  }
}


@media screen and (max-height: 880px) and (min-height: 760px) {
  .container {
    padding-top: 2vh;
  }
  .loginContainer {
    margin-top: 32px;
  }
  .root .footerLogo {
    bottom: 16px;
  }
  .loginSeparator {
    margin: 8px 0 8px;
  }
}
@media (max-height: 760px) {
  .container {
    padding-top: 10vh;
    .logo {
      .large {
        display: none;
      }
      .small {
        display: block;
        :global(.logo) {
          width: 245px;
          height: 48px;
          margin: 0 auto;
        }
      }
    }
  }
}
@media (max-height: 620px) {
  .root .footerLogo {
    bottom: 16px;
  }
  .loginContainer {
    margin-top: 16px;
  }
}