.custom-directory-listing {
display: flex;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
margin: 20px 0;
border: 1px solid #e2e4e7;
border-radius: 4px;
overflow: hidden;
} .custom-directory-listing.no-sidebar .directory-content {
width: 100%;
} .directory-sidebar {
width: 250px;
background-color: #f8f9fa;
border-right: 1px solid #e2e4e7;
padding: 5px 0;
overflow-y: auto;
max-height: 600px;
}
.folder-navigation,
.subfolder-navigation {
list-style: none;
margin: 0;
padding: 0;
}
.folder-navigation li {
margin: 0;
padding: 0;
}
.folder-link-wrapper {
display: flex;
align-items: center;
position: relative;
}
.folder-navigation a {
display: flex;
align-items: center;
padding: 8px 10px 8px 22px;
color: #23282d;
text-decoration: none;
transition: background-color 0.2s;
flex: 1;
}
.folder-navigation a:hover {
background-color: #e9ecef;
}
.folder-navigation li.active > .folder-link-wrapper > a {
background-color: #007cba;
color: white;
}
.folder-icon {
display: inline-block;
width: 16px;
height: 16px;
margin-right: 8px;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>');
background-size: contain;
background-repeat: no-repeat;
}
.folder-toggle {
display: inline-block;
width: 16px;
height: 16px;
position: absolute;
left: 5px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>');
background-size: contain;
background-repeat: no-repeat;
transition: transform 0.2s;
}
.folder-navigation li.expanded > .folder-link-wrapper .folder-toggle {
transform: translateY(-50%) rotate(90deg);
}
.subfolder-navigation {
margin-left: 20px;
overflow: hidden;
transition: max-height 0.3s ease-out;
} .directory-content {
flex: 1;
padding: 20px;
overflow-y: auto;
max-height: 600px;
} .directory-header {
display: flex;
align-items: center;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid #e2e4e7;
} .directory-back-button {
display: inline-flex;
align-items: center;
margin-right: 15px;
padding: 5px 10px;
background-color: #f1f3f5;
border-radius: 4px;
color: #23282d;
text-decoration: none;
font-size: 14px;
transition: background-color 0.2s;
}
.directory-back-button:hover {
background-color: #e2e4e7;
text-decoration: none;
}
.back-icon {
display: inline-block;
width: 16px;
height: 16px;
margin-right: 5px;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>');
background-size: contain;
background-repeat: no-repeat;
} .directory-breadcrumb {
flex: 1;
}
.directory-breadcrumb a {
color: #007cba;
text-decoration: none;
}
.directory-breadcrumb a:hover {
text-decoration: underline;
} .directory-search {
margin-bottom: 20px;
width: 100%;
}
.directory-search input {
width: 100%;
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
.directory-search input:focus {
outline: none;
border-color: #007cba;
box-shadow: 0 0 0 1px #007cba;
}
.file-item.hidden-by-search {
display: none;
}
.no-search-results {
padding: 20px;
text-align: center;
color: #666;
font-style: italic;
display: none;
} .folder-grid,
.file-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 15px;
margin-bottom: 30px;
}
.folder-item,
.file-item {
text-align: center;
}
.folder-item a,
.file-item a {
display: block;
text-decoration: none;
color: #23282d;
padding: 10px;
border-radius: 4px;
transition: background-color 0.2s;
}
.folder-item a:hover,
.file-item a:hover {
background-color: #f1f3f5;
}
.folder-icon-large {
width: 64px;
height: 64px;
margin: 0 auto 10px;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="%23007cba" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
.file-icon {
width: 64px;
height: 64px;
margin: 0 auto 10px;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline></svg>');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
.file-icon.pdf {
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="%23e74c3c" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><text x="8" y="19" font-family="Arial" font-size="5" fill="%23e74c3c">PDF</text></svg>');
}
.file-preview {
width: 64px;
height: 64px;
margin: 0 auto 10px;
display: flex;
align-items: center;
justify-content: center;
}
.file-preview img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
.folder-name,
.file-name {
word-break: break-word;
font-size: 14px;
line-height: 1.4;
}
.folder-section h3,
.file-section h3 {
margin-top: 0;
margin-bottom: 15px;
font-size: 18px;
font-weight: 500;
}
.empty-folder {
padding: 30px;
text-align: center;
color: #666;
font-style: italic;
} @media (max-width: 768px) {
.custom-directory-listing {
flex-direction: column;
}
.directory-sidebar {
width: 100%;
max-height: 200px;
border-right: none;
border-bottom: 1px solid #e2e4e7;
}
.folder-grid,
.file-grid {
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}
}
.file-preview.pdf-with-thumbnail {
position: relative;
overflow: hidden;
}
.file-preview.pdf-with-thumbnail:after {
disablecontent: "PDF";
position: absolute;
bottom: 0;
right: 0;
background-color: rgba(231, 76, 60, 0.8);
color: white;
font-size: 10px;
padding: 2px 5px;
border-top-left-radius: 3px;
}