/**
 * table.css
 * ------------------------------------------------------------
 * Table and pagination styles.
 *
 * Contains:
 * - Table layout and typography
 * - Table row interactions
 * - Inline code styling
 * - Card footer layout
 * - Pagination controls
 * - Responsive pagination adjustments
 * - Pagination information
 * - Loading and empty states
 *
 * This file provides the visual styling for
 * data tables, pagination controls, and their
 * associated loading and empty states.
 * ------------------------------------------------------------
 */

/* Base table styling */
.table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Table header styling */
.table thead th {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 0.9rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

/* Table body cells */
.table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
}

/* Inline code displayed within table cells */
.table code {
    font-size: 0.82rem;
    background: #f1f5f9;
    padding: 0.18rem 0.45rem;
    border-radius: 6px;
    color: #334155;
}

/* Smooth transition for table rows */
.table tbody tr {
    transition: var(--transition);
}

/* Table row hover effect */
.table tbody tr:hover {
    background: #f8fbff;
}

/* Card footer containing pagination controls */
.card-footer-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #fafbfd;
}

/* Responsive card footer layout */
@media (max-width: 576px) {
    .card-footer-custom {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
}

/* Compact icon button used in table actions */
.btn-outline-primary.btn-sm {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

/* Pagination container */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0;
}

/* Pagination links */
.page-item .page-link {
    border: none;
    border-radius: 10px !important;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

/* Pagination link hover state */
.page-item .page-link:hover {
    background: #eff6ff;
    color: var(--primary);
}

/* Active pagination item */
.page-item.active .page-link {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

/* Disabled pagination item */
.page-item.disabled .page-link {
    opacity: 0.45;
    pointer-events: none;
}

/* Responsive pagination sizing */
@media (max-width: 576px) {
    .page-item .page-link {
        min-width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
}

/* Pagination summary information */
#paginationInfo {
    font-size: 0.82rem;
    color: #64748b;
}

/* Center pagination information on mobile devices */
@media (max-width: 576px) {
    #paginationInfo {
        text-align: center;
    }
}

/* Loading and empty state containers */
#loading,
#emptyState {
    padding: 60px;
    text-align: center;
}

/* Adjust empty state on mobile devices */
@media (max-width: 576px) {
    #emptyState {
        padding: 15px;
    }
}

/* Empty state styling */
#emptyState {
    display: none;
    color: #6b7280;
}

/* Table container is hidden until data is loaded */
#tableContainer {
    display: none;
}