@include export-module('co-dialog-transaction-header-discount-layout') {
  .co-dialog-transaction-header-discount {
    .co-dialog:not(.is-mobile) .co-dialog-wrapper {
      width: $tp-dialog-transaction-discount-min-width;
      .dialog-content {
        overflow-x: hidden;
      }
    }
    .transaction-discount-wrapper {
      display: flex;
      flex-direction: column;
      row-gap: $tp-dialog-transaction-discount-row-gap;
      max-height: $tp-dialog-transaction-discount-height;
      .co-input-text {
        &:not(.no-style) {
          .input-wrapper {
            max-width: 100%;
          }
        }
      }
      .subtitle {
        font-size: 12px;
        font-weight: bold;
      }
      .order-discounts {
        margin-top: 15px;
        gap: 15px;
        display: flex;
        flex-direction: column;
      }
      .with-discount-button {
        display: flex;
        align-items: center;

        > * {
          flex: 1;
          min-width: 0;
          margin-right: 10px;

          &:last-child {
            margin-right: 0;
          }
        }
      }
      .divide-discount-button {
        border: none;
        background: transparent;
        .transaction-button-label-title-wrapper {
          padding: 8px;
          max-width: 140px;
          border: 1px solid #1A73E8;
          border-radius: 5px;
          color: #1A73E8;
          text-align: center;
        }
      }
    }
    .two-column-grid {
      display: flex;
      flex-direction: row;
      column-gap: 10px;
      align-items: center;
      > * {
        width: calc(50% - 10px);
        flex: 1;
      }
    }
    .three-column-grid {
      display: flex;
      flex-direction: row;
      column-gap: 10px;
      > * {
        width: calc((100% / 3) - 10px);
        flex: 1;
      }
    }
    .four-column-grid {
      display: flex;
      flex-direction: row;
      column-gap: 10px;
      > * {
        width: calc(100% / 4);
        max-width: calc((100% / 4) - 10px);
        flex: 1;
      }
    }
    .transaction-line-button {
      position: relative;
      height: $tp-dialog-transaction-discount-redistribute-discount-button-height;
      margin: 10px 0;
    }
    .transaction-discount-overview {
      margin: $tp-dialog-transaction-discount-overview-margin;
      border: $tp-dialog-transaction-discount-overview-border;
      border-radius: $tp-dialog-transaction-discount-overview-border-radius;
      .transaction-discount-overview-item:not(:last-child) {
        border-style: $tp-dialog-transaction-discount-overview-item-border-style;
        border-width: $tp-dialog-transaction-discount-overview-item-border-width;
      }
    }
    .price-list-header-wrapper {
      display: flex;
      flex-direction: column;
      max-width: $tp-dialog-transaction-header-price-list-button-max-width;
      gap: 10px;
    }
    .transaction-discount-overview-item {
      display: flex;
      align-items: flex-start;
      justify-content: flex-start;
      flex-direction: column;
      padding: $tp-dialog-transaction-discount-overview-item-padding;
      gap: 5px;
      .title {
        font-size: $tp-dialog-transaction-discount-title-font-size;
      }
      .value {
        font-size: $tp-dialog-transaction-discount-total-font-size;
        font-weight: $tp-dialog-transaction-discount-total-font-weight;
      }
    }
    .discount-button {
      width: 36px !important;
      height: 36px !important;
      max-width: 36px;
      &.updated {
        background-color: #37c949;
      }
    }
    .discount-codes-modal {
      .co-dialog-wrapper {
        width: 350px !important;
      }

      .dialog-header-caption {
        display: flex;
        align-items: center;
        gap: 0.5em;

        co-icon {
          height: 20px;
          width: 20px;
        }

        .co-dialog-header-title {
          margin: 0;
        }
      }

      .dialog-content {
        margin-top: 20px;
      }

      .dialog-footer {
        border: none;
      }

      co-input-textarea {
        margin-top: 15px;
      }
    }
  }
}
