@include export-module('co-transaction-header-popup-layout') {
  .co-transaction-header-popup {
    font-family: $tp-transaction-header-popup-font-family;
    font-size: $tp-transaction-header-popup-font-size;

    .co-dialog:not(.is-mobile) .co-dialog-wrapper.transaction-header-dialog {
      width: $tp-transaction-header-popup-height;
      height: $tp-transaction-header-popup-height;

      .dialog-content.transaction-header-dialog {
        position: relative;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        height: 100%;
      }
    }

    .transaction-header-dialog {
      &.co-dialog {
        .co-dialog-wrapper {
          background-color: $tp-transaction-header-popup-background;
        }

        .dialog-header {
          background-color: $tp-transaction-header-popup-background;
        }

        .dialog-content {
          background-color: $tp-transaction-header-popup-background;
        }

        .co-input-text, .co-list-of-values {
          &:before {
            box-shadow: none;
          }
        }
      }

      .dialog-footer {
        background-color: $tp-transaction-header-popup-dialog-footer-background;
        border-width: $tp-transaction-header-popup-dialog-footer-border-width;
        border-style: solid;
        border-color: $tp-transaction-header-popup-dialog-footer-border-color;
        padding: $tp-transaction-header-popup-dialog-footer-padding;

        .co-dialog-footer-button-wrapper {
          gap: $tp-transaction-header-popup-dialog-footer-button-wrapper-gap;
        }
      }
    }

    .loader-wrapper {
      position: absolute;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      z-index: 2;
      backdrop-filter: blur(2px);

      .co-loader {
        display: block;
        width: 50px;
        height: 50px;
      }
    }

    .co-drop-shipment {
      .default-data-row {
        flex: 1;
        width: 100%;
      }

      .new-drop-shipment-link {
        display: flex;
        flex-direction: row;
        align-items: center;
        font-weight: 500;
        color: $cc-popup-checkbox-checked-background-color;
        cursor: pointer;

        .drop-shipment-icon {
          height: 20px;
          width: 20px;

          svg path {
            fill: $cc-popup-checkbox-checked-background-color;
          }
        }
      }

      .co-dialog-header-title-icon {
        display: flex;
        align-items: center;
        gap: 10px;

        .co-icon {
          width: 22px;
          height: 22px;
        }
      }
    }

    .transaction-header-popup-categories {
      display: flex;
      justify-content: center;
      column-gap: $tp-transaction-header-popup-categories-column-gap;
      border-radius: $tp-transaction-header-popup-categories-border-radius;
      padding: $tp-transaction-header-popup-categories-padding;
      border-style: solid;
      border-width: $tp-transaction-header-popup-categories-border-width;
      border-color: $tp-transaction-header-popup-categories-border-color;
    }

    .transaction-header-popup-category {
      display: flex;
      flex-direction: column;
      flex-basis: $tp-transaction-header-popup-category-flex-basis;
      align-items: $tp-transaction-header-popup-category-justify-content;
      cursor: pointer;
      padding: $tp-transaction-header-popup-category-padding;
      margin: $tp-transaction-header-popup-category-margin;
      border-radius: $tp-transaction-header-popup-category-border-radius;

      .co-icon {
        height: $tp-transaction-header-popup-category-co-icon-size;
        width: $tp-transaction-header-popup-category-co-icon-size;
        margin: $tp-transaction-header-popup-category-co-icon-margin;
      }

      .title {
        font-size: $tp-transaction-header-popup-category-title-font-size;
        text-align: center;
        white-space: nowrap;
      }
    }

    .transaction-header-popup-content-wrapper {
      height: 100%;
      margin: $tp-transaction-header-popup-categories-content-margin;
      padding: $tp-transaction-header-popup-categories-content-padding;
      overflow: hidden;

      > * {
        height: 100%;
      }

      .transaction-header-popup-section {
        .co-carousel {
          .carousel-wrapper {
            justify-content: flex-start;

            > * {
              max-height: 100%;
              flex: 0;
            }
          }
        }
      }


      .transaction-header-popup-category-wrapper {
        height: 100%;
        padding: $tp-transaction-header-popup-category-content-padding;
        overflow-x: hidden;

        co-form {
          position: relative;
        }
      }
    }

    .extended-block-wrapper {
      display: grid;
      grid-template-columns: 50% 50%;
      grid-column-gap: 10px;
      grid-row-gap: 10px;
      @include screen-mobile {
        grid-template-columns: 100%;
      }
    }

    .header-definitive-checkbox, .header-delivery-date-checkbox {
      .co-input-checkbox {
        font-size: $tp-transaction-header-popup-font-size;
        flex-direction: row;
      }
    }

    .transaction-header-popup-dialog-header-wrapper {
      display: flex;
      align-items: center;
      column-gap: 10px;

      .co-icon {
        height: $tp-transaction-header-popup-dialog-header-icon-size;
        width: $tp-transaction-header-popup-dialog-header-icon-size;
        margin: $tp-transaction-header-popup-dialog-header-icon-margin;
      }
    }

    .transaction-header-popup-section {
      display: flex;
      flex-direction: column;
      row-gap: $tp-transaction-header-popup-section-row-gap;
      margin: $tp-transaction-header-popup-section-margin;
      padding: $tp-transaction-header-popup-section-padding;
      border-style: $tp-transaction-header-popup-section-border-style;
      border-width: $tp-transaction-header-popup-section-border-width;
      border-color: black;

      &.general {
        max-width: $tp-transaction-header-popup-section-general-max-width;
      }

      .service-data-column {
        display: flex;
        flex-direction: column;
        gap: 10px;
      }

      .service-data-row {
        display: flex;
        flex-direction: row;
        gap: 10px;
        align-items: center;

        &.apart {
          justify-content: space-between;
        }
      }

      .co-input-checkbox {
        .checkbox {
          border-color: #FFFFFF;
          background-color: #FFFFFF;

          &.checked {
            border-color: $cc-popup-checkbox-checked-background-color;
            background-color: $cc-popup-checkbox-checked-background-color;
          }

          .checkmark {
            &.show {
              border-color: #FFFFFF;
            }
          }
        }
      }
    }

    .co-carousel {
      .carousel-wrapper {
        padding: 10px 0;

        .co-tile {
          &.selected {
            transform: scale(1);
          }

          .co-tile-select-wrapper {
            display: none;
          }
        }
      }
    }

    .transaction-header-popup-two-column-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      row-gap: $tp-transaction-header-popup-section-grid-row-gap;
      column-gap: $tp-transaction-header-popup-section-grid-column-gap;
      align-items: center;
    }

    .transaction-header-popup-three-column-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      row-gap: $tp-transaction-header-popup-section-grid-row-gap;
      column-gap: $tp-transaction-header-popup-section-grid-column-gap;
      align-items: center;
    }

    .transaction-header-popup-section-label {
      font-family: $tp-transaction-header-popup-section-label-font-family;
      font-size: $tp-transaction-header-popup-section-label-font-size;
      font-weight: $tp-transaction-header-popup-section-label-font-weight;
      margin: $tp-transaction-header-popup-section-label-margin;
    }

    .co-transaction-filter-categories {
      .transaction-filter-categories-wrapper {
        display: flex;
        justify-content: flex-start;
        gap: $tp-transaction-header-popup-filter-categories-wrapper-gap;
        padding: $tp-transaction-header-popup-filter-categories-wrapper-padding;

        .transaction-filter-category {
          padding: $tp-transaction-header-popup-filter-category-padding;
          border-color: $tp-transaction-header-popup-filter-category-border-color;
          flex: none;

          &.active {
            border-color: $tp-transaction-header-popup-filter-category-active-border-color;
            color: $tp-transaction-header-popup-filter-category-active-font-color;
          }
        }
      }
    }

    .co-transaction-line-checkbox-list {
      .checkbox-list-wrapper {
        .checkbox-list-item {
          height: 32px;
        }

        .checkbox {
          border-color: #F5F5FC;
          background-color: #F5F5FC;
        }
      }
    }

    .co-relation-general {
      .default-data-row {
        .checkout-prefix-name {
          width: 55%;
        }
      }
    }

    .checkbox-list-wrapper {
      overflow: visible;
    }

    .header-relation-navigation-wrapper {
      display: flex;
      overflow: hidden;
      scroll-behavior: smooth;
    }

    .header-relation-navigation-content {
      display: flex;
      flex-direction: column;
      width: 100%;
      flex-shrink: 0;
    }

    .co-dialog:not(.is-mobile) .co-dialog-wrapper {
      max-height: 90vh;
    }

    .save-button {
      height: $tp-transaction-header-popup-save-button-size;
      width: $tp-transaction-header-popup-save-button-size;
      border-color: $tp-transaction-header-popup-button-border-color;
      border-style: $tp-transaction-header-popup-button-border-style;
      border-width: $tp-transaction-header-popup-button-border-width;
      background-color: $tp-transaction-header-popup-button-background-color;
      padding: $tp-transaction-header-popup-button-padding;
      box-shadow: $tp-transaction-header-popup-button-box-shadow;
      cursor: pointer;

      .co-icon {
        height: $tp-transaction-header-popup-save-button-icon-size;
        width: $tp-transaction-header-popup-save-button-icon-size;

        svg {
          fill: $tp-transaction-header-popup-save-button-icon-color;
        }
      }
    }

    .close-button {
      height: $tp-transaction-header-popup-close-button-size;
      width: $tp-transaction-header-popup-close-button-size;
      border-color: $tp-transaction-header-popup-button-border-color;
      border-style: $tp-transaction-header-popup-button-border-style;
      border-width: $tp-transaction-header-popup-button-border-width;
      background-color: $tp-transaction-header-popup-close-button-background-color;
      padding: $tp-transaction-header-popup-button-padding;
      box-shadow: $tp-transaction-header-popup-button-box-shadow;
      cursor: pointer;

      .co-icon {
        height: $tp-transaction-header-popup-save-button-icon-size;
        width: $tp-transaction-header-popup-save-button-icon-size;

        svg {
          fill: $tp-transaction-header-popup-save-button-icon-color;
        }

        [fill] {
          fill: $tp-transaction-header-popup-save-button-icon-color;
        }
      }
    }

    .transaction-header-popup-already-paid {
      display: flex;
      column-gap: $tp-transaction-header-popup-section-grid-column-gap;

      .co-input-text {
        &:before {
          box-shadow: none;
        }
      }
    }

    .transaction-header-popup-business-rule-applied {
      display: flex;
      column-gap: 5px;
      align-items: center;

      .co-icon {
        height: $tp-transaction-header-popup-business-rule-applied-icon-size;
        width: $tp-transaction-header-popup-business-rule-applied-icon-size;

        svg {
          fill: $tp-transaction-header-popup-business-rule-applied-icon-color;
        }
      }

      span {
        font-size: $tp-transaction-header-popup-business-rule-applied-font-size;
        font-weight: $tp-transaction-header-popup-business-rule-applied-font-weight;
      }
    }

    .co-transaction-header-payment-button {
      .co-transaction-button {
        height: $tp-item-size;
      }

      .payment-payed-wrapper {
        margin: 5px 0 0 0;
        display: block;
        border: none;
        width: auto;
        height: auto;
        border-radius: 0;
      }
    }

    .co-carousel {
      .carousel-wrapper {
        .co-relation-address-tile {
          height: 100%;
        }
      }
    }

    .still-top-pay-stats {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      grid-gap: 10px;

      .payment-item {
        .amount {
          margin-top: 4px;

          &.outstanding {
            color: $tp-color-error;
          }

          &.paid {
            color: $tp-color-payed-value;
          }
        }
      }
    }

    .payment-information {
      position: relative;
      padding-top: 20px;
      border-top: 5px solid $tp-transaction-header-popup-dialog-footer-border-color;

      .payment-button {
        position: absolute;
        top: 9px;
        right: 7px;
        z-index: 1;
      }

      table {
        border-spacing: 8px;
        width: 100%;
      }

      th {
        font-weight: 600;

        text-align: right;

        &.left {
          text-align: left;
        }
      }

      td {
        text-align: right;

        &.outstanding {
          color: $tp-color-error;
        }

        &.paid {
          color: $tp-color-payed-value;
        }

        &.left {
          text-align: left;
        }
      }
    }

    .willing-to-pay-input {
      float: right;
      width: 120px;
    }

    .total-willing-to-pay {
      display: flex;
      justify-content: flex-end;
      padding-right: 8px;

      span {
        display: inline-block;
        margin-left: 8px;
        font-weight: bold;
      }
    }

    .payment-categories {
      display: flex;
      column-gap: $tp-transaction-header-popup-categories-column-gap;
      padding: $tp-transaction-header-popup-categories-padding;
      border-bottom: 2px solid $tp-transaction-header-popup-button-border-color;

      .payment-category {
        cursor: pointer;
        padding: $tp-transaction-header-popup-category-padding;
        margin: $tp-transaction-header-popup-category-margin;
        border-radius: $tp-transaction-header-popup-category-border-radius;

        &.selected {
          background: $tp-color-light;

          .title {
            color: $tp-transaction-header-popup-filter-category-active-font-color;
          }
        }

        .title {
          font-size: $tp-transaction-header-popup-category-title-font-size;
          text-align: center;
        }
      }
    }

    co-deposit-payment {
      margin-top: 8px;
    }

    .cash-on-delivery-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .input-field-with-button {
      display: flex;
      align-items: center;
      gap: 10px;

      co-transaction-header-project-code {
        flex: 1;
      }
    }

    .co-input-text.disabled {
      opacity: 0.5;
      pointer-events: none;
      cursor: default;
    }
  }

  .drop-shipment-dialog {
    cursor: default;

    .co-dialog-wrapper {
      width: 1000px !important;

      .dialog-content {
        display: flex;
        justify-content: space-between;
      }
    }

    .section-title {
      margin-bottom: 20px;
    }

    .add-new-address-form {
      width: 65%;
      padding-top: 20px;

      .drop-shipment-form {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
      }

      .drop-shipment-form-item {
        width: 49%;
        margin-bottom: 10px;

        &.smaller {
          width: 32%;
        }
      }
    }

    .form-actions {
      display: flex;
      margin: 20px 0;
    }

    .remove-entry {
      width: fit-content !important;
      margin-right: 15px;
      color: #FFFFFF;
    }

    .add-entry {
      width: fit-content !important;
      margin: 15px 0 30px;
      color: #FFFFFF;
    }

    .search-input {
      margin-bottom: 20px;
    }

    .existing-addresses {
      width: 30%;
      padding: 20px 5px 0;
      overflow-y: auto;
    }

    .existing-address {
      padding: 10px 20px;
      border: 1px solid rgba(160, 160, 160, 0.3);
      box-shadow: 0 0 4px 2px rgba(160, 160, 160, 0.2);
      border-radius: 4px;
      margin-bottom: 8px;
      background-color: #FFFFFF;
      cursor: pointer;

      &:hover {
        background-color: #F5F5FC;
      }

      &.active {
        color: #FFFFFF;
        background-color: #1A73E8;

        &:hover {
          background-color: #1A73E8;
        }
      }
    }
  }

  .cash-on-delivery-modal {
    .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 {
      padding: 0 0.5em;

      section {
        margin-bottom: 28px;

        h4 {
          margin: 12px 0;
        }

        .stat-row {
          display: flex;
          align-items: center;
          margin-bottom: 16px;
        }

        .stat-info {
          width: 25%;

          .label {
            margin-bottom: 4px;
          }

          .value {
            font-weight: 900;
          }
        }

        &:last-of-type {
          margin: 0;
        }
      }
    }

    .cash-on-delivery-field {
      width: 50%;
    }
  }

  .customer-link {
    position: absolute;
    top: 0;
    right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
  }

  .header-relation-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;

    .create-transaction-buttons {
      display: flex;
      flex-direction: row;
      gap: 5px;
      width: 100%;
    }

    .create-via-product {
      display: flex;
      flex-direction: column;
      gap: 5px;
      width: 100%;

      .create-via-product-result-display {
        display: flex;
        flex-direction: row;
        gap: 30px;
        width: 100%;
        padding: 15px 30px;
        border: 2px solid #ececec;
        border-radius: 5px;
        align-items: center;
      }
    }

    .create-via-transaction {
      display: flex;
      flex-direction: column;
      gap: 15px;
      width: 100%;

      .create-via-transaction-result-display {
        display: flex;
        flex-direction: row;
        gap: 30px;
        width: 100%;
        padding: 15px 30px;
        border: 2px solid #ececec;
        border-radius: 5px;
        align-items: center;
      }
    }

    .co-image-display {
      height: 60px;
      width: 80px;
      max-width: 80px;
      flex: 1;

      + span {
        flex: 2;
      }
    }

    .files-upload {
      padding-top: 30px;
    }
  }
  .service-read-only-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 30px;
  }
  .service-data-read-only {
    display: flex;
    flex-direction: column;
    gap: 20px;

    .row, .double-column {
      display: flex;
      align-items: center;
      gap: 30px;
      justify-content: space-between;
      flex: 1;

      .column {
        display: flex;
        flex-direction: column;
        flex: 1;
        gap: 5px;
      }
    }

    .label {
      color: #8083A3;
      font-size: 10px;
    }

    .value {
      font-weight: normal;
      font-size: 12px;
    }
  }
  .service-data-header {
    display: flex;
    gap: 30px;
    align-items: center;

    .data-description {
      font-size: 14px;
    }

    .toggle-change {
      font-weight: 600;
      font-style: italic;
      color: #1a73e8;
      cursor: pointer;

      &:hover {
        text-decoration: underline;
      }
    }
  }
  .files-upload {
    .co-files-upload {
      .co-drag-drop-container {
        padding-top: 40px;
        position: relative;
        margin-top: 30px;

        .add-file {
          position: absolute;
          top: 0;

          .co-tile-render {
            display: flex;
            align-items: center;
            flex-direction: row-reverse;

            .add-button {
              position: unset;
            }
          }

          .description {
            font-weight: bold;
            font-size: 12px;
          }
        }

        .tile {
          padding: 10px;
          border-radius: 5px;
          border: 2px solid #DCE4EA;

          .info {
            max-width: 100px;

            .description {
              font-size: 10px;
              display: -webkit-box;
              -webkit-line-clamp: 2;
              -webkit-box-orient: vertical;

            }
          }

          .trash {
            width: 20px;
            height: 20px;
            padding: 2px;
          }
        }
      }
    }
  }
}
