/* Custom styling for Django Unfold Admin */

/* Table Horizontal Scroll */
.results,
#changelist-form .results,
.overflow-x-auto {
    overflow-x: auto !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch;
}

/* Compact padding and white-space for table cells */
#result_list th,
#result_list td,
.change-list table th,
.change-list table td {
    white-space: nowrap !important;
    padding-left: 0.6rem !important;
    padding-right: 0.6rem !important;
}

/* Sticky footer with pagination & actions always visible on scroll */
#changelist-form > div:last-child,
#changelist-form footer,
.paginator,
nav[aria-label="Pagination"],
.change-list .actions,
.flex.items-center.justify-between.p-4.border-t,
.flex.items-center.justify-between.border-t {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 40 !important;
    background-color: var(--color-bg-surface, #ffffff) !important;
    border-top: 1px solid var(--color-border-default, #e5e7eb) !important;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08) !important;
}

.dark #changelist-form > div:last-child,
.dark #changelist-form footer,
.dark .paginator,
.dark nav[aria-label="Pagination"] {
    background-color: var(--color-bg-surface-dark, #1f2937) !important;
    border-top-color: #374151 !important;
}
