﻿/* -----------------------------------
   Normal Styles
----------------------------------- */
.ledger-container {
    max-height: 600px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.sticky-filters {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #f8f9fa;
    padding-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ledger-table-wrapper .mud-table thead th {
    position: sticky;
    top: 0px;
    background: #fff;
    z-index: 15;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.mud-table-scroll {
    overflow-x: auto;
    width: 100%;
}

.mud-table thead th,
.mud-table-head {
    font-weight: bold;
}

.sticky-mud-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #fff;
}

.sticky-mud-table tfoot {
    position: sticky;
    bottom: 0;
    z-index: 1;
    background-color: #f9f9f9;
}

/* -----------------------------------
   Print Styles (Single, Clean Version)
----------------------------------- */
@media print {
    /* Hide UI controls */
    .mud-button,
    .mud-select,
    .mud-icon-button,
    .mud-dropdown,
    .mud-appbar,
    .mud-drawer,
    .mud-date-picker,
    .mud-picker,
    .mud-input-adornment,
    .no-print {
        display: none !important;
    }

    /* Reset margins & padding */
    html, body {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        background: white !important;
    }

    .mud-paper,
    .mud-container,
    .mud-main-content {
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
    }

    /* Remove scrolls and fix height for MudTable */
    .mud-table-scroll,
    .mud-table-container,
    .ledger-container {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    table, th, td {
        border: 1px solid black !important;
        border-collapse: collapse !important;
        overflow: visible !important;
        padding: 4px !important;
    }

    th, td {
        color: black !important;
    }

    /* Page setup */
    @page {
        size: A4 landscape;
        margin: 15mm;
    }

    /* Repeat header/footer */
    thead {
        display: table-header-group !important;
    }

    tfoot {
        display: table-footer-group !important;
    }

    /* Remove box around rounded-blue-box */
    .rounded-blue-box {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        color: inherit !important;
    }
}


.mud-table-scroll {
    height: 60vh;
}
