/* Compact archive shelves without changing their existing click handlers. */
html body #root .document-shelves-panel {
  padding: 18px 18px 20px !important;
}

html body #root .document-shelves-panel .document-shelves-title {
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

html body #root .document-shelves-panel .document-shelves-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 210px)) !important;
  gap: 8px !important;
  justify-content: start !important;
  width: 100% !important;
  padding: 10px 0 0 !important;
  border-top: 1px solid #dbe4ee !important;
  border-bottom: 0 !important;
  background-image: none !important;
}

html body #root .document-shelves-panel .document-shelves-grid::after {
  content: none !important;
  display: none !important;
}

html body #root .document-shelves-panel button.document-shelf-tab:nth-child(n) {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 120px !important;
  height: auto !important;
  padding: 10px 12px !important;
  gap: 3px !important;
  border: 0 !important;
  border-left: 1px solid #d5e0eb !important;
  border-bottom: 1px solid #d5e0eb !important;
  border-radius: 0 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  transform: none !important;
}

html body #root .document-shelves-panel button.document-shelf-tab:hover,
html body #root .document-shelves-panel button.document-shelf-tab:focus-visible {
  z-index: 2 !important;
  transform: translateY(-3px) scale(1.015) !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .14) !important;
}

html body #root .document-shelves-panel button.document-shelf-tab .document-shelf-count {
  font-size: 24px !important;
  font-weight: 750 !important;
}

html body #root .document-shelves-panel button.document-shelf-tab .document-shelf-title {
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
}

html body #root .document-shelves-panel button.document-shelf-tab .document-shelf-detail,
html body #root .document-shelves-panel button.document-shelf-tab .document-shelf-status,
html body #root .document-shelves-panel button.document-shelf-tab.has-documents .document-shelf-status {
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
}

html body #root .document-shelves-panel button.document-shelf-tab .document-shelf-detail {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  overflow: hidden !important;
}

html body #root .document-shelves-panel .document-shelves-grid > div.document-shelf-tab {
  grid-column: span 2;
}

@media (max-width: 500px) {
  html body #root .document-shelves-panel .document-shelves-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  html body #root .document-shelves-panel .document-shelves-grid > div.document-shelf-tab {
    grid-column: span 1;
  }
}
