.controls {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  margin-bottom: 20px;
}

.controls-row {
  display: flex;
  width: 100%;
  gap: 10px;
}

.search {
  border-radius: 200px;
  border: 1px solid rgb(177, 177, 177);
  height: 40px;
  padding: 3px 15px;
}
.sort-dropdown {
  position: relative;
  display: inline-block;
}
.sort-dropdown button {
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 200px;
  border: none;
  color: #04132b;
  font-family: "Noto Serif";
  font-size: 17px;
  background-color: white;
}
.sort-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 100%;
  left: 0;
  background: #f5f5f5;
  border-left: 2px solid #7891ad;
  box-shadow: 2px 5px 5px rgba(0, 0, 0, 0.13);
  color: rgb(26, 26, 26);
  width: max-content;
  z-index: 10;
  font-family: "Noto Sans", sans-serif;
  font-size: 15px;
}
.sort-dropdown ul li {
  padding: 10px 10px;
  cursor: pointer;
}
.sort-dropdown ul li:hover {
  color: #2f557f;
}
.hidden {
  display: none;
}
.download-btn {
  margin-left: auto;
  padding: 8px 12px;
  background-color: #2f557f;
  color: white;
  text-decoration: none;
  border-radius: 200px;
  font-family: "Noto Sans", sans-serif;
  font-size: 15px;
}
.download-btn:hover {
  background-color: #04132b;
}

.documents-header,
.documents-row {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 59px 2px 1fr 2px 150px 2px 100px 2px 100px 2px 100px;
}

.presentation,
.text,
.notes,
.music {
  text-align: center !important;
}

.title {
  padding-left: 30px !important;
}

/* Header gets top/left/right border, rounded top only */
.documents-header {
  background: #2f557f;
  color: white;
  font-family: "Noto Serif";
  font-weight: bold;
  border: 2px solid #2f557f;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  margin-bottom: 0;
  align-items: center;
}

.documents-header .cell {
  padding: 8px 10px;
  text-align: left;
  border-right: none;
  font-family: "Noto Serif";
}

.documents-row {
  align-items: center;
  gap: 0;
  font-family: "Noto Sans", sans-serif;
  background: white;
  border-left: 2px solid #2f557f;
  border-right: 2px solid #2f557f;
  border-radius: 0 0 0 0;
}

.documents-row:last-child {
  border-radius: 0 0 8px 8px;
  border-bottom: 2px solid #2f557f;
}

.documents-row.last-visible {
  border-radius: 0 0 8px 8px;
  border-bottom: 2px solid #2f557f;
}

.documents-row .cell {
  padding: 8px 10px;
  border-right: none;
  border-bottom: none;
  background: none;
  display: flex;
  align-items: center;
}

.disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

.documents-row .cell.number {
  font-family: "Noto Sans", sans-serif;
}
.documents-row .cell.title {
  font-family: "Noto Sans", sans-serif;
}
.documents-row .cell.presentation,
.documents-row .cell.text,
.documents-row .cell.notes,
.documents-row .cell.music {
  justify-content: center;
}

.documents-header .line {
  width: 2px;
  height: 50%;
  background-color: #ffffff;
  opacity: 50%;
}

.documents-row:nth-child(odd) {
  background-color: white;
  color: black;

  .line {
    width: 2px;
    height: 50%;
    background-color: #7891ad;
    opacity: 50%;
  }
}

.documents-row:nth-child(even) {
  background-color: #a7bacf;
  color: white;

  .line {
    width: 2px;
    height: 50%;
    background-color: #ffffff;
    opacity: 50%;
  }
}

.file-icon {
  width: 24px;
  height: auto;
}

@media (width > 800px) {
  .line-mobile {
    display: none;
  }
}

@media (max-width: 800px) {
  .line {
    display: none;
  }

  .controls {
    display: block;
    width: 100%;
  }

  .search {
    width: 100%;
    margin-bottom: 10px;
  }

  .controls-row {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 10px;
  }

  .controls-row > .sort-dropdown {
    width: 50%;
  }

  .controls-row > .download-btn {
    width: 161px !important;
    min-width: 161px !important;
    margin-right: 0;
  }

  .documents-header {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
  }

  .documents-row {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
  }

  .documents-header .cell.number {
    margin-left: 10px;
  }
  .documents-row .cell.number {
    grid-column: 1 / 0.1;
    grid-row: 1;
    margin-left: 10px;
  }
  .documents-row .cell.title {
    grid-column: 2 / 5;
    grid-row: 1;
  }

  .documents-header .line-mobile {
    grid-column: 1 / 5;
    grid-row: 2;
    width: 95%;
    margin: 0px auto;
    height: 3px;
    background-color: #ffffff;
    opacity: 50%;
    border-radius: 10px;
  }

  .documents-row:nth-child(odd) .line-mobile {
    grid-column: 1 / 5;
    grid-row: 2;
    width: 95%;
    margin: 0px auto;
    height: 3px;
    background-color: #7891ad;
    opacity: 50%;
    border-radius: 10px;
  }

  .documents-row:nth-child(even) .line-mobile {
    grid-column: 1 / 5;
    grid-row: 2;
    width: 95%;
    margin: 0px auto;
    height: 3px;
    background-color: #ffffff;
    opacity: 50%;
    border-radius: 10px;
  }

  .documents-header .cell.presentation,
  .documents-row .cell.presentation {
    grid-column: 1;
    grid-row: 3;
    text-align: start !important;
    justify-content: start !important;
  }
  .documents-header .cell.text,
  .documents-row .cell.text {
    grid-column: 2;
    grid-row: 3;
    text-align: start !important;
    justify-content: start !important;
  }
  .documents-header .cell.notes,
  .documents-row .cell.notes {
    grid-column: 3;
    grid-row: 3;
    text-align: start !important;
    justify-content: start !important;
  }
  .documents-header .cell.music,
  .documents-row .cell.music {
    grid-column: 4;
    grid-row: 3;
    text-align: start !important;
    justify-content: start !important;
  }

  .documents-header .cell,
  .documents-row .cell {
    padding: 10px 35px;
    font-size: 13px;
  }

  .documents-header {
    border-radius: 8px 8px 0 0;
  }
}

@media (max-width: 560px) {
  .documents-header .cell,
  .documents-row .cell {
    padding: 10px 12px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .controls-row {
    flex-direction: column;
    gap: 8px;
  }

  .controls-row > .sort-dropdown {
    width: 100%;
  }

  .controls-row > .download-btn {
    width: 161px !important;
    min-width: 161px !important;
    margin-left: 0;
    margin-right: 0;
    margin-right: auto;
  }

  .documents-header .cell.presentation,
  .documents-row .cell.presentation {
    grid-column: 1;
    grid-row: 3;
    text-align: start !important;
    justify-content: center !important;
  }
  .documents-header .cell.text,
  .documents-row .cell.text {
    grid-column: 2;
    grid-row: 3;
    text-align: start !important;
    justify-content: center !important;
  }
  .documents-header .cell.notes,
  .documents-row .cell.notes {
    grid-column: 3;
    grid-row: 3;
    text-align: start !important;
    justify-content: center !important;
  }
  .documents-header .cell.music,
  .documents-row .cell.music {
    grid-column: 4;
    grid-row: 3;
    text-align: start !important;
    justify-content: center !important;
  }
  .documents-header .cell.presentation {
    margin-left: 5px;
  }

  .documents-header .cell.title,
  .documents-row .cell.title {
    padding: 0px !important;
    margin: 0px !important;
    text-align: start !important;
  }

  .documents-header .cell,
  .documents-row .cell {
    padding: 10px 5px;
    font-size: 13px;
  }
}
