﻿@media print {
    [class*="col-"] {
        float: none !important;
        width: 100% !important;
    }
}

/* PDF export: compact branch cards only. Do NOT target #showTotals — its summary row must wrap. */
.pdf-export .branch-card .container-new {
    max-width: 1000px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-export .detail-div {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* BRANCH TOTAL SUMMARY: readable layout in PDF (no single-line squeeze / overlap) */
.pdf-export #showTotals .container-new {
    white-space: normal !important;
    overflow: visible !important;
    max-width: 100% !important;
}

.pdf-export #showTotals .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: 0;
    margin-right: 0;
}

.pdf-export #showTotals [class*="col-"] {
    float: none !important;
    flex: 1 1 30%;
    min-width: 120px;
    max-width: 100%;
    box-sizing: border-box;
}

/* Chart: fit page width during capture only; inline #chart sizes are restored when .pdf-export is removed */
.pdf-export #chart {
    width: 100% !important;
    max-width: 700px !important;
    height: 380px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* PNG snapshot laid over hidden SVG during PDF export — avoid clipping the overlay */
.chart-pdf-snapshot-host {
    overflow: visible !important;
}

h4.text-info {
    font-size: 18px;
    font-weight: bold;
    color: #3e6dac !important;
    font-family: inherit;
}

.branch-card {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    margin-bottom: 20px;
    overflow: hidden;
}

    .branch-card:hover {
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
        transform: translateY(-2px);
    }

    .branch-card .container-new {
        padding: 10px;
    }

    .branch-card .col-4,
    .branch-card .col-6,
    .branch-card .col-3,
    .branch-card .col-12 {
        padding: 3px;
    }

    .branch-card p {
        margin: 2px 0;
        line-height: 1.2;
    }

    .branch-card h4 {
        margin: 5px 0;
        font-size: 16px;
    }

/* ── Chart responsive: override the hardcoded inline width/margin on screens narrower than 1300px ── */
@media (max-width: 1300px) {
    #chart {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

@media (max-width: 767px) {
    #chart {
        width: 100% !important;
        margin-left: 0 !important;
        height: 280px !important;
    }
}

@media (max-width: 480px) {
    #chart {
        width: 100% !important;
        margin-left: 0 !important;
        height: 220px !important;
    }
}
