/* ============================================= */
/* PASTE-FROM-CLIPBOARD BUTTON (next to AI)      */
/* ============================================= */

/* ============================================= */
/* TRANSACTIONS VIEW — mobile compact layout     */
/* ============================================= */
@media (max-width: 768px) {
    /* Move export button to a small floating chip at the top-right of the filters bar */
    /* Hide desktop export header on mobile; show inline mobile export button */
    #view-transactions .tx-export-desktop { display: none !important; }

    /* One-line filters: shrink to fit; total chip wraps to next row */
    #view-transactions > div:nth-child(2) {
        display: flex !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
        gap: 4px !important;
        padding: 6px 8px !important;
        margin-bottom: 8px !important;
        align-items: center !important;
    }
    /* Hide the filter icons on mobile — saves space */
    #view-transactions > div:nth-child(2) > div > i { display: none !important; }
    /* Each filter container: shrink to content, share remaining width */
    #view-transactions > div:nth-child(2) > div {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        gap: 0 !important;
    }
    #view-transactions > div:nth-child(2) select,
    #view-transactions > div:nth-child(2) input[type="text"] {
        padding: 4px 4px !important;
        font-size: 0.68rem !important;
        min-width: 0 !important;
        max-width: none !important;
        width: 100% !important;
        text-overflow: ellipsis !important;
    }
    /* Row 2: total chip + export button side-by-side — forced via flex-basis breaker */
    #view-transactions > div:nth-child(2)::after {
        content: '';
        flex: 1 1 100%;
        width: 100%;
        order: 98;
    }
    #ledger-month-total {
        display: block !important;
        text-align: center !important;
        padding: 3px 10px !important;
        font-size: 0.74rem !important;
        flex: 1 1 auto !important;
        order: 99 !important;
    }
    #ledger-filter-count { display: none !important; }

    /* Table: compact + fix overlaps (slightly larger fonts for readability) */
    #view-transactions .card {
        overflow-x: hidden !important;
    }
    #view-transactions .data-table {
        table-layout: fixed !important;
        width: 100% !important;
    }
    #view-transactions .data-table th,
    #view-transactions .data-table td {
        padding: 7px 3px !important;
        font-size: 0.78rem !important;
        vertical-align: middle !important;
    }
    /* Date column: stack date & time on 2 lines */
    #view-transactions .data-table td:first-child {
        font-size: 0.72rem !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        width: 70px !important;
    }
    #view-transactions .data-table td:first-child span {
        display: block !important;
        font-size: 0.68rem !important;
    }
    /* Category column — allow wrap, tighten */
    #view-transactions .data-table td:nth-child(2) {
        white-space: normal !important;
        word-break: break-word !important;
        font-size: 0.76rem !important;
    }
    /* Description column */
    #view-transactions .data-table td:nth-child(3) {
        white-space: normal !important;
        word-break: break-word !important;
        font-size: 0.74rem !important;
        color: var(--text-muted) !important;
    }
    /* Amount column: compact, bold */
    #view-transactions .data-table td:nth-child(4) {
        white-space: nowrap !important;
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        width: 64px !important;
        text-align: start !important;
    }
    /* Actions column (delete/edit) */
    #view-transactions .data-table .td-actions {
        width: 52px !important;
        min-width: 52px !important;
        text-align: center !important;
        padding-inline-end: 2px !important;
        padding-inline-start: 2px !important;
    }
    #view-transactions .data-table .td-actions button,
    #view-transactions .data-table .td-actions .icon-btn {
        padding: 4px 4px !important;
        margin: 0 1px !important;
        font-size: 0.85rem !important;
    }
    #view-transactions .data-table thead th {
        font-size: 0.72rem !important;
        padding: 6px 2px !important;
    }
}

