@import "../../../../style/mixin";

@include export-module('co-transaction-article-text-layout') {
  .co-transaction-article-text {
    font-size: $tp-co-transaction-article-text-font-size;
    .co-dialog {
      .co-dialog-wrapper {
        background-color: $tp-co-transaction-article-text-dialog-background;
        max-height: 90vh;
        width: 650px;
      }
      .dialog-header {
        background-color: $tp-co-transaction-article-text-dialog-background;
      }
      .dialog-content {
        background-color: $tp-co-transaction-article-text-dialog-background;
        overflow-x: hidden;
        padding: $tp-co-transaction-article-text-dialog-content-padding;
      }
    }
    .transaction-article-text-dialog-header-wrapper {
      display: flex;
      align-items: center;
      grid-column-gap: $tp-co-transaction-article-text-dialog-header-gap;
      column-gap: $tp-co-transaction-article-text-dialog-header-gap;
      .co-icon {
        height: $tp-co-transaction-article-text-dialog-header-icon-size;
        width: $tp-co-transaction-article-text-dialog-header-icon-size;
        margin: 0;
      }
      .co-dialog-header-title {
        margin: 0;
      }
    }

    .article-text-content-wrapper {
      display: flex;
      flex-direction: column;
      column-gap: $tp-co-transaction-article-text-dialog-content-gap;
      textarea {
        font-family: $tp-co-transaction-article-text-font-family;
        min-height: $tp-co-transaction-article-text-dialog-content-textarea-height;
        &:focus {
          outline: none;
        }
        &:read-only {
          opacity: $tp-co-transaction-article-text-readonly-opacity;
        }
      }
    }
    .editor-wrapper {
      display: flex;
      position: relative;
      margin: $tp-co-transaction-article-text-dialog-content-editor-margin;
      width: 100%;
      min-height: $tp-co-transaction-article-text-dialog-content-editor-min-height;
      .co-input-textarea {
        width: 100%;
        display: none;
        &.active {
          display: block;
        }
        label {
          top: 5px;
          transform: scale(0.92);
        }
        textarea {
          padding: $tp-co-transaction-article-text-dialog-content-editor-textarea-padding;
        }
      }
      .wysiwyg-editor-wrapper {
        width: 100%;
        display: none;
        height: 100%;
        background: #FFF;
        .wysiwyg-editor {
          padding: $tp-co-transaction-article-text-dialog-content-editor-wysiwyg-padding;
          border: none;
          min-height: $tp-co-transaction-article-text-dialog-content-editor-min-height;
          &:focus {
            outline: none;
            box-shadow: none;
            border-color: transparent;
          }
          p {
            margin-bottom: 5px;
          }
        }
        &.active {
          display: block;
        }
        label {
          font-size: $tp-co-transaction-article-text-dialog-content-editor-label-font-size;
          position: relative;
          top: 5px;
          padding: 10px;
        }
      }
      .change-editor {
        position: absolute;
        right: 0;
        top: 0;
        z-index: 2;
        background: #FFF;
        padding: 5px;
        cursor: pointer;
        co-icon {
          width: 20px;
          height: 20px;
        }
        &.raw-active {
          background: #1a73e8;
          svg {
            fill: #FFF;
          }
        }
      }
    }

    .option-wrapper {
      position: relative;
      display: flex;
      flex-direction: column;
      row-gap: $tp-co-transaction-article-text-options-row-gap;
      width: 100%;
      flex-shrink: 0;
      .article-text-documents-header-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: $tp-co-transaction-article-text-documents-header-margin;
      }
      .select-all-checkbox {

      }
      .article-text-documents-wrapper {
        display: flex;
        flex-wrap: wrap;
        row-gap: $tp-default-row-gap;
        & > * {
          width: calc(100% / 3);
        }
      }
    }

    .button-wrapper {
      display: flex;
      flex-direction: row;
      justify-content: flex-end;
      padding: 10px;
      column-gap: 5px;
    }

    .bold {
      font-weight: bold;
    }

    .co-transaction-line-image-and-description {;
      display: flex;

      .description-wrapper {
        padding: 5px;
        border-radius: 5px;
      }
    }

    .standard-texts-dropdown-wrapper {
      height: 50px;

      co-drop-down-list {
        border: none;
      }
    }

    .order-line-set-fields-wrapper {
      display: flex;
      flex-direction: column;
      row-gap: $tp-co-transaction-article-text-order-line-set-gap;
      padding: $tp-co-transaction-article-text-order-line-set-padding;
      .order-line-set-inputs-wrapper {
        display: flex;
        flex-direction: row;
        column-gap: $tp-co-transaction-article-text-order-line-set-gap;
        justify-content: space-between;
        & > * {
          flex: 1;
        }
        .co-color-picker {
          display: flex;
          justify-content: center;

          input {
            width: $tp-co-transaction-article-text-order-line-set-color-size;
            height: $tp-co-transaction-article-text-order-line-set-color-size;
            cursor: pointer;
          }
        }
        &.show-lines {
          .co-input-text, .co-list-of-values {
            flex: 2;
          }
        }
      }
    }

    .dialog-label,
    .e-ddl.e-lib.e-input-group.e-control-wrapper.e-float-input .e-float-text.e-label-top,
    .co-input-listbox .co-input-listbox-header {
      font-weight: bold;
      color: $tp-color-label;
    }
    .co-list-of-values, .co-input-text, co-input-textarea {
      &:before {
        display: none;
      }
    }
    .co-input-checkbox {
      .checkbox {
        border-color: $tp-co-transaction-article-text-popup-co-input-checkbox-border-color;
        background-color: $tp-co-transaction-article-text-popup-co-input-checkbox-background-color;
        &.checked {
          border-color: $tp-co-transaction-article-text-popup-co-input-checkbox-checked-border-color;
          background-color: $tp-co-transaction-article-text-popup-co-input-checkbox-checked-background-color;
        }
        .checkmark {
          &.show {
            border-color: $tp-co-transaction-article-text-popup-co-input-checkbox-border-color;
          }
        }
      }
    }
    .save-button {
      height: $tp-co-transaction-article-text-popup-save-button-size;
      width: $tp-co-transaction-article-text-popup-save-button-size;
      border-color: $tp-co-transaction-article-text-popup-button-border-color;
      border-style: $tp-co-transaction-article-text-popup-button-border-style;
      border-width: $tp-co-transaction-article-text-popup-button-border-width;
      background-color: $tp-co-transaction-article-text-popup-button-background-color;
      padding: $tp-co-transaction-article-text-popup-button-padding;
      box-shadow: $tp-co-transaction-article-text-popup-button-box-shadow;
      cursor: pointer;
      .co-icon {
        height: $tp-co-transaction-article-text-popup-save-button-icon-size;
        width: $tp-co-transaction-article-text-popup-save-button-icon-size;
        svg {
          fill: $tp-co-transaction-article-text-popup-save-button-icon-color;
        }
      }
    }
    .dialog-footer {
      background-color: $tp-co-transaction-article-text-dialog-background;
      border-width: $tp-co-transaction-article-text-popup-dialog-footer-border-width;
      border-style: solid;
      border-color: $tp-co-transaction-article-text-popup-dialog-footer-border-color;
      padding: $tp-co-transaction-article-text-popup-dialog-footer-padding;
      .co-dialog-footer-button-wrapper {
        gap: $tp-co-transaction-article-text-popup-dialog-footer-button-wrapper-gap;
      }
    }
    .close-button {
      height: $tp-co-transaction-article-text-popup-close-button-size;
      width: $tp-co-transaction-article-text-popup-close-button-size;
      border-color: $tp-co-transaction-article-text-popup-button-border-color;
      border-style: $tp-co-transaction-article-text-popup-button-border-style;
      border-width: $tp-co-transaction-article-text-popup-button-border-width;
      background-color: $tp-co-transaction-article-text-popup-close-button-background-color;
      padding: $tp-co-transaction-article-text-popup-button-padding;
      box-shadow: $tp-co-transaction-article-text-popup-button-box-shadow;
      cursor: pointer;
      .co-icon {
        height: $tp-co-transaction-article-text-popup-save-button-icon-size;
        width: $tp-co-transaction-article-text-popup-save-button-icon-size;
        svg {
          fill: $tp-co-transaction-article-text-popup-save-button-icon-color;
        }
        [fill] {
          fill: $tp-co-transaction-article-text-popup-save-button-icon-color;
        }
      }
    }
  }
}
