/* =============================================================
   KLIJENTSKA PAGINACIJA ZA TABELE
   Radi nad već renderovanim redovima (respektuje spoljne filtere).
   Stil prati StudIS referencu: "Prikaži N zapisa" + numerisani pager.
   Aktivira se preko public/js/pagination.js na table[data-paginate].
   ============================================================= */

.pg-topbar,
.pg-footer {
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    color: #4a5568;
}

/* red koji paginacija sakriva (ima prednost nad inline display iz filtera) */
tr.pg-hidden-row {
    display: none !important;
}

/* ---------- GORNJA TRAKA: "Prikaži N zapisa" ---------- */
.pg-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 14px 0;
}

.pg-topbar select {
    font-family: inherit;
    font-size: 14px;
    color: #2d3748;
    padding: 6px 28px 6px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%234a5568'/></svg>") no-repeat right 10px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pg-topbar select:focus {
    outline: none;
    border-color: #009EF7;
    box-shadow: 0 0 0 3px rgba(0, 158, 247, 0.15);
}

/* ---------- DONJA TRAKA: info + pager ---------- */
.pg-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.pg-info {
    color: #718096;
    font-weight: 500;
}

.pg-pager {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pg-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #4a5568;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pg-btn:hover:not(:disabled):not(.pg-btn--active) {
    background: #edf2f7;
}

.pg-btn--active {
    background: #009EF7;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 158, 247, 0.3);
}

.pg-btn:disabled {
    color: #cbd5e0;
    cursor: default;
}

.pg-ellipsis {
    min-width: 20px;
    text-align: center;
    color: #a0aec0;
    user-select: none;
}

/* ---------- Tamna tema ---------- */
html.dark .pg-topbar,
html.dark .pg-footer { color: #cbd5e0; }
html.dark .pg-info { color: #94a3b8; }
html.dark .pg-topbar select {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}
html.dark .pg-btn { color: #cbd5e0; }
html.dark .pg-btn:hover:not(:disabled):not(.pg-btn--active) { background: #334155; }
html.dark .pg-btn:disabled { color: #475569; }

/* ---------- Mobilni ---------- */
@media (max-width: 600px) {
    .pg-footer {
        justify-content: center;
        text-align: center;
    }
    .pg-info { width: 100%; text-align: center; }
}
