/**
 * #.# Editor Styles
 *
 * CSS for just Backend enqueued after style.scss
 * which makes it higher in priority.
 */

@import "./_colors.scss";

.edit-post-sidebar {

  .sidebar__panel-tabs {
    display: flex;
    margin: 0;
    // position: absolute;
    // top: -13px;

    li {
      background-color:$light-gray-200;
      flex-grow: 1;
      margin: 0;
    }
  }

  .dsgn__stylist {
    padding: 15px;
    display: block;
  }

  .dsgn__empty-state {
    display: block;
    text-align: center;
    box-shadow: none;
    margin-top: 20px;
    margin-bottom: 40px;

    img {
      max-width: 130px;
    }
  }

  .dsgn-settings__license {
    .settings__activate-license,
    .settings__deactivate-license {
      margin-bottom: 10px;

      svg {
        margin-right: 3px;
      }
    }

    .settings__license-status {
      margin-top: 10px;

      svg {
        margin-bottom: -6px;
        opacity: .5;
      }
    }

    .license-panel__lost-license {
      margin-top: 9px;
      display: inline-block;
    }
  }

  .dsgn__delete-action.components-button {
    color: darken($alert-red, 10%);

    &:hover,
    &:focus {
      color: darken($alert-red, 15%);
    }

    &:disabled {
      opacity: 0.3;
    }
  }

  .dsgn__library-reset-versions {
    display: none;
  }

  .dsgn-settings__data {
    margin-bottom: 20px;

    li {
      margin-bottom: 10px;
    }
    svg {
      margin-right: 6px;
      margin-bottom: -6px;
      opacity: .5;
    }

    &-action-link {
      margin-left: 6px;
      top: -1px;
      position: relative;
      font-size: 12px;
      float: right;

      svg {
        margin-right: 0;
        margin-bottom: -1px;
        opacity: .3;
      }
    }

    .license-panel__license-limit {
      color: darken($alert-red, 10%);
    }

  }

  .dsgn-outdated {
    color: darken($alert-red, 10%);
  }

  .dsgn-uptodate {
    color: darken($alert-green, 10%);
  }

  .design-upsell {
    // background: #1F87B6;
    margin: 0px;
    padding: 20px;
    // text-align: center;

    &.centered {
      text-align: center;
    }

    &__header {
      margin-top: 0;
      margin-bottom: 1em;
      font-weight: 300;
      font-size: 16px;
      line-height: 1.4;
    }

    &__item {
      font-size: 14px;
      margin-bottom: 12px;

      a {
        text-decoration: none;
      }

      .dashicon {
        // color: #82878C;
        color: inherit;
        opacity: .7;
        margin-right: 4px;
        margin-bottom: -6px;
      }
    }

    &__cta {
      .dashicon {
        color: rgba(24, 26, 27, 0.36);
        margin-top: 5px;
        margin-left: -5px;
        margin-right: 6px;
        width: 18px;
      }
    }

    &__errors {
      background: #fff;
      border: 1px solid #ec8158;
      border-left: 4px solid #dc3232;
      box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
      margin: 5px 0 2px;
      padding: 1px 12px;

      p {
        margin: 0.5em 0;
        padding: 2px;
      }
    }
  }

  .design-category {
    background-color: #F7F7F7;
  }
  .design-item {
    // cursor: pointer;
    display: block;
    min-height: 160px;
    // border: solid 3px white;
    background: #fff;
    border-color: #E2E4E7;
    padding: 3px;
    border-radius: 3px;
    overflow: hidden;
    line-height: 0;
    margin-bottom: 20px;
    text-decoration: none;

    &:hover {
      border-color: #fff;
      box-shadow: 0 2px 5px 0 rgba(33, 32, 31, 0.3), inset 0 0 0 2px $blue-medium-500;
    }

    &__thumbnail {
      display: block;
      padding: 0;

      &:focus {
        box-shadow:none;
      }
    }

    &__bar {
      text-align: left;
      display: flex;
      justify-content: space-between;
      padding-top: 3px;
      // margin-bottom: -1px;
      background: #fff;

      button {
        font-size: 12px;
        border: none;
        // border-radius:0;
        box-shadow: none;
        background: #fff;

        &:hover {
          box-shadow: none;
          background-color: #1F87B6;
          color: #fff;

          .dashicon {
            color: #fff;
          }
        }


        .dashicon {
          width: 15px;
          margin-top: 3px;
          margin-bottom: 2px;
          color: #82878C;
        }
      }
    }

    &__pro {
      color: #82878C;
      display: inline-block;
      padding: 4px;
      font-size: 10px;
      font-weight: 600;
      text-decoration: none;

      .dashicon {
        margin-bottom: -6px;
        width: 16px;
      }
    }


  }


  .dsgn__import-progress-bar {
    background:$light-gray-400;
    height: 6px;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 0 0 1px inset rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-top: 20px;

    div {
      position: absolute;
      left: 0;
      top: 0;
      background: $blue-medium-500;
      box-shadow: 0 0 0 1px inset rgba(255,255,255, 0.15);
      width: 0;
      height: 10px;
      transition: 1s 1s width cubic-bezier(0.165, 0.84, 0.44, 1);
    }
  }

}

.dsng-loading {
  color: red;
}


/* Fix bug with single column layout taking only 50% of space */
@media (min-width: 600px) {
  .wp-block-columns.has-1-columns > .editor-inner-blocks > .editor-block-list__layout > [data-type="core/column"] {
    flex-basis: 100%;
  }
}


// ============================================================
// PROTECTED STYLES.



div[class^='dsgn__'], div[class*=' dsgn__']{
  // color: #F00;
  // transform: scale(0.5);
}