﻿html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

/* Focus styles */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}




/* Media query fix */
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    form#voucherForm {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Fix DataTables length + filter overlap */
    .dataTables_length,
    .dataTables_filter {
        margin-bottom: 15px !important;
    }

    .dataTables_wrapper .dataTables_length select {
        min-width: 60px;
        margin-left: 6px;
        margin-right: 6px;
    }

    .dataTables_wrapper .dataTables_length label,
    .dataTables_wrapper .dataTables_filter label {
        display: flex;
        align-items: center;
        gap: 6px;
    }

}
/* Align submenu to the right side */
.dropdown-menu .dropdown-menu {
    margin-left: 0.7rem;
}

@media (min-width: 992px) {
    .dropdown-menu .dropdown-menu {
        left: 100%;
        top: 0;
        margin-left: .1rem;
    }
     .dataTables_wrapper .dataTables_filter {
            justify-content: flex-start !important;
            margin-top: 10px !important;
        }

}

/* 🔥 Hide everything except reportContent when printing */
/* PRINT ONLY */
@media print {
    @page {
        size: A4 portrait;
        margin: 5mm;
    }

    body {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    /* 🔥 KILL BOOTSTRAP WIDTH LIMITS */
    .container,
    .container-fluid,
    #printArea {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

        #printArea table {
            width: 100% !important;
            max-width: 100% !important;
            table-layout: fixed;
            border-collapse: collapse;
        }

    /* ✅ PERFECT COLUMN SPLIT */
    .item-col {
        width: 12%;
        text-align: left;
    }

    .item-name-col {
        width: 38%;
        text-align: left;
        white-space: normal;
        word-break: break-word;
    }

    .gross-col,
    .net-col,
    .cal-col,
    .diff-col {
        width: 12.5%;
        text-align: right;
    }

    th, td {
        border: 1px solid #000;
        padding: 4px;
        vertical-align: top;
    }

    .no-print, header, footer, nav {
        display: none !important;
    }
    #stockSummaryResult table {
        width: 100%;
        border-collapse: collapse;
    }

    #stockSummaryResult th,
    #stockSummaryResult td {
        padding: 6px 8px;
        text-align: right; /* or left for item names */
        border: none; /* remove full borders */
    }

    #stockSummaryResult thead th {
        border-bottom: 2px solid #000; /* separate header */
    }

    #stockSummaryResult tbody tr td {
        border-bottom: 1px solid #ccc; /* row separation */
    }

    #stockSummaryResult tfoot tr td {
        border-top: 2px solid #000; /* totals separation */
        font-weight: bold;
    }
}

@media (max-width: 991px) {
    .dropdown-submenu > .dropdown-menu {
        position: static;
        margin-left: 15px;
    }
}