@import "../../core/Variables";

.section-builder-panel {
  display: none;
}

body.builder-mode .section-builder-panel {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100%;
  z-index: 9;
}

.section-builder-panel {
  background: @Calcite_Gray_550;

  .btn,
  .btn-share-container {
    outline: none !important;
  }

  .builder-panel-tools {
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 2;
  }

  .builder-panel-tools-row-1 {
    position: relative;
    left: 0px;
    top: 0px;
    height: 50px;
    display: flex;
    flex-direction: row;
    background: @Calcite_Gray_700;
  }

  .builder-title {
    background: transparent;
    position: relative;
    width: 200px;
    word-wrap: normal;
    text-align: left;
    padding-left: 10px;
    font-size: 1.5em;
    line-height: 21px;
    vertical-align: middle;
    border: none;
    pointer-events: none;
    cursor: default;
  }

  .btn-feedback {
    font-size: 1.3em;
    border: none;
    width: 50px;
    color: #CCCCCC;
  }

  .builder-panel-tools-row-2 {
    position: relative;
    display: flex;
    flex-direction: row;

    .btn {
      background: @Calcite_Gray_600;
      color: white;
      flex: 1;
      width: 33%;
      font-size: 1.7em;

      &:hover {
        background-color: @Calcite_Gray_550;
      }
    }

    .btn.not-clickable {
      cursor: default;
      pointer-events: none;

      &:hover {
        color: inherit !important;
      }

      &:focus {
        outline: none;
        box-shadow: none;
        color: inherit !important;
      }
    }

    // ----- Settings ----- //

    .btn-settings {
      .btn-settings-label {
        // margin-left: 15px;
      }
    }

    // ----- preview ----- //

    .btn-preview {
      .btn-preview-label {
        // margin-left: 12px;
      }

      .btn-preview-wrapper {
        position: relative;
        width: 100%;
      }

      .fa-eye {
        position: relative;
        font-size: 1.5em;
        left: 11px;
      }

      .fa-caret-up {
        position: relative;
        top: -17px;
        right: -14px;
        transform: rotate(45deg);
        font-size: 1.2em;
      }
    }
    // ----- story health ----- //

    .btn-check.errors {
      background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAKklEQVQYV2NcbSP2nwEKBNX1GRhhAiDO+5sXIQIwDkgh455k1/8gGRgAAC9QEVwJfARIAAAAAElFTkSuQmCC') repeat;
      color: white;
    }

    .btn-check.warnings {
      background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAK0lEQVQYV2N8MVHvPwMUMDP8N2GECYA4fxkYz4AFYByQQsbXE3WNQTIwbQCukBLTDbfyrgAAAABJRU5ErkJggg==') repeat;
      color: white;
    }

    .btn-check {
      cursor: default;

      .checking-icon-wrapper,
      .error-icon-wrapper,
      .warning-icon-wrapper,
      .no-issues-icon-wrapper {
        display: none;
        position: relative;
      }

      .fa-exclamation-triangle {
        position: relative;
        left: 8px;
      }

      .super {
        font-size: 0.8em;
        vertical-align: top;
       // margin-left: -4px;
       // font-weight: bold;
        position: relative;
        left: -6px;
        top: -6px;
      }

      .tooltip {
        min-width: 0 !important;
      }

      .fa-heartbeat {
        position: relative;
        left: 10px;
      }

      .fa-check {
        color: @state-success-border;
        position: relative;
        left: -8px;
        top: -1px;
      }

      .btn-check-label {
       // position: absolute;
        left: 50px;
      }

      .check-tooltip,
      .my-stories-link {
        cursor: pointer;
        margin-left: 6px;
        color: #666;
        font-size: 14px
      }

      // visibility changing

      &.checking {
        .checking-icon-wrapper {
          display: inline-block;
        }
      }

      &.errors {
        .error-icon-wrapper {
          display: inline-block;
        }
      }

      &.warnings {
        .warning-icon-wrapper {
          display: inline-block;
        }
        .fa-heartbeat {
          left: 0px;
        }
      }

      &.no-issues {
        .no-issues-icon-wrapper {
          display: inline-block;
        }
      }
    }
  }

  .builder-panel-tools-row-3 {
    position: relative;
    display: flex;
    flex-direction: row;
    height: 50px;
    box-shadow: -5px 5px 10px 0px rgba(0,0,0,0.75);

    .btn-save {
      font-size: 1.5em;
      position: relative;
      flex: 1;
      border-right: 1px solid @Calcite_Gray_400;
      border-top: none;
      border-bottom: none;

      &:not(.btn-bright) {
        background-color: white;
      }

      .btn-save-loader {
        display: none;
        position: relative;
      }

      .btn-save-success,
      .btn-save-error {
        display: none;
        position: relative;
        color: white;
        top: 5px;
        font-size: 1.5em;
      }

      &.saving {
        .btn-save-loader {
          display: inline-block;
          top: -1px;
        }
      }

      &.saved {
        .btn-save-success {
          display: inline-block;
          color: @state-success-border;
          font-size: 1.7em;
          top: 1px;
        }
      }

      &.error {
        background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAKklEQVQYV2NcbSP2nwEKBNX1GRhhAiDO+5sXIQIwDkgh455k1/8gGRgAAC9QEVwJfARIAAAAAElFTkSuQmCC') repeat;

        .btn-save-error {
          display: inline-block;
        }
      }

      &.saving, &.saved, &.error {
        opacity: 0.95;

        .btn-save-icon {
          display: none;
          left: 13px;
        }
      }
    }

    .btn-share-container {
      position: relative;
      background: white;
      width: 167px;
      display: flex;
      flex-direction: row;
      align-items: center;
      padding: 1px;
      z-index: inherit;
      border: none;
      padding-left: 22px;
      padding-right: 16px;

      &.disabled {
        pointer-events: none;
        cursor: default;
        opacity: 0.5;
      }

      .btn-share-outer-tooltip {
        display: flex;
        flex: 1 1 auto;
      }

      .btn-share-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 35px;
        flex: 1 1 auto;
        color: @Calcite_Gray_600;
        border-right: 1px solid #C1CCD2;
        cursor: pointer;

        &:nth-last-child(1) {
          border-right: none;
        }

        &:hover {
          color: @link-hover-color;
        }

        &.active {
          color: @link-color;
          border-bottom: 4px solid @link-color;
        }

        .small-loader {
          display: none;
        }

        .share-icon {
          font-size: 25px;
        }

        &.sharing {
          .small-loader {
            display: inline-block;
          }

          .share-icon {
            display: none;
          }
        }
      }
    }
  }

  .tooltip {
    &:not(.share-tooltip) {
      min-width: 200px;

      .tooltip-inner {
        box-shadow: 0 0 2px 0 white;
      }
    }

    &.in {
      opacity: 1;
    }

    .tooltip-inner {
      line-height: 1.3;
    }

    &.custom-warning {
      width: 300px;

      .tooltip-inner {
        max-width: 300px;
      }
    }
  }

// ----- story overview ----- //

  .overview {
    display: flex;
    flex: 1;
    border: none;
    overflow-y: auto;
  }
}
