@import "../../../../themes/color.scss";
@import "../../../../themes/core/scrollbar.scss";
@import "../../../../themes/core/button.scss";

.qmslib__related__popup__container {
  .input__field {
    display: flex;
    align-items: center;

    input {
      width: 100%;
      padding: 10px;
      outline: none;
      border: none;
      background: $background-input-text;
    }

    .mat-icon {
      margin-left: -30px;
      cursor: pointer;
      vertical-align: middle;
    }
  }

  .line__divider {
    border-bottom: 1px solid #ccc;
    height: 1px;
    margin-top: 10px;
    min-width: 300px;
    max-width: 100%;
  }

  .button__close {
    float: right;
    top: -24px;
    right: -24px;
    cursor: pointer;
  }

  .panel__content {
    height: 450px;
    overflow: auto;
    margin-top: 12px;
  }

  .panel__content_item {
    height: 350px;
    overflow: auto;
    margin-top: 12px;
  }

  .panel-tree {
    .mat-expansion-panel-body {
      padding: 0 12px 12px;
    }
  }

  .mat-expansion-panel-header {
    height: 30px;
    font-size: 12px;
    letter-spacing: 1px;
    font-family: 'Raleway';
    font-weight: 600;
    padding: 0;

    .mat-expansion-panel-header-title {
      align-items: center;
      margin-left: 12px;
    }

    .related_popup_toggle-btn {
      width: 1.5rem;
      height: 1.5rem;
      line-height: 1.5rem;
    }
  }

  .mat-expansion-panel:not([class*="mat-elevation-z"]) {
    box-shadow: none;
  }

  .panel__item {
    height: 100px;
    margin-top: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 5px;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;

    .related__item__inline {
      max-width: 100%;
    }

    .related__item__content {
      height: 32px;
      line-height: 32px;
      background-color: $related-item-background;
      max-width: 100%;
      margin-bottom: 5px;
      margin-left: 2.5px;
      margin-right: 2.5px;

      .mat-icon {
        color: $related-mat-icon-color;
        font-size: 24px;
      }

      span.related__item__content_name {
        display: inline-block;
        min-width: calc(100% - 13px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 278px;
      }
    }
  }

  .qmslib-related-popup-splitview{
    background-color: white;
    border-left: 1px solid #ccc;
    height: 450px;
    overflow-y: auto;
    margin-top: 12px;
    
    &.panel__content {
      height: 450px;
      overflow: auto;
      margin-top: 12px;
    }
  
    &.panel__content_item {
      height: 350px;
      overflow: auto;
      margin-top: 12px;
    }

    .splitview-header{
      height: 30px;
      font-size: 12px;
      letter-spacing: 1px;
      font-family: "RALEWAY";
      font-weight: 600;    
      display: flex;
      align-items: center;
    }

    .mat-checkbox.qms-group-options {
      padding: 0px;
    }

    .mat-checkbox.qms-group-options .mat-checkbox-inner-container {
      margin-right: 11px;
    }

    .mat-checkbox.qms-group-options.mat-checkbox-checked {
      background: transparent !important;
    }

    .expand-node {
      margin-left: 8px;
      display: flex;
      align-items: center;
      min-height: 40px;
  
      .mat-icon {
        color: black(0.6);
        margin-right: 17px;
        min-width: fit-content;
  
        svg {
          display: block;
          min-width: fit-content;
        }
      }
    }
  }
}

cdk-virtual-scroll-viewport {
  overflow-x: hidden;
  .search__module-result {
    margin: 1.5rem;
    padding: 0 0 0.5rem 0px;
    .search__module-title {
      font-size: 14px;
      font-weight: 600;
    }

    .search__option {
      height: auto;
      line-height: normal;
      padding: 8px 0;
      border-bottom: 1px solid #e0e0e0;

      .qms-list-item.mat-2-line.image-item {
        height: auto;
      }
      .qms-list-item-content {
        margin: 0;
        border-bottom: none;
        .wrap-image.image-square {
          width: 2.5rem;
          height: 100%;
          background: transparent;
          align-self: center;
          margin-right: 0;
          img {
            width: 24px;
            height: 24px;
          }
        }

        .material-icons-outlined.leading-icon,
        mat-icon.leading-icon {
          padding: 4px 0 4px 4px;
        }

        .subtitle {
          font-weight: 400;
        }

        .caption {
          overflow: hidden;
          line-height: normal;
          white-space: normal;
          text-overflow: ellipsis;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
          padding: 0;
          margin: 0;

          span.search__result__parent-name {
            display: inline-block;
            width: auto;
            width: calc(100% - 13px);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }
        }

        .default-subtitle {
          color: rgba($color: #000000, $alpha: 0.38);
        }

        .search__description-icon {
          margin-right: 0px;
          width: 12px;
          height: 12px;
          font-size: 12px;
        }

        .qms-list-text {
          border-bottom: none;
        }

        .breadcrumb-containe {
          .qms-breadcrumb-item {
            .mat-icon {
              font-size: 16px!important;
              padding-bottom: 1px;
          }
          }
        }
      }
    }


    .mat-option[aria-disabled=true] {
      $disabled-color: rgba($color: #000000, $alpha: 0.38);

      .subtitle {
        color: $disabled-color;
      }

      .breadcrumb-containe {
        .qms-breadcrumb-item {
          .mat-icon {
            color: $disabled-color;
          }
        }

        .qms-breadcrumb-item-text {
          color: $disabled-color;
        }
      }
    }

    svg {
      display: block;
    }
  }
}

#qmslib_related_popup_header_001 {
  margin-bottom: 20px;
  padding: 0;
  font-weight: 600;
  font-family: "Raleway";
}

.padding-5 {
  padding: 5px;
}

.mat-autocomplete_related-viewport {
  height: 100%;
  max-height: 100% !important;
  .cdk-virtual-scroll-content-wrapper {
    width: 100%;
  }
  .related-viewport {
    min-height: 300px;
  }
}
