/* --- EMERGENCY FIX: LIST VIEW LAYOUT --- */
/* Ensure grid preview images are HIDDEN in List View */
body:not(.view-grid-active) .grid-preview-container,
body:not(.view-grid-active) .grid-poster-toggle-btn,
.view-mode-list .grid-preview-container {
    display: none !important;
}

/* Reset title text styling in List View */
body:not(.view-grid-active) .title-cell .grid-title-text {
    display: inline !important;
    font-weight: inherit;
    font-size: inherit;
    white-space: nowrap;
}

/* Ensure Layout is correct */
body:not(.view-grid-active) .title-cell {
    display: table-cell !important;
    max-width: 600px;
    /* maintain truncation */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- MINIMIZE MARGINS & PADDING (List View) --- */
/* Force full width on body */
body:not(.view-grid-active) {
    padding: 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Minimize container margins and padding */
body:not(.view-grid-active) .container {
    padding-left: 4px !important;
    padding-right: 4px !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Adjust results padding */
body:not(.view-grid-active) .results {
    padding: 10px !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure table fits */
body:not(.view-grid-active) table {
    width: 100% !important;
}