/* Admin responsive overrides for unfold */

/* Ensure the main content area doesn't overflow */
#content,
#content-main,
.changelist {
    min-width: 0;
    overflow-x: hidden;
}

/* Force table wrapper to scroll horizontally when needed */
.result-list {
    min-width: 100%;
}

/* Improve table readability at medium screen sizes (1024-1280px) */
@media (min-width: 1024px) and (max-width: 1400px) {
    /* Reduce cell padding to fit more columns */
    #result_list td,
    #result_list th {
        padding-left: 0.375rem !important;
        padding-right: 0.375rem !important;
        font-size: 0.8125rem;
    }

    /* Truncate long text in table cells */
    #result_list td a,
    #result_list td span {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
    }

    /* Allow image previews to be smaller */
    #result_list img {
        max-height: 60px !important;
        max-width: 80px !important;
    }
}

/* Tablet portrait and below */
@media (max-width: 1024px) {
    /* Ensure cards layout doesn't overflow viewport */
    #result_list td {
        max-width: calc(100vw - 3rem);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Smaller image previews in card mode */
    #result_list img {
        max-height: 80px !important;
        max-width: 120px !important;
    }
}
