.ellipsis-3-lines {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

/* for display price columns */
td.price-cell > div {
    white-space: nowrap;
    display: inline-block;
}

/* Sticky horizontal scrollbar for wide tables */
/* Make table container scrollable with fixed height */
.table-responsive {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
}

/* Ensure horizontal scrollbar is always visible at the bottom of viewport */
.table-responsive::-webkit-scrollbar {
    height: 12px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* For Firefox */
.table-responsive {
    scrollbar-width: auto;
    scrollbar-color: #888 #f1f1f1;
}

/* Separate footer pagination from table with border */
[data-controller="table"] footer {
    border-top: 2px solid #dee2e6;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

/* Compact TabMenu (scoped via .nav-scroll-bar, only used in tab menus) */
.nav-scroll-bar {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    gap: 0.15rem !important;
}

/* Tighter spacing between stacked tab rows */
nav:has(.nav-scroll-bar) {
    margin-bottom: 0.5rem !important;
}

.nav-scroll-bar .nav-link {
    padding: 0.3rem 0.65rem;
    font-size: 0.875rem;
    gap: 0.4rem !important;
}

.nav-scroll-bar .nav-link svg {
    width: 1.1rem;
    height: 1.1rem;
}
