/*
*   this file includes button styles for reports.
*   @giraykarasinir
*/

.jfReport, .jfPresentation, .jfReportModal {
  button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: none;
    background-color: transparent;

    .jfReportSVG {
      transition: .3s all;
    }

    &[disabled] {
      opacity: .4;
      user-select: none;
      pointer-events: none;
      cursor: not-allowed;
    }
  }

  &Button {
    height: 34px;
    border-radius: 3px;
    transition: $transition;

    &:not(.contextMenu-button) {
      padding: 3px 12px;
    }

    &:hover {
      background-color: $lightGrayHover;
    }

    .jfReportSVG + span {
      margin-left: 10px;
    }

    &.isDanger {
      color: $danger;
      fill: $danger;
    }

    &.isDanger.withBg:not(.isOutline) {
      color: $white;
      fill: $white;
      background-color: $danger;
    }

    &.forPageActionsBar {
      &.withRadius {
        border-radius: 100px;
        height: 26px;
      }

      &:hover {
        color: inherit;
      }
    }

    &.forPalette {
      background-color: #2E354A;
      color: $white;

      &:hover {
        background-color: lighten( #2E354A, 10% );
      }
    }

    &.isGray {
      border: 1px solid #EFEFF6;
      background-color: #EFEFF6;

      &:hover {
        background-color: rgba(#EFEFF6, .5);
        border-color: rgba(#EFEFF6, .5);
      }
    }

    &.isOutline {
      border: 1px solid $lightGray;
      background-color: $white;

      .jfReportSVG {
        fill: #6a6e8f;
      }

      &:hover {
        background-color: $lightGrayHover;
      }

      &.isSuccess {
        color: $green;
        background-color: #E5F8F0;
        border-color: $green;

        .jfReportSVG {
          fill: $green;
        }

        &:hover {
          background-color: darken( #E5F8F0, 10% );
        }
      }

      &.isDanger {
        color: $danger;
        fill: $danger;

        &:hover {
          background-color: lighten($danger, 50);
          border-color: $danger;
        }
      }
    }

    &.noBg {
      background-color: transparent;
    }

    &.isAccent:not(.isOutline) {
      background-color: $blue;
      color: $white;

      .jfReportSVG {
        fill: $white;
      }

      &:hover {
        background-color: $blueHover;
      }
    }

    &.isSuccess:not(.isOutline) {
      background-color: $green;
      color: $white;

      .jfReportSVG {
        fill: $white;
      }

      &:hover {
        background-color: $greenHover;
      }
    }
    &.forAction {
      padding: 0;

      &:hover {
        .jfReportSVG {
          fill: darken(#6a6e8f, 10%);
        }
      }
    }

    &.forDimension {
      color: $infoGray;

      &:hover {
        color: inherit;
      }
    }
  }
}

.hasAdditional .jfReportButton {
  padding: 3px 10px;
  font-size: 0.875rem;

  .jfReportSVG + span {
    margin-left: 7px;
  }
}
