.view-toggle {
    margin: 1rem 0;
    text-align: right;
}

.view-toggle button {
    background: black;
    color: #ccc;
    border: 0px solid black;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    filter: drop-shadow(0px 0px 1px grey);
}

.view-toggle button:hover {
    filter: drop-shadow(0px 0px 1px lime);
    color: #fff;
}

#file-view.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

#file-view.list .tile {
    padding: 0;
    background: none;
    border-bottom: 1px solid #444;
}

#file-view.list .item-link {
    display: flex;
    align-items: left;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #2c2c2c;
    text-decoration: none;
    color: inherit;
}

#file-view.list .item-link:hover {
    background: #3a3a3a;
}

#file-view.list .icon,
#file-view.list .thumb {
    width: 32px;
    height: 32px;
    font-size: 14px;
    align-items: left;
    justify-content: left;
}

#file-view.list .thumb {
    position: relative;
    border: 0.5px solid black;
    top: 10px;
    left: 3px;
    object-fit: cover;
    border-radius: 2px;
}

#file-view.list .label {
    font-size: 0.95rem;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


div.item {
    margin: 4px 4px 4px 4px;
    padding: 4px 4px 4px 4px;
}

div.item:hover {
    background-color: black;
}

.icon-type {
    height: 80%;
    width: 80%;
}


span .small {
    position: relative;
    top: 5px;
    max-width: 32px;
    max-height: 32px;
}


.hover {
    background-color: #1e1e1e;
}

.hover:hover {
    background-color: grey;
}


.view-toggle a {
    background: black;
    color: #ccc;
    border: 0px solid black;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    filter: drop-shadow(0px 0px 1px grey);
}

.view-toggle a:hover {
    filter: drop-shadow(0px 0px 1px lime);
    color: #fff;
}


.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tile {
    background: #2c2c2c;
    border-radius: 8px;
    padding: 1rem;
    /*  text-align: center;*/
    transition: background 0.2s;
}

.tile:hover {
    background: black;
    border-radius: 12px;
}

.icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.thumb {
    max-width: 100%;
    max-height: 100px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.label {
    word-wrap: break-word;
    font-size: 0.9rem;
    color: #ccc;
}

.preview-full {
    display: block;
    max-width: 95%;
    max-height: 90vh;
    margin: 2rem auto;
    border: 2px solid #555;
    border-radius: 8px;
}

.dir {
    color: lime;
}

.dir:hover {
    color: yellow;
}
