/*!
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

.form-wrapper {
  display: flex;
  .col {
    width: 50%;

    .control-group {
      position: relative;

      .label {
        width: 40%;
        padding-left: 10px;
      }

      .control {
        width: 60%;
      }
    }
    span {
      &.error {
        position: absolute;
        right: 0;
        top: 36px;
        padding-left: 10px;
      }
    }

    .alias-name {
      .danger-color {
        right: auto;
      }
    }
  }

  &.compress {
    flex-direction: column;

    .col {
      width: 100%;
    }
  }
}
.checkbox-group {
  text-align: left;

  input[type="checkbox"] {
    margin-left: 10px;
    margin-right: 5px;
    margin-bottom: 4px;
    vertical-align: middle;
  }

  .spot-details,
  .preemptible-details,
  .config-details {
    height: 0;
    opacity: 0;
    visibility: hidden;
    text-align: left;

    &.show {
      height: 60px;
      visibility: visible;
      opacity: 1;
    }
  }

  &.preemptible {
    height: 50px;

    .label {
      height: 36px;
      padding-bottom: 14px;
    }

    .control {
      position: relative;
    }
  }

  .align {
    margin-left: 25px;
  }

  .spot-details,
  .preemptible-details {
    position: relative;

    .error {
      bottom: 0;
    }

    &.show {
      height: 50px;
      text-align: right;
    }
  }

  .config-details {
    &.show {
      position: relative;
      height: 240px;
      padding-top: 10px;
      text-align: right;

      textarea {
        height: 100%;
        background: #f8f8f8 !important;
        resize: none;
        font-size: 14px;
        line-height: 1.5;
        font-family: Consolas, monospace;
      }
    }
  }

  & > label {
    padding-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
  }

  span {
    &.error {
      position: absolute;
      bottom: -20px;
      right: 0;
    }
  }

  &.control-group {
    padding: 0;

    span.info {
      display: inline-block;
      padding-top: 5px;
      padding-bottom: 10px;
      color: #35afd5;
      font-size: 13px;
      text-align: justify;
    }

    span {
      &.error {
        position: absolute;
        bottom: -15px;
        right: 0;
      }
    }
    
    .label {
      width: 20%;
    }

    .control {
      width: 80%;
    }
  }

  .config-link {
    font-size: 13px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
}
