/**
 * One pager for every table, in admin and in labelling.
 *
 * Each table had grown its own: `PaginationComponent` emits Bootstrap class names on
 * a page that loads no Bootstrap (so its buttons fell back to the browser's), Prompt
 * Lists renders `.pagination-btn`, the recordings view renders `.recordings-pagination`,
 * and the TTS tables write their own markup addressed by id. Four looks for the same
 * control. This file gives all of them the same one without touching that markup:
 * count on the left, buttons on the right, the strip reading as the foot of the table
 * it belongs to.
 *
 * Load it AFTER the per-panel stylesheets so it settles the disagreements.
 * Scope is deliberately narrow — pagers of tables. Lists that page with numbered
 * buttons and a jump box (labelling's TTS prompt view) keep their own layout.
 */

.pagination-controls,
.recordings-pagination,
#prompt-lists-master-pagination,
#prompt-lists-detail-pagination,
#tts-admin-voices-pagination,
#tts-pl-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    background: var(--sx-bg-01);
    border-top: 1px solid var(--sx-line-05);
    border-radius: 0 0 10px 10px;
    box-shadow: none;
    font-size: 12px;
    color: var(--sx-ink-15);
}

/* Hidden pagers stay hidden: the panels toggle these by class or by inline style,
   and a flex container would otherwise reappear. */
#prompt-lists-master-pagination.hidden,
#prompt-lists-detail-pagination.hidden,
.pagination-controls.hidden {
    display: none !important;
}

/* The count sits at the far left, the controls at the far right, whatever order the
   markup happens to put them in. */
.pagination-controls .page-info,
.recordings-pagination .pagination-info,
#prompt-lists-master-pagination .pagination-info,
#prompt-lists-detail-pagination .pagination-info,
#tts-admin-voices-pagination > span,
#tts-pl-pagination > span {
    margin-right: auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--sx-ink-15);
    white-space: nowrap;
}

/* Buttons carry a tint of their own: on a pale strip, a white button is only a
   border. */
.pagination-controls .btn,
.recordings-pagination .btn,
.recordings-pagination button,
#prompt-lists-master-pagination .pagination-btn,
#prompt-lists-detail-pagination .pagination-btn,
#tts-admin-voices-pagination .btn,
#tts-pl-pagination .btn {
    min-width: 0;
    height: 30px;
    padding: 0 0.7rem;
    font-size: 12px;
    font-weight: 600;
    line-height: 28px;
    color: var(--sx-ink-32);
    background: var(--sx-bg-02);
    border: 1px solid var(--sx-line-05);
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.pagination-controls .btn:not(:disabled):hover,
.recordings-pagination .btn:not(:disabled):hover,
.recordings-pagination button:not(:disabled):hover,
#prompt-lists-master-pagination .pagination-btn:not(:disabled):hover,
#prompt-lists-detail-pagination .pagination-btn:not(:disabled):hover,
#tts-admin-voices-pagination .btn:not(:disabled):hover,
#tts-pl-pagination .btn:not(:disabled):hover {
    transform: none;
    box-shadow: none;
    border-color: var(--sx-line-09);
    background: var(--sx-bg-05);
}

.pagination-controls .btn:disabled,
.recordings-pagination .btn:disabled,
.recordings-pagination button:disabled,
#prompt-lists-master-pagination .pagination-btn:disabled,
#prompt-lists-detail-pagination .pagination-btn:disabled,
#tts-admin-voices-pagination .btn:disabled,
#tts-pl-pagination .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* The page-size select is part of the same control group. */
.pagination-controls .form-select {
    min-width: 0;
    height: 30px;
    padding: 0 0.5rem;
    font-size: 12px;
    color: var(--sx-ink-32);
    background: var(--sx-bg-00);
    border: 1px solid var(--sx-line-05);
    border-radius: 6px;
    cursor: pointer;
}

/* Without Bootstrap the icon font renders as an empty box, so the chevrons the
   component asks for are dropped; the labels already say Previous and Next. */
.pagination-controls .btn > i {
    display: none;
}
