.window-body {
    padding: 0;

    height: 768px;
}

/* Explorer Layout */
.explorer {
    display: flex;
    height: 100%;

    min-height: 480px;
}

/* #region file-preview */

.file-preview {
    width: 40%;
    max-width: 368px;
    border-left: 2px solid #808080;
    background-color: var(--w98-gray);

    color: #212121;
}

.file-preview .file-information {
    display: flex;
    flex-flow: column;
}

.file-preview .file-visualizer {
    display: flex;
    flex-flow: col;
    justify-content: center;
    align-items: start;

    background-color: var(--w98-gray2);

    width: calc(100% - 8px);
    height: 194px;
    padding: 4px;
}

/* img */
.file-preview .file-visualizer .visualizer-preview {
    object-fit: contain;

    border: 1px solid var(--w98-gray);

    height: 190px;
    width:  100%;
}

.file-preview .file-names {
    width: 100%;

    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: start;

    text-align: center;
}


.file-preview .file-title {
    width: 100%;
    font-size: 18px;

    margin-bottom:  0;
    padding-bottom: 0;
}

.file-preview .file-name {
    width: 100%;
    opacity: 0.9;
    font-size: 10px;

    margin:  0;
    padding: 0;
}

.file-preview .file-desc {
    --border-color: #00000030;

    margin:  6px 6px;
    padding: 4px;
    border: 1px groove var(--border-color);
    background-color: var(--border-color);

    max-height: 400px;
    overflow: auto;
}

.file-preview .preview-button {
    width: 90%;
    margin: 0 auto;
}

/* #endregion */

.icons-view {
    width: 100%;
    height: 100%;
    padding: 0px 4px;

    overflow-y: auto;
}

.icons-view .icon {
    margin: 4px 8px;
}

.icons-view .icon {
    width:  110px;
    height: 110px;
}

.icons-view .icon img {
    width:  78px;
    height: 78px;

    box-shadow: 0 0 0 1px black;
}

.row-data {
    display: flex;
    flex-flow: row;
    align-items: center;
}

/* Tree View Layout */
.tree-view {
    display: flex;
    flex-flow: column;
    align-items: start;

    width: 30%;
    max-width: 256px;

    border-right: 2px solid #808080;
    padding: 4px;
    background: var(--w98-gray);
    overflow-y: auto;
    font-size: 12px;
}
.tree-view ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tree-view ul:not(:nth-child(1)) {
    border-left: 1px solid #808080;
}

.tree-view li {
    display: flex;
    align-items: center;
    margin: 5px 0;
    position: relative;
    padding-left: 20px;
    /* Adjust for toggle and icon alignment */
}

/* Toggle Button */
.tree-view .toggle {
    display: inline-block;
    width: 12px;
    height: 12px;
    text-align: center;
    margin-right: 5px;
    cursor: pointer;
    color: #000;
    border: 1px solid transparent;
    font-weight: bold;
    font-family: monospace;
}

.tree-view .toggle.hidden {
    visibility: hidden;
    /* Hide toggle for non-collapsible items */
}

/* Folder Icons */
.tree-view .tree-icon {
    width: 22px;
    height: 22px;
    margin-right: 5px;
    vertical-align: middle;
}

/* Links */
.tree-view a {
    color: #000;
    text-decoration: none;
    padding: 2px 5px;
    display: inline-block;
    white-space: nowrap;
}

.tree-view a:hover {
    background-color: #e0e0e0;
}

.tree-view a:active, .tree-view a.selected {
    background-color: var(--w98-blue);
    color: #fff;
}


li.folder {
    display: flex;
    flex-flow: column;

    margin-left: -18px;
    width: 100%;
}

/* Expand/Collapse Behavior */
.tree-view .folder ul {
    display: none;
    /* Initially hidden */
}

.tree-view .folder.open>ul {
    display: block;
    /* Show child elements */
}

.toggle-line {
    width: 100%;
}

.folder-contents {
    --x-offset: 7px;

    width: calc(100% - var(--x-offset));
    margin-left: var(--x-offset) !important;
}

.tree-view, .icons-view, .file-preview {
    order: 0;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .explorer {
        display: flex;
        flex-flow: column;
        height: 100%;
        padding: 0 0;
    }

    .tree-view {
        max-width: unset;
        padding: 0 0;
        width: 100%;
    }

    .explorer .icons-view {
        flex-grow: 1;
        padding: 0 0;
        order: 2;
        margin-top: 16px;
    }

    .file-preview {
        max-width: unset;
        width: 100%;
        order: 1;
     }
}