.folder-explorer { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.folder-explorer :where(.folder-explorer-toolbar > button, .folder-explorer-history > button, .folder-explorer-presets > button, .folder-explorer-sidebar .location, .folder-explorer-pagination > button, .folder-explorer-path > button) { border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--ink); padding: 5px 9px; font-size: 12px; line-height: 1.4; }
.folder-explorer :where(.folder-explorer-toolbar > button, .folder-explorer-history > button, .folder-explorer-presets > button, .folder-explorer-sidebar .location, .folder-explorer-pagination > button, .folder-explorer-path > button):hover:not(:disabled) { background: #e4eaf2; }
.folder-explorer :where(.folder-explorer-toolbar > button, .folder-explorer-history > button, .folder-explorer-presets > button, .folder-explorer-sidebar .location, .folder-explorer-pagination > button, .folder-explorer-path > button):disabled { cursor: default; opacity: .4; }
.folder-explorer-toolbar { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; padding: 6px 8px; border-bottom: 1px solid var(--line); background: #f5f7fa; }
.folder-explorer-history { display: flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.folder-explorer-history button { min-width: 30px; padding: 4px 8px; border-color: var(--line); background: var(--paper); font-size: 16px; }
.folder-explorer-title { flex: 1 1 0; min-width: 0; max-width: min(240px, 35vw); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; letter-spacing: 0; }
.folder-explorer-presets { display: flex; flex: 0 0 auto; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 5px; background: #e9eef5; }
.folder-explorer-presets button[aria-pressed=true] { border-color: #c6d2e1; background: var(--paper); font-weight: 600; }
.folder-explorer-toolbar-actions { display: flex; flex: 0 0 auto; min-width: 0; max-width: 100%; }
.folder-explorer:has(.matter-filter-options[open]) { overflow: visible; }
.folder-explorer-toolbar-actions .matter-actions.matter-document-toolbar-actions { position: static; flex: 1; align-items: center; gap: 6px; min-width: 0; }
.folder-explorer-toolbar-actions .matter-document-toolbar-actions :is(button, .matter-filter-options > summary) { min-height: 30px; padding: 4px 8px; font-size: 12px; line-height: 20px; white-space: nowrap; }
.folder-explorer-toolbar-actions .matter-actions .matter-filter-options { position: static; }
.folder-explorer-toolbar-actions .matter-filter-panel { left: auto; right: 8px; width: min(450px, calc(100% - 16px)); }
.folder-explorer-empty > p { margin: 0; }
.folder-explorer-empty > button { margin-top: 12px; }
.folder-explorer-subfolders { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.folder-explorer-subfolders input { margin: 0; accent-color: var(--teal); }
.folder-explorer-sidebar-toggle { flex: 0 0 auto; }
.folder-explorer-body { display: grid; grid-template-columns: 180px minmax(0, 1fr); min-width: 0; }
.folder-explorer.sidebar-collapsed .folder-explorer-body { grid-template-columns: minmax(0, 1fr); }
.folder-explorer.sidebar-collapsed .folder-explorer-sidebar { display: none; }
.folder-explorer-sidebar { min-width: 0; padding: 12px 7px; border-right: 1px solid var(--line); background: #f0f3f7; }
.folder-explorer-sidebar h4 { margin: 0 8px 7px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .025em; }
.folder-explorer-sidebar h4:not(:first-child) { margin-top: 18px; }
.folder-explorer-sidebar .location { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; padding: 6px 9px; }
.folder-explorer-sidebar .location[aria-current=page] { color: var(--ink); background: #dce4ee; font-weight: 600; }
.folder-explorer-sidebar .folder-explorer-pagination { flex-wrap: wrap; justify-content: flex-start; margin-top: 9px; font-size: 10px; }
.folder-explorer-sidebar .folder-explorer-pagination button { padding: 4px 6px; font-size: 10px; }
.folder-explorer-main { min-width: 0; }
.folder-explorer-library { min-width: 0; padding: 12px; }
.folder-explorer-scroll { min-width: 0; min-height: 240px; max-height: min(60vh, 660px); overflow: auto; scrollbar-gutter: stable; }
.folder-explorer-list { table-layout: fixed; border-spacing: 0; border-collapse: separate; text-align: left; font-size: 12px; outline: none; }
.folder-explorer-list th { position: sticky; top: 0; z-index: 1; padding: 6px 8px; border-bottom: 1px solid var(--line); background: #fafbfd; color: var(--muted); font-size: 10px; font-weight: 550; }
.folder-explorer-resize { position: absolute; top: 0; right: 0; bottom: 0; width: 9px; cursor: col-resize; touch-action: none; }
.folder-explorer-resize::after { content: ''; position: absolute; top: 20%; bottom: 20%; right: 3px; border-right: 1px solid #b5c2d2; }
.folder-explorer-resize:hover::after, .folder-explorer-resize:focus-visible::after { border-right: 2px solid var(--teal); }
.folder-explorer-resize:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.folder-explorer.resizing { cursor: col-resize; user-select: none; -webkit-user-select: none; }
.folder-explorer-list td { height: 32px; padding: 5px 8px; border-bottom: 1px solid #eef1f5; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.folder-explorer-list td.name { color: var(--ink); }
.folder-explorer-list th.size, .folder-explorer-list td.size { text-align: right; font-variant-numeric: tabular-nums; }
.folder-explorer-list tr[data-key] { cursor: default; user-select: none; -webkit-user-select: none; }
.folder-explorer-list tr[data-key]:hover { background: #f5f7fa; }
.folder-explorer-list tr[aria-selected=true] { background: #e1e7ef; }
.folder-explorer-list tr[aria-selected=true] td { color: var(--ink); }
.folder-explorer-list:focus-within tr[aria-selected=true] { background: var(--teal); }
.folder-explorer-list:focus-within tr[aria-selected=true] td { border-bottom-color: #ffffff1f; color: #fff; }
.folder-explorer-list:focus-visible tr[data-focused=true] { outline: 2px solid #7c9ac1; outline-offset: -2px; }
.folder-explorer-list:focus-visible { box-shadow: inset 0 0 0 2px #7c9ac1; }
.folder-explorer-name { display: inline-block; max-width: calc(100% - 25px); overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.folder-explorer-bates { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 1px 0 0 25px; color: var(--muted); font-size: 10px; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; }
.folder-explorer-bates:empty { display: none; }
.folder-explorer-list:focus-within tr[aria-selected=true] .folder-explorer-bates { color: inherit; }
.folder-explorer-document-details, .folder-explorer-document-actions { max-width: 100%; margin: 2px 0 0 25px; font-size: 11px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.folder-explorer-document-details:empty, .folder-explorer-document-actions:empty { display: none; }
.folder-explorer-document-details > :first-child { margin-top: 0; }
.folder-explorer-document-details > :last-child { margin-bottom: 0; }
.folder-explorer-document-details .matter-search-passage { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.folder-explorer-document-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 4px 8px; }
.folder-explorer-document-actions .matter-document-actions { max-width: 100%; margin-top: 0; }
.folder-explorer-document-actions .matter-document-actions > summary { color: inherit; }
.folder-explorer-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 19px; height: 20px; margin-right: 5px; vertical-align: middle; color: var(--muted); }
.folder-explorer-icon.folder { width: 20px; height: 14px; margin-top: 3px; border: 1px solid #5d97c8; border-radius: 2px; background: #a8d4f1; }
.folder-explorer-icon.folder::before { content: ''; position: absolute; top: -4px; left: -1px; width: 10px; height: 5px; border: 1px solid #5d97c8; border-bottom: 0; border-radius: 2px 2px 0 0; background: #a8d4f1; }
.folder-explorer-icon.file { height: 22px; border: 1px solid #a5b2c2; border-radius: 2px; background: #fff; color: #52647d; font-size: 6px; font-weight: 700; line-height: 1; }
.folder-explorer-list:focus-within tr[aria-selected=true] .folder-explorer-icon.folder { border-color: #d5eafa; background: #b8ddf7; }
.folder-explorer-list:focus-within tr[aria-selected=true] .folder-explorer-icon.folder::before { border-color: #d5eafa; background: #b8ddf7; }
.folder-explorer-list.review :is(th, td).name { position: sticky; left: 0; z-index: 2; }
.folder-explorer-list.review.name-scrolls :is(th, td).name { left: auto; }
.folder-explorer-list.review td.name { background: var(--paper); }
.folder-explorer-list.review th.name { z-index: 4; background: #fafbfd; }
.folder-explorer-list.review :is(th, td).column-action { padding-right: 6px; padding-left: 6px; text-align: center; }
.folder-explorer-list.review td.review-value { white-space: normal; }
.folder-explorer-list.review .review-cell { display: block; width: 100%; text-align: left; line-height: 1.45; font-size: 11px; }
.folder-explorer-list.review .review-state { margin-top: 2px; font-size: 9px; line-height: 1.3; }
.folder-explorer-list:focus-within tr[aria-selected=true] :is(.text-button, .review-state) { color: inherit; }
.folder-explorer-list.review tr[data-key]:hover td.name { background: #f5f7fa; }
.folder-explorer-list.review tr[aria-selected=true] td.name { background: #e1e7ef; }
.folder-explorer-list.review:focus-within tr[aria-selected=true] td.name { background: var(--teal); }
.folder-explorer-empty { margin: 0; padding: 38px 20px; color: var(--muted); text-align: center; font-size: 12px; }
.folder-explorer-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px 14px; min-height: 36px; padding: 5px 11px; border-top: 1px solid var(--line); background: #fafbfd; }
.folder-explorer-footer p { margin: 0; color: var(--muted); font-size: 11px; }
.folder-explorer-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--muted); font-size: 11px; }
.folder-explorer-pagination button { font-size: 11px; }
.folder-explorer-path { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-height: 35px; padding: 5px 8px; border-top: 1px solid var(--line); background: #f5f7fa; overflow-wrap: anywhere; }
.folder-explorer-path button, .folder-explorer-path [aria-current] { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.folder-explorer-path [aria-current] { padding: 5px 9px; color: var(--ink); font-weight: 550; }
.folder-explorer-path > span:not([aria-current]) { color: #8a9bb0; font-size: 12px; }
@media (max-width: 680px) {
  .folder-explorer-body { grid-template-columns: 132px minmax(0, 1fr); }
  .folder-explorer-toolbar { gap: 6px; }
  .folder-explorer-list th, .folder-explorer-list td { padding-right: 7px; padding-left: 7px; }
}
@media (max-width: 430px) {
  .folder-explorer-body { grid-template-columns: 110px minmax(0, 1fr); }
}

.folder-document-details > small { display: block; }
