/*
 * XoSoBD - Lottery Print Patch V4
 * Load AFTER lottery-print-fallback.css
 *
 * Chỉ sửa:
 * - Font/line-height để dấu tiếng Việt không bị cắt.
 * - Ngày góc phải hiển thị 04/09 và 2026 thành 2 dòng.
 * - Ẩn nút IN nổi cũ; nút In mới do lottery-print-ui-v4.js tạo cạnh 1/4/6 A4.
 *
 * Không thay đổi bố cục 1/A4, 4/A4, 6/A4 đang hoạt động tốt.
 */

app-print,
app-print table,
app-print td,
app-print div,
app-print span,
app-print a{
    font-family:"Segoe UI",Arial,Tahoma,sans-serif!important;
}

/* Không dùng weight 800/900 tổng quát vì một số font/render nhỏ làm dấu Việt xấu. */
app-print .agency,
app-print .ciyname,
app-print .ticket_type,
app-print .dateMask,
app-print .signature,
app-print .address{
    font-weight:700!important;
    overflow:visible!important;
    text-overflow:clip!important;
}

/* Tăng vùng thở cho dấu: Ắ, Ề, Ỷ, ƯƠ... */
app-print .agency{
    line-height:1.22!important;
    padding:1px 0 2px!important;
}

app-print .date{
    line-height:1.20!important;
    overflow:visible!important;
}

app-print .ciyname{
    line-height:1.22!important;
    padding:1px 0!important;
    overflow:visible!important;
}

app-print .ticket_type,
app-print .dateMask{
    line-height:1.18!important;
    padding:1px 0!important;
    overflow:visible!important;
}

/* Prize labels such as 2TỶ need enough vertical room for Vietnamese diacritics. */
app-print .chipsprintmain td{
    line-height:1.18!important;
    overflow:visible!important;
}

/* Numbers remain compact, but do not use sub-1 line-height. */
app-print .bindText{
    line-height:1.08!important;
    overflow:visible!important;
}

/* Header date in the small cell: Minh Chính style. */
app-print .date .daymonth,
app-print .date .year{
    display:block!important;
    margin:0!important;
    padding:0!important;
    line-height:1.05!important;
    text-align:center!important;
}

/* 4/A4: keep compact but Vietnamese-safe. */
app-print.print-mode-44 .agency{
    line-height:1.16!important;
    padding:0 0 1px!important;
}

app-print.print-mode-44 .ciyname,
app-print.print-mode-44 .ticket_type,
app-print.print-mode-44 .dateMask{
    line-height:1.14!important;
}

app-print.print-mode-44 .chipsprintmain td{
    line-height:1.10!important;
}

app-print.print-mode-44 .bindText{
    line-height:1.04!important;
}

/* 6/A4: still compact, but no clipped Vietnamese accents. */
app-print.print-mode-46 .agency{
    line-height:1.14!important;
    padding:0 0 1px!important;
}

app-print.print-mode-46 .ciyname,
app-print.print-mode-46 .ticket_type,
app-print.print-mode-46 .dateMask{
    line-height:1.12!important;
}

app-print.print-mode-46 .chipsprintmain td{
    line-height:1.08!important;
}

app-print.print-mode-46 .bindText{
    line-height:1.02!important;
}

/*
 * Original Angular print button is fixed at bottom-right.
 * Hide it completely. V4 JS creates a clean button in .btnGroup instead.
 */
app-print .btn-event-print{
    display:none!important;
}

/* New print button: same visual language as the existing A4 buttons. */
app-print .xsbd-print-now{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:70px!important;
    margin:0!important;
    padding:8px 12px!important;
    border:1px solid #1268d3!important;
    border-radius:4px!important;
    background:#1268d3!important;
    color:#fff!important;
    font-size:14px!important;
    line-height:1.2!important;
    font-weight:700!important;
    text-decoration:none!important;
    cursor:pointer!important;
}

app-print .xsbd-print-now:hover{
    background:#084fae!important;
    border-color:#084fae!important;
    color:#fff!important;
}

/* Keep the button row neat. */
app-print .btnGroup>div{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex-wrap:wrap!important;
    gap:6px!important;
}

@media(max-width:767px){
    app-print .xsbd-print-now{
        min-width:62px!important;
        padding:7px 9px!important;
        font-size:12px!important;
    }
}

@media print{
    app-print .xsbd-print-now{
        display:none!important;
    }
}
