/* =========================================
   LISTA DE ACCESO - VERSION IMPRESA
========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #eeeeee;
    color: #111111;
    font-family: Arial, Helvetica, sans-serif;
}


/* =========================================
   HOJA
========================================= */

.print-page {
    width: 11in;
    min-height: 8.5in;

    margin: 20px auto;
    padding: 0.22in;

    background: white;
}


/* =========================================
   ENCABEZADO
========================================= */

.print-header {
    display: grid;
    grid-template-columns: 1fr 1.3fr 1fr;
    align-items: center;

    gap: 10px;

    padding-bottom: 5px;
    margin-bottom: 6px;

    border-bottom: 1.5px solid #111;
}

.document-title h1 {
    margin: 0;
    font-size: 19px;
    line-height: 1;
}

.event-name strong {
    font-size: 11px;
}

.event-name {
    display: flex;
    flex-direction: column;
    gap: 3px;

    font-size: 11px;
}

.event-name strong {
    font-size: 13px;
}

.document-title {
    text-align: center;
}

.document-title h1 {
    margin: 0;

    font-size: 22px;
    line-height: 1;
}

.document-title span {
    display: block;
    margin-top: 4px;

    font-size: 10px;
}

#printButton {
    justify-self: end;

    padding: 7px 12px;

    border: 1px solid #111;
    border-radius: 5px;

    background: white;
    color: black;

    font-size: 11px;

    cursor: pointer;
}


/* =========================================
   GRID DE MESAS
   4 COLUMNAS x 3 FILAS = 12 MESAS
========================================= */

.tables-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 7px;
}


/* =========================================
   TARJETA DE MESA
========================================= */

.print-table {
    min-width: 0;
    height: 2.05in;

    display: flex;
    flex-direction: column;

    border: 1px solid #555;
    border-radius: 4px;

    overflow: visible;

    break-inside: avoid;
}


/* =========================================
   ENCABEZADO DE CADA MESA
========================================= */

.table-header {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    align-items: center;

    gap: 5px;
    padding: 5px 6px;

    border-bottom: 1px solid #777;

    font-size: 8.5px;
    white-space: nowrap;
}

.table-number {
    display: inline-block;

    padding: 3px 6px;

    background: #111;
    color: white;

    border-radius: 3px;

    font-size: 10px;
}

.table-header span {
    text-align: center;
}


/* =========================================
   FAMILIAS

   Hasta 4 familias distribuidas
   automáticamente en 2 columnas
========================================= */

.families-grid {
    flex: 1;

    display: flex;
    flex-wrap: wrap;

    align-content: flex-start;

    gap: 6px 10px;

    padding: 4px 6px 2px;

    overflow: visible;
}

.print-family {
    width: calc(50% - 5px);

    min-width: 0;

    padding-right: 2px;
}
.print-family:nth-child(3),
.print-family:nth-child(4) {
    margin-top: 2px;
}
.family-name {
    display: block;

    margin-bottom: 2px;

    font-size: 9px;
    font-weight: 800;

      text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================
   PERSONAS
========================================= */

.print-person {
    display: flex;
    align-items: center;

    gap: 4px;

    margin-bottom: 2px;

    font-size: 8.3px;
    line-height: 1.08;
}

.paper-checkbox {
    width: 10px;
    height: 10px;

    flex: 0 0 10px;

    border: 1px solid #111;
}

.infantil-mark {
    font-size: 7.5px;
    font-weight: 700;

    white-space: nowrap;
}


/* =========================================
   COMENTARIOS POR MESA
========================================= */

.table-comments {
    margin-top: auto;

    display: flex;
    align-items: flex-end;

    gap: 5px;

    min-height: 18px;

    padding: 3px 6px 5px;

    background: white;

    font-size: 6.5px;
}

.table-comments span {
    flex: 1;

    height: 8px;

    border-bottom: 1px solid #777;
}


/* =========================================
   PIE GENERAL
========================================= */

.print-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 14px;

    margin-top: 8px;
    padding-top: 6px;

    border-top: 1px solid #111;

    font-size: 8px;
}

.general-comments {
    flex: 1;

    display: flex;
    align-items: flex-end;

    gap: 6px;
}

.general-comments span {
    flex: 1;

    height: 10px;

    border-bottom: 1px solid #777;
}


/* =========================================
   IMPRESION
========================================= */

@page {
    size: Letter landscape;
    margin: 0.18in;
}

@media print {

    body {
        background: white;
    }

    .print-page {
        width: auto;
        min-height: auto;

        margin: 0;
        padding: 0;
    }

    #printButton {
        display: none;
    }

    .tables-grid {
        gap: 6px;
    }

    .print-table {
        break-inside: avoid;
        page-break-inside: avoid;
    }

}
