/* ============================================================
   MINECOFIN PUBLIC FILE TABLE PAGINATION

   Shared styling for downloadable-file pagination only.
   Does not affect charts, filters, indicator tables, or
   other dashboard tables.
============================================================ */


/* ============================================================
   PAGINATION WRAPPER
============================================================ */

.file-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 16px;

    margin-top: 14px;
    padding-top: 12px;

    border-top:
        1px solid rgba(15, 39, 71, 0.08);
}


/* ============================================================
   SUMMARY
============================================================ */

.file-pagination-summary {
    color: #6b7f95;

    font-size: 0.82rem;
    font-weight: 600;

    line-height: 1.4;
}


/* ============================================================
   CONTROLS
============================================================ */

.file-pagination-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 6px;

    flex-wrap: wrap;
}


/* ============================================================
   BUTTONS
============================================================ */

.file-pagination-btn {
    min-width: 34px;
    height: 34px;

    padding:
        0 10px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid rgba(15, 39, 71, 0.14);

    border-radius: 8px;

    background: #ffffff;

    color: #294766;

    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;

    line-height: 1;

    cursor: pointer;

    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}


/* Previous / Next slightly wider */

.file-pagination-prev,
.file-pagination-next {
    min-width: 76px;
}


/* ============================================================
   HOVER
============================================================ */

.file-pagination-btn:not(:disabled):hover {
    background:
        rgba(0, 129, 198, 0.07);

    border-color:
        rgba(0, 129, 198, 0.28);

    color: #006fa8;

    transform:
        translateY(-1px);
}


/* ============================================================
   ACTIVE PAGE
============================================================ */

.file-pagination-btn.active {
    background: #0081c6;

    border-color: #006fa8;

    color: #ffffff;

    box-shadow:
        0 4px 10px
        rgba(0, 129, 198, 0.18);
}


/* Active page should remain stable on hover */

.file-pagination-btn.active:hover {
    background: #0081c6;

    border-color: #006fa8;

    color: #ffffff;

    transform: none;
}


/* ============================================================
   DISABLED
============================================================ */

.file-pagination-btn:disabled {
    background:
        rgba(15, 39, 71, 0.03);

    border-color:
        rgba(15, 39, 71, 0.08);

    color:
        rgba(41, 71, 102, 0.38);

    cursor:
        not-allowed;

    box-shadow:
        none;

    transform:
        none;
}


/* ============================================================
   KEYBOARD FOCUS
============================================================ */

.file-pagination-btn:focus-visible {
    outline:
        2px solid rgba(0, 129, 198, 0.30);

    outline-offset:
        2px;
}


/* ============================================================
   DARK MODE
============================================================ */

[data-theme="dark"]
.file-pagination {
    border-top-color:
        rgba(255, 255, 255, 0.08);
}


[data-theme="dark"]
.file-pagination-summary {
    color: #9eb6cc;
}


[data-theme="dark"]
.file-pagination-btn {
    background:
        rgba(255, 255, 255, 0.045);

    border-color:
        rgba(255, 255, 255, 0.10);

    color: #c9d9e8;
}


[data-theme="dark"]
.file-pagination-btn:not(:disabled):hover {
    background:
        rgba(14, 165, 233, 0.10);

    border-color:
        rgba(56, 189, 248, 0.28);

    color: #38bdf8;
}


[data-theme="dark"]
.file-pagination-btn.active {
    background: #0284c7;

    border-color: #0ea5e9;

    color: #ffffff;

    box-shadow:
        0 4px 12px
        rgba(2, 132, 199, 0.18);
}


[data-theme="dark"]
.file-pagination-btn:disabled {
    background:
        rgba(255, 255, 255, 0.025);

    border-color:
        rgba(255, 255, 255, 0.06);

    color:
        rgba(201, 217, 232, 0.35);
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 700px) {

    .file-pagination {
        flex-direction: column;
        align-items: stretch;
    }


    .file-pagination-summary {
        text-align: center;
    }


    .file-pagination-controls {
        justify-content: center;
    }


    .file-pagination-btn {
        min-width: 32px;
        height: 32px;

        padding:
            0 8px;

        font-size:
            0.76rem;
    }


    .file-pagination-prev,
    .file-pagination-next {
        min-width: 70px;
    }

}