@import '../../../ui/mixins';

aca-search-results {
  .aca-search-results-active-search-ai-input {
    .aca-header-container,
    .adf-search-results__content-header.aca-content {
      display: none;
    }
  }

  .aca-search-toolbar-spacer {
    width: 100%;
  }

  .adf-search-results {
    @include flex-row;

    &__facets {
      display: flex;
      flex-direction: row;
      margin-top: 5px;
      margin-bottom: 15px;
    }

    &__content {
      @include flex-column;

      border-left: 1px solid var(--theme-border-color);
    }

    &__content-header {
      display: flex;
      padding: 0 25px;
      flex-direction: row;
      align-items: center;
      border-top: 1px solid var(--theme-border-color);
      border-bottom: 1px solid var(--theme-border-color);

      .aca-content__advanced-filters {
        /* stylelint-disable-next-line */
        .mat-mdc-chip-action {
          padding-left: 12px;
          padding-right: 12px;
        }

        /* stylelint-disable-next-line */
        .mdc-evolution-chip__text-label {
          color: var(--theme-selected-text-color);
        }

        .adf-search-filter-chip,
        .adf-search-filter-chip-tabbed {
          background-color: var(--theme-dropdown-color);
          color: var(--theme-selected-text-color);
          height: 32px;
          margin-top: 4px;
          margin-bottom: 4px;
          box-sizing: border-box;

          &:hover,
          &:focus {
            background-color: var(--theme-dropdown-background-hover);
          }

          &[disabled] {
            background-color: var(--theme-disabled-chip-background-color);
            color: var(--theme-search-chip-icon-color);
          }

          .adf-search-filter-chip-icon {
            color: var(--theme-search-chip-icon-color);
          }
        }

        .adf-search-filter-placeholder {
          color: var(--theme-selected-text-color);
        }
      }
    }

    &--info-text {
      flex: 1;
      font-size: 16px;
      color: rgba(0, 0, 0, 0.54);
    }

    &--embedded_viewer {
      position: unset;
      display: flex;
      width: 100%;
    }

    &--right_panel_section {
      display: flex;
      justify-content: flex-start;
    }

    &--right_panel_section-extended {
      display: flex;
      justify-content: flex-start;
      flex-basis: 55%;

      .adf-viewer {
        position: relative;
      }
    }

    &--preview-toolbar {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      margin: 5px;
      padding-right: 24px;
    }

    &--visibility_button {
      margin-right: 8px;
      cursor: default;
    }

    .adf-search-filter {
      min-width: 260px;
      max-width: 320px;
      padding: 5px;
      height: 100%;
      overflow: scroll;

      &--hidden {
        display: none;
      }
    }

    .aca-content {
      box-sizing: border-box;
      display: flex;
      place-content: flex-start space-between;
      align-items: flex-start;
      padding: 16px 12px;
      background-color: var(--theme-card-background-color);

      &__filter-set {
        p {
          padding: 0 16px;
        }
      }

      &__divider-vertical {
        height: 100%;
      }

      &__divider-horizontal {
        width: 100%;
      }

      &__advanced-filters {
        width: 100%;
        padding: 0 12px;

        &--header {
          display: flex;
          justify-content: space-between;

          &--action-buttons {
            display: flex;
          }
        }
      }

      &__reset-action,
      &__save-search-action {
        margin-top: 5px;
        margin-right: 2px;
        line-height: 33px;
        font-weight: lighter;
      }

      &__sort-picker {
        min-width: 220px;
      }
    }

    .adf-datatable {
      aca-search-action-menu button {
        width: 0;
      }

      .aca-location-link a {
        font-size: 12px;
        max-width: 350px;
        text-align: left;
        direction: rtl;
      }
    }
  }

  @media (max-width: 320px) {
    .adf-search-results__content-header {
      flex-direction: column;
    }

    .adf-search-results__content {
      overflow-y: auto;
    }

    .adf-document-list {
      min-height: unset;
    }
  }
}
