/* 1. Transform the list container into a grid */
.share main .file-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 20px !important;
    padding: 20px !important;
}

/* 2. Re-style each "row" into a "card" */
.share .file-list .item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    height: auto !important;
    padding: 15px !important;
    background: #fff !important;
    border: 1px solid #eee !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    transition: transform 0.2s ease !important;
}

.share .file-list .item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

/* 3. Make the Icon area large for the Thumbnail */
.share .file-list .item .icon {
    width: 160px !important;
    height: 120px !important;
    margin: 0 0 15px 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* 4. Force thumbnails to scale and fill the icon area */
.share .file-list .item .icon i[data-icon] {
    font-size: 3rem !important; /* Fallback icon size */
}

/* FileBrowser applies thumbnails as background images to an 'i' tag */
.share .file-list .item .icon i {
    width: 100% !important;
    height: 100% !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* 5. Clean up the text labels */
.share .file-list .item .name {
    font-weight: 600 !important;
    text-align: center !important;
    width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* 6. Hide metadata that clutters the grid */
.share .file-list .item .size, 
.share .file-list .item .modified {
    display: none !important;
}

/* 7. Hide the "List/Grid" header row */
.share .file-list .header {
    display: none !important;
}