/*
 * HoFi Billard - Skomager Compact v1.4
 * Papirbesparende A4-udskrift med faste CSS Grid-kolonner i mm.
 */

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

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

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

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

/*
 * FAST 190 mm SKOMAGER GRID
 * Kamp 14 + Bord 14 + Spiller 70 + VS 12 + Spiller 80 = 190 mm
 */
.scc-compact-grid{
    display:grid;
    grid-template-columns:14mm 14mm 70mm 12mm 80mm;
    width:190mm;
    box-sizing:border-box;
    align-items:center;
}

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

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

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

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

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

.scc-date-group{
    break-inside:avoid;
    page-break-inside:avoid;
}

.scc-date-group.has-separator{
    border-top:.28mm solid #555;
    margin-top:1.25mm;
    padding-top:1.1mm;
}

.scc-date-heading{
    display:grid;
    grid-template-columns:23mm 1fr auto;
    gap:3mm;
    align-items:baseline;
    min-height:4.5mm;
    padding:.35mm .7mm .25mm;
    font-size:8.7pt;
    line-height:1.0;
    font-weight:400;
}

.scc-date-heading strong{
    font-size:9.1pt;
}

.scc-compact-row{
    min-height:3.55mm;
    font-size:8.5pt;
    line-height:1.0;
}

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

.scc-compact-row .versus{
    letter-spacing:.1mm;
}

.scc-compact-bottom{
    margin-top:1.8mm;
    padding-top:1.4mm;
    border-top:.3mm solid #222;
}

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

.scc-compact-notes{
    margin-bottom:1.4mm;
    font-size:8.1pt;
    line-height:1.12;
}

.scc-compact-notes strong{
    margin-right:1.5mm;
}

.scc-compact-players{
    display:grid;
    grid-template-columns:23mm 1fr;
    gap:2mm;
    align-items:start;
    margin-bottom:1.4mm;
    font-size:8.3pt;
    line-height:1.05;
}

.scc-player-grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:.4mm 3mm;
}

.scc-player-grid span{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.scc-compact-info{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:2mm 7mm;
    margin-top:1mm;
    color:#444;
    font-size:7.9pt;
    line-height:1.05;
}

.scc-compact-reminder{
    margin-top:1.2mm;
    color:#b50000;
    text-align:center;
    font-size:9pt;
    line-height:1.05;
    font-weight:700;
}

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

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

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

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

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