@media screen {
    .rcp-horizontal-scroll { overflow-x: auto; }
    .rcp-table-scrollbar {
        position: fixed;
        z-index: 2000;
        display: flex;
        align-items: center;
        box-sizing: border-box;
        height: calc(13px + env(safe-area-inset-bottom, 0px));
        padding: 0 3px env(safe-area-inset-bottom, 0px);
        border: 1px solid #D9E1EC;
        border-radius: 5px 5px 0 0;
        background: #F6F8FC;
        box-shadow: 0 -2px 8px rgb(15 39 74 / 12%);
        direction: ltr;
    }
    .rcp-table-scrollbar[hidden], .rcp-table-scroll-spacer[hidden] { display: none !important; }
    .rcp-table-scrollbar .rcp-table-scroll-arrow {
        flex: 0 0 26px;
        width: 26px;
        height: 11px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 3px;
        background: transparent;
        color: #0F274A;
        font: 10px Arial, sans-serif;
        cursor: pointer;
        touch-action: manipulation;
        box-shadow: none;
    }
    .rcp-table-scrollbar .rcp-table-scroll-arrow:hover:not(:disabled) { background: #EAF3FF; }
    .rcp-table-scrollbar .rcp-table-scroll-arrow:disabled { opacity: .35; cursor: default; }
    .rcp-table-scroll-track {
        position: relative;
        flex: 1;
        min-width: 0;
        height: 11px;
        cursor: pointer;
        touch-action: none;
        user-select: none;
    }
    .rcp-table-scroll-track::before {
        content: "";
        position: absolute;
        inset: 3px 0;
        border-radius: 6px;
        background: #E2E6EC;
    }
    .rcp-table-scroll-thumb {
        position: absolute;
        top: 2px;
        left: 0;
        height: 6px;
        border-radius: 6px;
        background: #6B7A90;
        pointer-events: none;
    }
    .rcp-table-scroll-track:hover .rcp-table-scroll-thumb,
    .rcp-table-scroll-track:focus-visible .rcp-table-scroll-thumb,
    .rcp-table-scroll-track.is-dragging .rcp-table-scroll-thumb { background: #0F274A; }
    .rcp-table-scroll-track:focus-visible { outline: 2px solid #2F80FF; outline-offset: -2px; }
    .rcp-table-scroll-spacer { height: calc(16px + env(safe-area-inset-bottom, 0px)); }
    body:has(> .rcp-table-scrollbar:not([hidden])) .demo-contact-widget {
        bottom: calc(45px + env(safe-area-inset-bottom, 0px));
    }

    :root body :is(button, a).rcp-subtle-action {
        background-color: var(--rcpgo-light-blue, #EAF3FF);
        color: var(--rcp-subtle-text, var(--rcpgo-primary, #0F274A));
        border-color: var(--rcpgo-border, #D9E1EC);
    }
    :root body :is(button, a).rcp-subtle-action:hover:not(:disabled) {
        background-color: #DCECFF;
        color: var(--rcp-subtle-text, var(--rcpgo-primary, #0F274A));
    }
    .rcp-subtle-action.rcp-action-deactivate { --rcp-subtle-text: var(--rcpgo-danger, #EB5757); }
}
@media screen and (pointer: coarse), screen and (max-width: 700px) {
    .rcp-table-scrollbar { height: calc(22px + env(safe-area-inset-bottom, 0px)); }
    .rcp-table-scrollbar .rcp-table-scroll-arrow { flex-basis: 38px; width: 38px; height: 20px; font-size: 12px; }
    .rcp-table-scroll-track { height: 20px; }
    .rcp-table-scroll-track::before { top: 7px; bottom: 7px; }
    .rcp-table-scroll-thumb { top: 6px; height: 8px; border-radius: 8px; }
    .rcp-table-scroll-spacer { height: calc(25px + env(safe-area-inset-bottom, 0px)); }
    body:has(> .rcp-table-scrollbar:not([hidden])) .demo-contact-widget {
        bottom: calc(38px + env(safe-area-inset-bottom, 0px));
    }
}
@media print {
    .rcp-table-scrollbar, .rcp-table-scroll-spacer { display: none !important; }
}

/* Compact action buttons keep their existing font size and horizontal spacing. */
@media screen {
    :root body :is(button, a):is(.primary, .secondary, .save, .download,
        .report-button, .attendance-primary, .attendance-light, .action-button,
        .refresh-button, .success-button, .danger, .danger-button, .sub-primary,
        .rcp-subtle-action, .demo-contact-tile),
    :root body .sub-actions button,
    :root body .hub-actions button,
    :root body .sub-operator-panel button,
    :root body #saveReportPdfButton.report-save-pdf-button,
    :root body #resetButton, :root body #demoEntryRetry, :root body #demoEntryNewTab {
        box-sizing: border-box;
        min-height: 32px;
        height: auto;
        padding-block: 5px;
    }
}
