@import "../../../../scss/variables";

.layout-drag-preview {
  background: $site-bg-color-100;
  padding: 10px;
  border-radius: 4px;
  @include mat-elevation(5);
}

layout-panel {
  display: block;

  .cdk-drag-placeholder {
    opacity: 0;
  }

  .cdk-drag-animating {
    transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
  }

  .cdk-drop-list-dragging .cdk-drag:not(.cdk-drag-placeholder) {
    transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
  }

  .container-config {
    padding: 10px;
  }

  .mat-action-row, .row-actions {
    padding: 0;

    button {
      margin-left: -1px;
      padding: 10px;
      border-left: 1px solid $site-border-color-200;
      color: $site-text-color-300;
      cursor: pointer;
    }
  }

  .add-item-button {
    display: block;
    position: relative;
    height: 11px;
    width: 100%;
    margin: 5px 0;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    background-color: $site-bg-color-300;

    &.hide-text > span {
      display: none;
    }

    &:hover > span {
      display: inline-block;
      color: $site-text-color-400;
    }

    > span {
      position: relative;
      z-index: 1;
      color: $site-text-color-300;
      background-color: inherit;
    }

    &:before {
      display: block;
      content: "";
      position: absolute;
      top: 5px;
      left: 0;
      width: 100%;
      border: 1px dashed $site-border-color-200;
      z-index: 0;
    }
  }

  .rows {
    .row {
      display: flex;
      align-items: center;
      background-color: $site-bg-color-200;
      border: 1px solid $site-border-color-200;
      margin-bottom: 5px;
      cursor: move;
      user-select: none;

      .row-name {
        padding: 10px 0 10px 10px;
      }

      .row-actions {
        margin-left: auto;

        button .mat-icon {
          width: 16px;
          height: 16px;
        }
      }

      &.selected {
        border-color: $site-primary-color-200;
      }
    }

    .add-item-button {
      background-color: #fff;
    }
  }

  .current-columns {
    display: flex;
    margin-top: 10px;

    .column {
      background-color: $site-bg-color-200;
      border: 1px solid $site-border-color-200;
      margin: 0 0 0 -1px;
      padding: 10px 0;
      text-align: center;
      cursor: ew-resize;
      position: relative;

      &.selected {
        border-color: $site-primary-color-200;
        z-index: 1;
      }

      &:hover {
        background-color: $site-bg-color-100;
      }
    }
  }
}