/*
 * HoFi Billard - Hold Compact v1.0
 * Papirbesparende A4-udskrift inspireret af 2024-programmet.
 * Fast CSS Grid i mm for præcis kolonneplacering.
 */

.hold-compact-shell{
    max-width:940px;
}

.hold-compact-toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:18px;
}

.hold-compact-page{
    position:relative;
    width:210mm;
    min-height:297mm;
    margin:0 auto 24px;
    padding:7mm 10mm 7mm;
    box-sizing:border-box;
    background:#fff;
    color:#111;
    font-family:Arial,Helvetica,sans-serif;
    box-shadow:0 8px 30px rgba(0,0,0,.25);
}

.hold-compact-page h1{
    margin:0 0 3.2mm;
    text-align:center;
    color:#111;
    font-size:14pt;
    line-height:1.05;
    font-weight:700;
}

/*
 * FAST 190 mm KAMP-GRID
 * Kamp 12 + Dag 14 + Dato 22 + Tid 16 + Bord 12
 * + Hold 1 48 + VS 14 + Hold 2 52 = 190 mm
 */
.hcpt-compact-grid{
    display:grid;
    grid-template-columns:12mm 14mm 22mm 16mm 12mm 48mm 14mm 52mm;
    width:190mm;
    box-sizing:border-box;
    align-items:center;
}

.hcpt-compact-head{
    min-height:7mm;
    font-size:8.7pt;
    line-height:1.0;
    font-weight:700;
    border-bottom:.3mm solid #222;
}

.hcpt-compact-head > div,
.hcpt-compact-row > div{
    min-width:0;
    box-sizing:border-box;
    padding:.45mm .8mm;
}

.hcpt-compact-head > div:first-child,
.hcpt-compact-head > div:nth-child(5),
.hcpt-compact-row .match-no,
.hcpt-compact-row .table-no,
.hcpt-compact-row .versus{
    text-align:center;
}

.hcpt-compact-head > div:first-child,
.hcpt-compact-row .match-no{
    color:#d60000;
    font-weight:700;
}

.hcpt-compact-program{
    width:190mm;
}

.hcpt-compact-date-group{
    width:190mm;
}

.hcpt-compact-date-group.has-separator{
    border-top:.22mm solid #777;
    margin-top:.55mm;
    padding-top:.55mm;
}

.hcpt-compact-row{
    min-height:4.55mm;
    font-size:9.1pt;
    line-height:1.02;
}

.hcpt-compact-row .team-name{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.hcpt-compact-row .versus{
    letter-spacing:.15mm;
}

.hcpt-compact-bottom{
    margin-top:4mm;
    padding-top:2.4mm;
    border-top:.3mm solid #222;
}

.hcpt-compact-bottom.bottom-only{
    margin-top:8mm;
}

/*
 * FAST 190 mm HOLD-GRID
 * Hold 26 + 3 x (Spiller 25 + Snit 12 + Dist 12) + 2 x luft 8 = 189 mm.
 * Snit vises med 2 decimaler som på Par-stafet kompakt.
 */
.hcpt-compact-team-grid,
.hcpt-compact-substitutes{
    display:grid;
    grid-template-columns:26mm 25mm 12mm 12mm 8mm 25mm 12mm 12mm 8mm 25mm 12mm 12mm;
    width:190mm;
    box-sizing:border-box;
    align-items:baseline;
    font-size:8.5pt;
    line-height:1.02;
}

.hcpt-compact-team-grid > div,
.hcpt-compact-substitutes > div{
    min-width:0;
    box-sizing:border-box;
    padding:.36mm .65mm;
}

.hcpt-compact-team-grid .head,
.hcpt-compact-substitutes .head,
.hcpt-compact-substitutes .label{
    font-weight:700;
}

.hcpt-compact-team-grid .team{
    font-weight:700;
    white-space:nowrap;
}

.hcpt-compact-team-grid .num,
.hcpt-compact-substitutes .num{
    text-align:right;
    white-space:nowrap;
    padding-right:1mm;
}

.hcpt-compact-team-grid .gap,
.hcpt-compact-substitutes .gap{
    width:8mm;
    min-width:8mm;
    padding:0;
}

.hcpt-compact-substitutes{
    margin-top:2.4mm;
}

.hcpt-compact-notes{
    margin-top:2.5mm;
    font-size:8.2pt;
    line-height:1.15;
    white-space:normal;
}

.hcpt-compact-reminders{
    display:flex;
    justify-content:space-between;
    gap:8mm;
    margin-top:2.8mm;
    color:#b50000;
    font-size:8.8pt;
    line-height:1.1;
}

.hcpt-compact-page-no{
    position:absolute;
    right:10mm;
    bottom:3.5mm;
    color:#777;
    font-size:7pt;
}

.hold-compact-empty{
    padding:40px;
    text-align:center;
}

@page{
    size:A4 portrait;
    margin:0;
}

@media print{
    html,
    body{
        margin:0!important;
        padding:0!important;
        background:#fff!important;
    }

    .site-header,
    .site-menu,
    .main-nav,
    .site-footer,
    .no-print{
        display:none!important;
    }

    main,
    .container,
    .hold-compact-shell{
        width:auto!important;
        max-width:none!important;
        margin:0!important;
        padding:0!important;
    }

    .hold-compact-page{
        width:210mm!important;
        height:297mm!important;
        min-height:297mm!important;
        margin:0!important;
        padding:7mm 10mm 7mm!important;
        box-shadow:none!important;
        break-after:page;
        page-break-after:always;
        overflow:hidden;
    }

    .hold-compact-page:last-child{
        break-after:auto;
        page-break-after:auto;
    }

    .hcpt-compact-head > div:first-child,
    .hcpt-compact-row .match-no,
    .hcpt-compact-reminders{
        -webkit-print-color-adjust:exact!important;
        print-color-adjust:exact!important;
    }
}
