/*******************************************************************************
 * Licensed Materials - Property of IBM
 * (c) Copyright IBM Corporation 2018. All Rights Reserved.
 *
 * Note to U.S. Government Users Restricted Rights:
 * Use, duplication or disclosure restricted by GSA ADP Schedule
 * Contract with IBM Corp.
 *******************************************************************************/
/* Copyright (c) 2020 Red Hat, Inc. */
@import 'node_modules/carbon-components/scss/globals/scss/_colors';
@import 'variables';

.creation-view {
  display: flex;
  position: relative;
  margin-top: -10px;

  &.showEditor {
    margin: -22px 0 -3.125rem 0;
  }

  .creation-view-split-container {
    width: 100%;

    div.SplitPane {
      div.Pane1 {
        position: unset !important;
      }
    }

    .creation-view-controls-container {
      margin-top: 30px;
    }

    &.showEditor {
      height: calc(100vh - 190px);

      .creation-view-controls-container {
        height: calc(100vh - 19rem);
        margin-top: 40px;
      }

      .creation-view-yaml {
        height: calc(100% - 30px);
        position: relative;

        &-header {
          display: flex;
          justify-content: space-between;
          flex-wrap: wrap;
          align-items: center;

          &-title {
            font-weight: bold;
            font-size: 0.875rem;

            .bx--tabs {
              min-height: 16px;

              .bx--tabs__nav-item {
                padding: 0 0 6px 0;
              }
            }
          }

          &-toolbar {
            display: flex;
            align-items: center;
          }
        }

        .yamlEditorContainer {
          width: 100%;
          height: 100%;
          & * {
            font-family: unset;
            font-size: var(--pf-global--FontSize--xs);
          }

         .codicon[class*='codicon-'] {
           font-family: codicon;
          }
        }
      }
    }
  }

  .bx--tooltip--icon__top:focus {
    box-shadow: none;
    outline: none;
    border: none;
    .info-icon {
      box-shadow: 0 0 0 $grc_focus_shaldow_width $grc_focus_shaldow_color;
      outline: 0.0625rem solid transparent;
      border: none;
    }
  }

  .bx--tooltip--icon__top:after, .bx--tooltip--icon__bottom:after {
    white-space: normal;
    word-break: keep-all;
    width: 22rem;
    z-index: 2000;
    margin-left: 5.8rem;
  }

  &-controls {
    height: 100%;
    width: 100%;
    overflow: auto;

    &-note{
      display: flex;
      padding-bottom: 2rem;
      font-size: .875rem;
      font-weight: 400;
    }

    &-must-exist{
      padding-top: 3px;
      margin-left: 0.25rem;
    }

    .info-icon {
      margin-left: 0.375rem;
      width: 1rem;
      height: 1rem;
      fill: $color__blue-51;
      stroke: none;
      cursor: pointer;
    }

    &-singleselect {
      .bx--list-box {
        .bx--list-box__field {
          span.bx--list-box__label {
            color: $color__navy-gray-6;
            text-overflow: ellipsis;
          }
        }
      }
    }

    &-textbox, &-multiselect, &-singleselect, &-select {
      max-width: 600px;
      padding: 0 0.3125rem 1.5625rem 0;

      &-title {
        display: flex;
        align-items: center;
        font-weight: bold;
        font-size: 0.875rem;
        padding-bottom: 0.5rem;
      }

      .bx--select {
        width: 100%;
      }

      .bx--list-box__label {
        font-weight: normal;
      }

      .bx--list-box__field, .bx--text-input {
        background-color: white;
      }

      .bx--list-box {
        .bx--list-box__menu {
          max-height: 25rem;
        }
      }

      .bx--multi-select {
        .bx--list-box__menu {
          max-height: 25rem;
          animation: slideopen 200ms  ease-in-out;
        }

        &.bx--combo-box input::placeholder {
          color: $color__navy-gray-6;
          text-overflow: ellipsis;
        }

        &.bx--combo-box input[role='combobox'] {
          cursor: default;
          text-overflow: ellipsis;
          &:focus {
            cursor: text;
            box-shadow: 0 0 0 $grc_focus_shaldow_width $grc_focus_shaldow_color;
            outline: 0.0625rem solid transparent;
            border: none;
          }
        }
      }

    }

    &-checkbox {
      padding: 0 0.3125rem 1.125rem 0;
      display: flex;
      align-items: center;
      font-weight: bold;
      font-size: 0.875rem;
      position: relative;

      .bx--form-item {
        flex: 0;
      }
    }

  }

  .Resizer {
    width: 0;
    opacity: .2;
    z-index: 1;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -moz-background-clip: padding;
    -webkit-background-clip: padding;
    background-clip: padding-box;
    border-left: 3px solid rgba(255, 255, 255, 0);
    border-right: 3px solid rgba(255, 255, 255, 0);
    cursor: col-resize;
    margin: 0 5px;
  }

   .Resizer:hover {
    -webkit-transition: all .2s ease;
    transition: all .2s ease;
  }

  .Resizer.vertical:hover {
      background: rgba(0, 0, 0, 0.5);
  }
}

.edit-template-switch {
  display: flex;
  margin: -5px 0 0 26px;
  align-items: center;

  .switch-label {
    margin-left: 8px;
    font-size: 12px;
  }

}

.monaco-editor .monaco-editor-hover {
  color: #cccccc;
  padding: 6px 10px;
  margin-left: 24px;
  p {
    font-size: 14px;
    font-family: RedHatText;
  }
}

.errorDecoration {
  margin-left: 6px;
  height: 14px !important;
  width: 14px !important;
  cursor: pointer;
  z-index: 1000;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='14' height='14'><g fill='red'><circle cx='8' cy='8' r='8' fill='white' fill-opacity='1'/><path d='M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zM5.1 13.3L3.5 12 11 2.6l1.5 1.2-7.4 9.5z'/> </g></svg>");  
}

.insertedLineDecoration {
  background: #87d4ecab;
  width: 6px !important;
  margin-left: 12px;
}
