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

@include export-module('co-transaction-line-side-panel-layout') {
  .co-transaction-line-side-panel {

    .transaction-line-side-panel-wrapper {
      display: flex;
      flex-direction: column;
      font-family: $tp-transaction-line-side-panel-font-family;
      font-size: $tp-transaction-line-side-panel-font-size;
      position: fixed;
      right: 0;
      top: $tp-transaction-line-side-panel-top;
      width: $tp-transaction-line-side-panel-width;
      height: $tp-transaction-line-side-panel-height;
      z-index: 999;
      box-shadow: $tp-transaction-line-side-panel-box-shadow;
      border-width: $tp-transaction-line-side-panel-border-width;
      border-style: solid;
      border-color: $tp-transaction-line-side-panel-border-color;
      background: $tp-transaction-line-side-panel-background;

      &.wide {
        width: 30%;
      }
    }

    .transaction-line-side-panel-header {
      display: flex;
      gap: 5px;
      flex-direction: column;
      margin: $tp-transaction-line-side-panel-header-margin;
      align-items: flex-start;
      padding: $tp-transaction-line-side-panel-padding;
      .icon-header-side-panel {
        display: flex;
        gap: 15px;
      }

      icon {
        width: $tp-transaction-line-side-panel-icon-size;
        height: $tp-transaction-line-side-panel-icon-size;
        svg {
          max-height: 100%;
        }
      }
      span {
        font-weight: bold;
        font-size: $tp-transaction-line-side-panel-header-font-size;
      }

    }
    .close-button {
      position: absolute;
      display: flex;
      align-self: flex-end;
      width: $tp-transaction-line-side-panel-close-icon-size;
      height: $tp-transaction-line-side-panel-close-icon-size;
      top: $tp-transaction-line-side-panel-close-icon-top;
      right: $tp-transaction-line-side-panel-close-icon-right;
      cursor: pointer;
    }
    .side-panel-line-description {
      span {
        font-size: 12px;
        font-weight: 500;
      }
      gap: 5px;
      display: flex;
      padding: 10px 30px;
    }
    .transaction-line-side-panel-nav-bar {
      display: flex;
      justify-content: center;
      padding: $tp-transaction-line-side-panel-panel-nav-bar-padding;
      border-color: $tp-transaction-line-side-panel-panel-nav-bar-border-color;
      border-style: solid;
      border-width: $tp-transaction-line-side-panel-panel-nav-bar-border-width;
      .co-transaction-button-bar {
        padding: 0;
        .button-title {
          font-size: 9px;
        }
        .co-transaction-button-bar-button {
          .button-wrapper {
            .co-animated-checkbox {
              right: -5px;
            }
          }
        }
      }
    }

    .total-amount {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-weight: bold;
      padding: $tp-transaction-line-side-panel-panel-nav-bar-padding;
      border-color: $tp-transaction-line-side-panel-panel-nav-bar-border-color;
      border-style: solid;
      border-width: $tp-transaction-line-side-panel-panel-nav-bar-border-width;
    }

    .transaction-line-side-panel-content {
      display: flex;
      flex-direction: column;
      flex-basis: 100%;
      overflow-y: auto;
      overflow-x: hidden;
      .form-and-buttons {
        background-color: $tp-transaction-line-side-forms-buttons-background;
        padding: $tp-transaction-line-side-forms-buttons-padding;
        border-color: $tp-transaction-line-side-forms-buttons-border-color;
        border-width: $tp-transaction-line-side-forms-buttons-border-width;
        border-style: solid;
        display: flex;
        flex-direction: column;
        gap: 30px;
        .co-input-text {
          &:not(.no-style):before {
            box-shadow: none;
          }
          &:hover {
            &:not(.no-style):before {
              box-shadow: $tp-transaction-line-side-forms-input-box-shadow;
            }
          }
        }
        .co-input-number-picker {
          &:before {
            box-shadow: none;
          }
          &:hover {
            &:before {
              box-shadow: $tp-transaction-line-side-forms-input-box-shadow;
            }
          }
          .co-button {
            background-color: $tp-transaction-line-side-forms-button-background;
            cursor: pointer;
            &:hover {
              filter: none;
              co-icon [fill] {
                fill: $tp-transaction-line-side-forms-button-icon-hover-color;
              }
            }
          }
        }
        .co-collapsible {
          padding: $tp-transaction-line-side-forms-collapsible-padding;
        }
        .co-form {
          display: flex;
          flex-direction: column;
          gap: $tp-transaction-line-side-forms-co-form-gap;
        }

      }
      .status-header {
        display: none;
        align-items: center;
        justify-content: flex-end;
        width: 100%;
        gap: $tp-transaction-line-side-panel-status-header-gap;
        span {
          font-size: $tp-transaction-line-side-panel-status-header-font-size;
          font-weight: $tp-transaction-line-side-panel-status-header-font-weight;
        }
        .co-statusbar-wrapper {
          min-width: 0;
        }
      }
      .history-grid-wrapper {
        padding: $tp-transaction-line-side-history-grid-padding;
      }
    }
    .side-panel-input-row {
      display: flex;
      flex-direction: row;
      grid-column-gap: $tp-transaction-line-side-panel-input-row-gap;
      column-gap: $tp-transaction-line-side-panel-input-row-gap;

      .side-panel-input {
        border-width: $tp-transaction-line-side-panel-input-border-width;
        border-style: solid;
        border-color: $tp-transaction-line-side-panel-input-border-color;
        border-radius: $tp-transaction-line-side-panel-input-border-radius;
        background-color: $tp-transaction-line-side-panel-input-background-color;
        flex: 1;
      }
    }
    .save-cancel-wrapper {
        width: 100%;
        display: flex;
        margin: $tp-transaction-line-side-panel-save-cancel-wrapper-margin;
        justify-content: center;
        column-gap: $tp-transaction-line-side-panel-save-cancel-wrapper-gap;

        co-button {
          height: auto;
          width: auto;
          background-color: $tp-transaction-line-side-panel-save-button-background-color;
          -webkit-box-shadow: $tp-transaction-line-side-panel-save-cancel-buttons-box-shadow;
          -moz-box-shadow: $tp-transaction-line-side-panel-save-cancel-buttons-box-shadow;
          box-shadow: $tp-transaction-line-side-panel-save-cancel-buttons-box-shadow;
          cursor: pointer;

          &:not(.circle) {
            padding: $tp-transaction-line-side-panel-save-cancel-buttons-padding;
          }

          &.cancel-button {
            background-color: $tp-transaction-line-side-panel-cancel-button-background-color;
            co-icon {
              svg { // for fontawesome icons
                fill: $tp-transaction-line-side-panel-save-cancel-buttons-fill;
              }
              & [fill] { // for own icons
                fill: $tp-transaction-line-side-panel-save-cancel-buttons-fill;
              }
            }
          }
        }

        co-icon {
          width: $tp-transaction-line-side-panel-save-cancel-buttons-size;
          height: $tp-transaction-line-side-panel-save-cancel-buttons-size;
          svg { // for fontawesome icons
            fill: $tp-transaction-line-side-panel-save-cancel-buttons-fill;
          }
          & [fill] { // for own icons
            fill: $tp-transaction-line-side-panel-save-cancel-buttons-fill;
          }
        }
      }
    .hidden {
      visibility: hidden;
    }
    .details-header {
      font-size: 14px;
      font-weight: bold;
      color: #171721;
    }
    .collapsible-header {
      padding: 0;
    }
    .co-transaction-button {
      height: $cc-item-size;
    }
    .co-transaction-button-bar {
      .button-wrapper {
        background: $tp-transaction-line-side-panel-background;
      }
    }
    .co-simple-grid {
      .simple-grid-column-header {
        background: $tp-transaction-line-side-panel-background;
        vertical-align: $tp-transaction-line-side-history-grid-header-vertical-align;
        .simple-grid-column-header-label {
          background: $tp-transaction-line-side-panel-background;
          border-color: $tp-transaction-line-side-panel-background;
          white-space: $tp-transaction-line-side-history-grid-header-white-space;
          word-wrap: $tp-transaction-line-side-history-grid-header-word-wrap;
          font-size: $tp-transaction-line-side-history-grid-header-font-size;
          font-weight: $tp-transaction-line-side-history-grid-header-font-weight;
        }
      }
      .simple-grid-column-cell {
        height: 45px;
      }
      .simple-grid-row {
        border-width: 0 0 5px 0;
        border-color: $tp-transaction-line-side-panel-background;
      }
    }
    .line-side-panel-content-wrapper {
      display: flex;
      flex-direction: column;
      gap: $tp-transaction-line-side-panel-content-wrapper-gap;
    }
    .line-side-panel-content {
      display: flex;
      flex-direction: column;
      gap: $tp-transaction-line-side-panel-content-gap;
      .inside-field {
        position: relative;
        height: $tp-transaction-line-side-panel-inside-field-height;
        display: flex;
        align-items: center;
        width: $tp-transaction-line-side-panel-inside-field-width;
        justify-content: center;
        .co-input-number-picker, .co-input-text {
          height: $tp-transaction-line-side-panel-inside-field-height;
          width: $tp-transaction-line-side-panel-inside-field-width;
          input {
            text-align: center;
            padding: $tp-transaction-line-side-panel-inside-field-input-padding;
            width: $tp-transaction-line-side-panel-inside-field-width;
          }
        }
        span {
          text-align: center;
        }
        .co-transaction-button {
          width: 100%;
          height: 100%;
          border: none;
          .transaction-button-icon-wrapper {
            display: none;
          }
        }
      }
    }
    .line-side-panel-header {
      font-size: $tp-transaction-line-side-panel-header-font-size;
      font-weight: $tp-transaction-line-side-panel-header-font-weight;
    }
    .simple-grid-table {
      table-layout: auto;
      .simple-grid-row {
        background: $tp-transaction-line-side-panel-simple-row-background;
        border-radius: $tp-transaction-line-side-panel-simple-row-border-radius;
        height: $tp-transaction-line-side-panel-simple-row-height;
        position: relative;
        &.disabled {
          .icons-container {
            display: none;
          }
        }
        .icons-container {
          position: absolute;
          right: 0;
        }
      }
      .simple-grid-column-cell-field {
        border-width: $tp-transaction-line-side-panel-simple-grid-border-width;
        background: $tp-transaction-line-side-panel-simple-grid-background;
        font-size: $tp-transaction-line-side-panel-simple-grid-font-size;
        padding: $tp-transaction-line-side-panel-simple-grid-padding;
        border-radius: $tp-transaction-line-side-panel-simple-grid-border-radius;
      }
    }
  }
}
