@import "../../../style/mixin";

@include export-module('co-transaction-button-bar-layout') {
  .co-transaction-button-bar {
    font-family: $tp-co-transaction-button-bar-font-family;
    font-size: $tp-co-transaction-button-bar-font-size;
    padding: 0 45px 0 0;
    .button-bar-wrapper {
      display: flex;
      justify-content: center;
      gap: 5px;
      &.vertical {
        display: block;
        width: fit-content;
      }
    }

    .custom-button-wrapper {
      padding: 2px;
    }
    .co-transaction-button-bar-button {
      position: relative;
      flex: 1;
      transition: all .2s;
      max-width: $tp-co-transaction-button-bar-button-max-width;
      .co-loader {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 25px;
        height: 25px;
      }
      &.hide {
        display: none;
      }
      &.show-loader {
        .button-wrapper > * {
          opacity: 0.1;
        }
      }
    }
    .button-wrapper {
      //height: $tp-co-transaction-button-bar-button-size;
      //min-width: $tp-co-transaction-button-bar-button-size;
      background: $tp-co-transaction-button-bar-button-background-color;
      border-radius: $tp-co-transaction-button-bar-button-border-radius;
      padding: $tp-co-transaction-button-bar-button-padding;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      .button-title {
        font-size: $tp-co-transaction-button-bar-label-font-size;
        //padding: 0 7px 4px 7px;
      }
      .co-animated-checkbox {
        position: absolute;
        top: 0;
        right: 0;
      }
      .co-transaction-button-bar-icon {
        height: $tp-co-transaction-button-bar-icon-size;
        width: $tp-co-transaction-button-bar-icon-size;
        margin: $tp-co-transaction-button-bar-icon-margin;
        svg {
          height: 100%;
          width: 100%;
        }
      }
    }
    .selected {
      .button-wrapper {
        //box-shadow: $tp-co-transaction-button-bar-button-selected-box-shadow;
        border: $tp-co-transaction-button-bar-button-selected-box-border;
        span {
          color: #1A73E8;
        }
      }
    }
    .co-transaction-sales-purchase-button-bar-button,
    .co-transaction-purchase-receive-goods-button-bar-button,
    .co-transaction-sales-allocation-button-bar-button,
    .co-transaction-purchase-confirmation-button-bar-button,
    .co-transaction-purchase-invoice-button-bar-button,
    .co-transaction-sales-invoice-button-bar-button,
    .co-transaction-sales-delivery-button-bar-button,
    .co-transaction-sales-overview-button-bar-button,
    .co-transaction-service-service-button-bar-button {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .co-transaction-sales-picking-button-bar-button,
    .co-transaction-sales-overview-button-bar-button,
    .co-transaction-sales-quotation-button-bar-button {
      position: relative;

      .sales-picking-button-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;

        .picking-type-wrapper {
          position: absolute;
          display: flex;
          top: 45px;
          z-index: 3;
          box-shadow: -3px 0px 16px 1px rgba(0, 0, 0, 0.2);
          border-radius: 5px;
          background: #FFF;
          .button-wrapper {
            position: relative;
            width: 65px;
          }
        }
      }
    }
  }
}
