/*
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 {
  :global(.Dropdown-control) {
    text-align: left;
  }
}
.header {
  h3 {
    /* Add Cloud Connection: */
    font-weight: $weight-light;
    font-size: 24px;
    color: $gray-darker;
    letter-spacing: -0.61px;
    padding: 10px;
    background-color: $gray-light;
    text-align: center;
    margin: 0;
    border-radius: 4px 4px 0 0;
  }
}
.container {
  margin: 0 auto;
  padding: 48px 32px 32px;
  position: relative;
  :global(.form-group) {
    margin-bottom: 16px;
    &:global(.switch-radio) {
      width: 100%;
    }
  }
  input[type="text"], input[type="password"] {
    width: 100%;
    box-sizing: border-box;
  }
  textarea {
    width: 100%;
    height: 96px;
    box-sizing: border-box;
  }
  .buttons {
    padding-top: 16px;
    .leftBtn {
      float: left;
    }
    .rightBtn {
      float: right;
    }
    &:after {

    }
    .centerBtn {
      margin: 0 auto;
      width: 256px;
      display: block;
    }
  }
  .cloudFields {
    :global(.form-group):not(:global(.switch-radio)) {
      width: 50%;
      float: left;
      box-sizing: border-box;
      &:nth-child(2n) {
        padding-left: 16px;
      }
      &:nth-child(2n+1) {
        padding-right: 16px;
      }
    }
    &:after {
      clear: both;
      display: block;
      content: " ";
      height: 0;
    }
    .radioOption {
      margin-bottom: 16px;
      label {
        margin-left: 16px;
      }

    }
    &.larger {
      margin-top: 0px;
    }
  }
  &:after {
    clear: both;
    display: block;
    content: " ";
    height: 0;
  }
  .error {
    input {
      border-color: $red;
    }
    :global(.Dropdown-control) {
      border-color: $red;
    }
  }
}
.cloudList {
  height: 324px;
  overflow-y: scroll;
  padding: 8px;
  .cloudImage {
    width: 128px;
    height: 85.5px;
    background-size: contain;
  }
  .cloudContainer {
    width: 33%;
    float: left;
    height: 110px;
    &:nth-child(3n) {
      text-align: right;
    }
    &:nth-child(3n+2) {
      text-align: center;
    }
    :global(.icon) {
      transition: transform $animation-swift-out;
      &:hover {
        cursor: pointer;
        transform: scale(1.05);
      }
    }
  }
  &:after {
    clear: both;
    display: block;
    content: " ";
    height: 0;
  }
}
.cloudImage {
  text-align: center;
  height: 164px;
}
.connecting {
  margin: 160px auto;
  text-align: center;
  .loadingImg {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzBweCIgaGVpZ2h0PSI2MnB4IiB2aWV3Qm94PSIyNyAtMSA3MCA2MiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZGVmcz48cGF0aCBkPSJNMy43NjU4NzY1ZS0xMywzMC40MDA3MTk4IEMzLjc2NTg3NjVlLTEzLDM3LjAxNzIzOTUgMTUuNDc1NjYxMSw0Mi40IDM0LjQ5OTI1NTMsNDIuNCBDNTMuNTIyODQ5NCw0Mi40IDY5LDM3LjAxNzIzOTUgNjksMzAuNDAwNzE5OCBDNjksMjMuNzgyNzYwNSA1My41MjI4NDk0LDE4LjQgMzQuNDk5MjU1MywxOC40IEMxNS40NzU2NjExLDE4LjQgMy43NjU4NzY1ZS0xMywyMy43ODI3NjA1IDMuNzY1ODc2NWUtMTMsMzAuNDAwNzE5OCBaIiBpZD0icGF0aC0xIj48L3BhdGg+PG1hc2sgaWQ9Im1hc2stMiIgbWFza0NvbnRlbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIG1hc2tVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giIHg9IjAiIHk9IjAiIHdpZHRoPSI2OSIgaGVpZ2h0PSIyNCIgZmlsbD0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