@import '~styles/mixins';
@import '~styles/adminMixins';

.PageCmsForm {
  height: 100%;
  position: relative;
  padding-bottom: $height_page_footer;

  /*$height_filter: 40px;

  .filter {
    height: $height_filter;
    padding: 0 10px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid $color_border;

    input {
      border: 1px solid $color_border;
      border-radius: $border_radius;
      padding: 3px 8px;
      width: 100%;
      font-size: 12px;
      font-weight: 500;
    }
  }*/

  .page-content {
    padding: 10px;
    padding-top: 0;
    height: 100%;
    overflow: auto;
  }

  .actions {
    @include fixedFooter;
    padding: 0 10px;
    display: flex;

    .left {
      display: flex;
      align-items: center;
    }

    .button {
      min-width: 120px;
      margin-right: 8px;
    }

    .stats {
      font-weight: bold;

      &.search {
        color: $color_search;
      }
    }
  }

  .upload-container {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;

    .upload-container-button {
      margin-left: 10px;
    }
  }

  .field,
  .object,
  .array {
    .field-wrapper {
      background-color: white;
    }
    .active-checkbox {
      background-color: $color_primary;
      border-color: $color_primary;
    }

    .field-wrapper-value-container,
    .field-wrapper-container {
      position: relative;

      .field-link-wrapper {
        background-color: white;
        padding: 6px;
        border-radius: 4px;
        margin-top: 8px;
      }

      .icon-locker {
        @include v_align;
        display: flex;
        right: 5px;
        padding: 4px;
        font-size: 12px;
        opacity: 0.2;
        cursor: pointer;

        &.active {
          opacity: 1;
        }
      }
    }

    // @include card;
    margin-top: 10px;

    //padding: 5px 10px;
    &.to-complete {
      background: $color_to_complete;

      > .head input {
        font-weight: bold;
        color: $color_dark_orange;
      }
    }

    &.is-matched {
      > .head .matched {
        background-color: $color_search_item;
      }

      > .content .matched {
        background-color: $color_search_item;
      }
    }
  }

  .object,
  .array {
    padding: 5px;
    border-radius: $border_radius;
    border: 1px solid $color_border;
    background-color: rgba(245, 245, 245, 0.8);
  }

  .value {
    display: flex;
    justify-content: space-between;
    align-items: baseline;

    > * {
      width: 49%;
    }

    .meta {
      padding: 5px;
    }
  }

  .meta {
    font-size: 10px;
    display: flex;
    align-items: center;

    justify-content: space-between;

    &.TextArea {
      padding-left: 200px;
    }

    > * {
      display: flex;
      flex-shrink: 0;
      align-items: center;
    }

    .right {
      padding-left: 10px;
    }

    .key {
      font-weight: bold;
    }

    .path {
      font-weight: bold;
      font-size: 10px;
      cursor: pointer;
      @include transition();

      &:hover {
        opacity: 0.7;
      }
    }

    .position {
      padding: 0 2px;
      font-size: 10px;
      display: inline-block;
      max-width: 40px;
      font-weight: bold;
      text-align: center;
      background-color: rgba(0, 0, 0, 0.03);
    }

    .checkbox {
      .label {
        font-weight: bold;
        font-size: 10px;
      }
    }
  }

  .more-options {
    font-size: 10px;
    margin-right: 10px;
    //position: absolute;
    //right: 5px;
    // top: 5px;
    cursor: pointer;

    span {
      &.active {
        color: #0e5cad;
        font-weight: bold;
      }

      &:hover {
        color: #0e5cad;
      }
    }
  }

  .head {
    cursor: pointer;
    position: relative;

    .head-info {
      @include v_align;
      right: 5px;
      z-index: 2;
      display: flex;
      align-items: center;
    }

    .indic {
      // @include v_align;
      // right: 5px;
      font-size: 12px;
      color: $color-blue;
      border-radius: $border_radius;
      z-index: 1;
      padding: 4px;
      background-color: rgb(250, 250, 250);
    }

    .locker {
      cursor: pointer;
      font-size: 12px;
      padding: 4px;
      display: flex;
      opacity: 0.2;
      @include transition();
      position: relative;
      right: 0;

      &.locked {
        opacity: 1;
      }
    }

    .delete {
      cursor: pointer;
      font-size: 12px;
      opacity: 0;
      background-color: rgba(255, 255, 255, 1);
      border-radius: $border_radius;
      padding: 4px;
      color: $color-red;
      @include v_align;
      right: 0;
      z-index: 2;
      @include transition();
      display: flex;
    }

    &:hover {
      .delete {
        opacity: 1;
      }

      .space-right {
        right: 20px;
      }
    }
  }

  .content {
    position: relative;
    padding: 5px;

    .url {
      margin-top: 7px;
    }
  }

  .array,
  .object {
    @include transition(all);

    &.open {
      box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.08);
    }
  }

  .bottom {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;

    .input {
      width: 120px;
      margin-right: 10px;
    }

    .button {
      padding-top: 0;
      padding-bottom: 0;
      height: 37px;

      &.left {
        margin-right: 10px;
      }
    }
  }
}
