* {
    padding: 0;
    margin: 0;
}

html {
    box-sizing: border-box;
}

body {
    background: #fbf7f7;
    padding-top: 20px;
    /* background: red; */
}

h1 {
    margin: 20px;
}

table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    text-align: center;
}

.center {
    text-align: center;
}

table th,
table td {
    border: 1px solid #666;
    padding: 4px 8px;
}

.container {
    width: 960px;
    margin: auto;
}

.tables-container {
    width: 100%;
}

td:nth-child(3),
td:nth-child(6),
th:nth-child(3),
th:nth-child(6) {
    text-align: left;
}

@media print {
    @page {
        size: A4;
        margin: 20mm;
    }

    #ketquacuoicung {
        display: none;
    }

    h1.center {
        margin-top: 0mm;
        display: none;
    }

    h1.display {
        margin-top: 20px;
        display: block;
    }
    body {
        font-size: 20px;
        padding: 0;
    }

    div.content-container,
    div.result-container,
    #table-result {
        page-break-inside: avoid;
        /* Đảm bảo nội dung của div không bị chia trang */
    }

    div.content-container::before {
        content: 'Kết quả bốc thăm';
        font-size: 36px;
        font-weight: 600;
        text-align: center;
        display: block;
        page-break-before: auto;
    }

    div.content-container::after {
        content: '';
        page-break-before: always;
        /* Đảm bảo div bắt đầu trên trang mới */
    }
    table td,
    table th {
        border: 1px solid #000 !important;
    }

    table .inputResult {
        font-size: 20px;
        display: block;
        width: 86px;
        border: none;
        outline: none;
        padding: 5px;
        border-radius: 0px;
        background-color: red !important;
    }

    #header {
        display: none;
    }

    .header h1 {
        display: block;
    }

    .hidden-printer {
        display: none;
    }
}

/* Sét độ dài tối đa */
th:nth-child(1),
th:nth-child(2),
th:nth-child(8) {
    max-width: 48px;
}
th:nth-child(3),
th:nth-child(6) {
    max-width: 192px;
}
th:nth-child(4),
th:nth-child(5),
th:nth-child(7) {
    max-width: 96px;
}

table th,
table td {
    border: 1px solid #ccc;
    padding: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 48px;
}

tr:nth-child(even) {
    background: #ebe6e6;
}

.inputResult {
    width: 68px;
    background: #fbf7f7;
    border: solid 1px #ccc;
    outline: none;
    border-radius: 8px;
    padding: 5px;
}

.btn {
    display: inline-block;
    min-width: 90px;
    text-align: center;
    padding: 10px 20px;
    border-radius: 8px;
    outline: none;
    border: 1px solid #ccc;
    /* color: blue; */
    margin-bottom: 20px;
    margin-top: 20px;
}

.btn:hover {
    cursor: pointer;
}

.bangketqua th:nth-child(1) {
    width: 48px;
}

.bangketqua th:nth-child(2) {
    max-width: 192px;
    width: 192px;
    text-align: left;
}

.bangketqua td:nth-child(2) {
    max-width: 192px;
    width: 192px;
    text-align: left;
}

.bangketqua th:nth-child(3) {
    max-width: 144px;
    width: 144px;
}

.bangketqua th:nth-child(4),
.bangketqua th:nth-child(5),
.bangketqua th:nth-child(6),
.bangketqua th:nth-child(7),
.bangketqua th:nth-child(8),
.bangketqua th:nth-child(9) {
    width: 48px;
    max-width: 144px;
}

.uppercase {
    text-transform: uppercase;
}

.menu {
    font-size: 20px;
}

a {
    text-decoration: none;
}

.menu:hover {
    cursor: pointer;
}

.bangketqua td:nth-child(6) {
    text-align: center;
}

.mb10 {
    margin-bottom: 10px;
}

.mb20 {
    margin-bottom: 20px;
}

p.fixed-30 {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

p.fixed-10 {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.disable {
    cursor: none;
    opacity: 0.6;
}

.disable:hover {
    pointer-events: none;
}

.huongdan {
    width: 100%;
}

.huongdan img {
    object-fit: cover;
}
