/* Phone card layout for wide tables -- see public/assets/js/mobile-cards.js. Screen only:
   printing keeps the normal table even from a phone. */
@media screen and (max-width: 640px) {
    .report-table-wrap { overflow-x: visible; }
    table.mc-table, .report-table-wrap table.mc-table { min-width: 0 !important; width: 100%; border: 0; }
    table.mc-table thead { display: none; }
    table.mc-table tbody, table.mc-table tfoot { display: block; }
    table.mc-table tr {
        display: flex; flex-direction: column;
        border: 1px solid var(--gridline, #d6d5cd); border-radius: 10px;
        margin: 0 0 0.7rem; padding: 0.45rem 0.75rem;
        background: var(--surface-1, #fff);
    }
    table.mc-table td {
        display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem;
        padding: 0.2rem 0 !important; border: 0 !important; background: transparent !important;
        text-align: right !important; white-space: normal !important;
        position: static !important; width: auto !important; min-width: 0;
    }
    table.mc-table td::before {
        content: attr(data-label);
        flex: 0 1 50%; text-align: left;
        color: var(--text-muted, #6b6a64); font-size: 0.78rem; font-weight: 500;
    }
    table.mc-table td.mc-title {
        order: -1; justify-content: flex-start; text-align: left !important;
        font-weight: 700; font-size: 0.97rem;
        border-bottom: 1px solid var(--gridline, #d6d5cd) !important;
        margin-bottom: 0.25rem; padding-bottom: 0.4rem !important;
    }
    table.mc-table td.mc-title::before { display: none; }
    table.mc-table td.mc-empty { display: none; }
    table.mc-table tr.mc-heading { border: 0; padding: 0.3rem 0.1rem; margin: 0.9rem 0 0.4rem; background: transparent; }
    table.mc-table tr.mc-heading td { justify-content: flex-start; text-align: left !important; font-weight: 700; color: var(--brand, #184f95); }
    table.mc-table tr.mc-heading td::before { display: none; }
}
