/*******************************
            Search results
*******************************/

.simple-item-extra {
  font-size: 90%;
}

.array-string-item {
  padding-right: 0.6em;
}

/*---------------------
    Listing view 
  -----------------------*/

.searchlib-block .result-item {
  .listing-header {
    overflow: inherit;
  }

  .slot-head {
    display: flex;
    flex-direction: row;

    .listing-header {
      display: flex;

      .ui.label {
        margin: 0 0.5em;
        font-size: 0.75rem;
      }
    }
  }

  .listing-item a,
  .listing-header a {
    display: inline-block;

    .ui.label.new-item,
    .ui.label.archived-item {
      display: inline-block;
      padding: 0.3em 0.6em;
      border-radius: 0.25em;
      margin-top: -2px;
      margin-left: 0.7em !important;
      background-color: @mediumGray;
      color: @lighterBlack;
      font-size: 13px;
      font-weight: normal;
      line-height: 1;
      text-align: center;
      vertical-align: middle;
      white-space: nowrap;
    }
  }

  .slot-bottom {
    margin-top: auto;
  }

  .result-bottom {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 4em;
    row-gap: 1em;

    @media only screen and (max-width: @largestMobileScreen) {
      flex-direction: column;
      gap: 0;

      .result-info {
        align-items: flex-start;
      }
    }
  }

  .result-source {
    margin-top: 1em;
  }

  .result-info {
    display: flex !important;
    color: @grey;
    font-size: 14px;
    gap: 0.5em;

    a {
      display: block;
    }
  }

  .result-info-title {
    color: @deepBlue;
    font-weight: 700;
  }
}

.tags-wrapper {
  display: flex;
  flex-direction: row;

  .tags {
    justify-content: flex-start;
    margin-right: 0.5em;
    color: @grey;
    font-size: 14px;
    gap: 0.2rem;

    i.icon {
      margin: 0;
    }

    .fileformat-icon {
      display: inline-block;
      padding: 0 3px;
      border: 1px solid @sf-medium-gray;
      margin-left: 0.5em;
      color: @sf-medium-gray2;
      font-size: xx-small;
      line-height: 1.5em;
    }
  }
}

/*---------------------
    Cards view  
  -----------------------*/

body.searchlib-page {
  .searchlib-block {
    .ui.four.cards {
      .ui.card.card-item {
        width: unset;
        min-width: 200px;
        flex-basis: 200px;
        flex-grow: 1;
        border: 1px solid @sf-light-gray2;
        border-radius: 0;
        font-size: 12px;

        &.hovered {
          a.image {
            height: 80px;
          }

          .content {
            max-height: 13.5em;

            .description {
              max-height: 7em;
            }
          }

          .controls {
            display: block;
          }
        }

        .content {
          overflow: hidden;
          max-height: 8em;

          .description {
            overflow: hidden;
            max-height: 4em;
          }

          .meta {
            overflow: hidden;
            white-space: nowrap;
          }
        }

        .content,
        .content p,
        .meta {
          font-size: inherit;
        }

        a {
          color: @linkColor;

          &:hover {
            color: @linkColor;
          }
        }

        .extra.content {
          border-top: 1px solid @dimmedDarkBlueBlack !important;
        }

        .meta {
          margin: 0;
          color: @midDimmedBlack;
        }

        .header {
          padding-top: 10px;

          a {
            font-size: 12px;
            font-weight: 500;
          }
        }

        .description {
          font-size: 12px;
        }

        a.image {
          height: 150px;
          background-position: center;
          background-size: cover;

          img {
            display: none;
          }
        }

        .label.meta-type {
          position: absolute;
          z-index: 2;
          border-radius: 0px !important;
          margin-top: 30px;
          background-color: @marineBlue;
          border-bottom-right-radius: 5px !important;
          border-top-right-radius: 5px !important;
          color: @white;
          font-size: 12px;
        }

        .header {
          padding-top: 0.8em;
        }

        // .controls {
        //   display: none;

        //   .meta {
        //     display: flex;
        //     align-items: center;

        //     button {
        //       font-size: 10px;
        //     }

        //     a {
        //       margin-left: 5px;
        //     }
        //   }

        //   .card-icons {
        //     margin-left: auto;
        //   }

        //   .card-icon {
        //     width: 20px;
        //     height: 20px;
        //     background: #fff;
        //     background-size: 100%;
        //     border-radius: 50%;

        //     i.icon {
        //       position: relative;
        //       top: 3px;
        //       font-size: 14px;
        //     }
        //   }
        // }
      }
    }
  }
}

/*---------------------
    Results modal  
  -----------------------*/

.listing-view-item.header {
  cursor: pointer;
}

.listing-view-details {
  .listing-view-details-section {
    padding: 1em 0em;

    .details-field {
      display: flex;
      border-bottom: 1px solid @sf-medium-gray;
      font-size: medium;

      .details-field-label {
        width: 25%;
        padding: 0.3em 1em 0.3em 0.3em;
        border-right: 1px solid @sf-medium-gray;
        background: @greyWhite;
        font-weight: bold;
      }

      .details-field-value {
        width: 75%;
        padding: 0.3em 0.3em 0.3em 1em;
        background: @grey-1;
        white-space: pre-wrap;
      }
    }
  }
}

.fragment em {
  font-style: normal;
  font-weight: bold;
}
