/*
 * HoFi Billard - Par-stafet Compact v1.0
 * Papirbesparende A4-udskrift med faste CSS Grid-kolonner i mm.
 */

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

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

.par-stafet-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);
}

.par-stafet-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
 * + Klub 1 48 + VS 14 + Klub 2 52 = 190 mm
 */
.pscpt-compact-grid{
    display:grid;
    grid-template-columns:12mm 14mm 22mm 16mm 12mm 48mm 14mm 52mm;
    width:190mm;
    box-sizing:border-box;
    align-items:center;
}

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

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

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

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

.pscpt-compact-program,
.pscpt-compact-date-group{
    width:190mm;
}

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

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

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

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

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

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

/*
 * FAST 190 mm PAR-STAFET GRID
 * Hold 36 + Spiller 30 + Snit 14 + Dist 14 + luft 6
 * + Spiller 30 + Snit 14 + Dist 14 + total 32 = 190 mm
 */
.pscpt-compact-team-grid,
.pscpt-compact-substitutes{
    display:grid;
    grid-template-columns:36mm 30mm 14mm 14mm 6mm 30mm 14mm 14mm 32mm;
    width:190mm;
    box-sizing:border-box;
    align-items:baseline;
    font-size:8.25pt;
    line-height:1.02;
}

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

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

.pscpt-compact-team-grid .team{
    font-weight:700;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

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

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

.pscpt-compact-team-grid .total{
    font-weight:700;
}

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

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

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

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

.par-stafet-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,
    .par-stafet-compact-shell{
        width:auto!important;
        max-width:none!important;
        margin:0!important;
        padding:0!important;
    }

    .par-stafet-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;
    }

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

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