@import url("/assets/companion_window-96bf7d18.css");
@import url("/assets/common-13c5bbb7.css");

.text-gray {
  color: gray;
}

#sul-embed-min_files_to_search {
  width: 2em;
  padding: 0;
  margin: 0;
}

.search-query-form {
  border: 1px solid #ababa9;
  border-radius: 0.25rem;
  padding: 0.25rem;
  margin-inline-start: 1rem;
  margin-inline-end: 0.3rem;
  display: flex;

  svg {
    vertical-align: middle;
    color: var(--button-color);
  }

  .search-input {
    border: 0;
    &:focus-visible {
      outline: 0;
    }
  }
}

.item-count {
  font-size: 0.875rem;
  white-space: nowrap;
}

/* Collapse/expand icons */
.sul-embed-treegrid {
  width: 100%;
  border-collapse: collapse;

  th {
    font-weight: normal;
    text-align: left;
  }

  th {
    &:nth-of-type(2) {
      border-inline: 1px solid var(--border-color);
    }
  }

  th,
  td {
    a {
      text-decoration: none;
    }

    /* size */
    &:nth-of-type(2) {
      padding-inline: 1rem;
    }
  }

  th,
  td {
    &:nth-of-type(3) {
      padding-inline-start: 3rem;
    }
  }

  tr {
    display: table-row;
    cursor: default;
    border-bottom: 1px solid var(--border-color);
  }

  thead tr th:first-of-type {
    padding-left: 2.1rem;
  }

  col.sul-embed-treegrid-size {
    width: 15%;
  }
  col.sul-embed-treegrid-download {
    width: 28%;
  }

  /* Extra space between columns for readability */
  th,
  td {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  tr[hidden] {
    display: none !important;
  }

  tr > td:first-child::before {
    transition: transform 0.3s;
    margin-left: 5px;
  }

  tr[aria-expanded] > td:first-child,
  td[aria-expanded]:first-child {
    &::before {
      content: "";
      cursor: pointer;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' class='MuiSvgIcon-root' focusable='false' aria-hidden='true' viewBox='0 0 24 24'%3E%3Cpath d='M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z'%3E%3C/path%3E%3C/svg%3E");
      background-repeat: no-repeat;
      height: 1.5rem;
      width: 1.5rem;
      display: inline-block;
      vertical-align: middle;
      flex-shrink: 0;
    }
    font-weight: bold;
  }

  tr[aria-expanded="true"] > td:first-child::before,
  td[aria-expanded="true"]:first-child::before {
    transform: rotate(90deg);
  }

  tbody > tr {
    border: 0
  }

  /* Zebra stripes for file row */
  tbody > tr:nth-child(even of :not([hidden])) {
    background-color: rgba(244, 244, 244, 0.7);
  }
  
  .folder-title {
    display: flex;
    align-items: flex-start;
    min-height: 38px;
    svg {
      margin-left: 0.25rem;
      flex-shrink: 0;
    }
    .foldername {
      margin-left: 0.25rem;
      align-self: center;
    }
  }

  .sul-embed-filename-cell,
  .folder-title {
    font-size: 1rem;

    svg {
      fill: var(--button-color);
      width: 1.5rem;
      height: 1.5rem;
      display: inline-block;
    }
  }

  .sul-embed-filename-cell {
    display: flex;
    padding-right: 10px;

    .tree-label {
      font-size: 0.875rem;
      margin: 0;
    }
  }
}

/* Display this background if the number of rows in the file contents table is odd */
.stripes-background-odd {
  background: repeating-linear-gradient(rgba(244, 244, 244, 0.7),rgba(244, 244, 244, 0.7) 38px,#fff 38px,#fff 76px)
}

/* Display this background if the number of rows in the file contents table is even */
.stripes-background-even {
  background: repeating-linear-gradient(#fff,#fff 38px,rgba(244, 244, 244, 0.7) 38px,rgba(244, 244, 244, 0.7) 76px)
}

.sul-embed-downloads svg {
  vertical-align: middle;
}

.download-icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  fill: var(--link-color);
  vertical-align: bottom;
}
