/*
 * assets/css/ticket.css — FASE 17: ticket doble para llevar (funciones/ticket_motor.php).
 * Un solo estilo para la vista de impresión (ticket.php), el PNG de la app y el PDF
 * (Dompdf lo incrusta): sin flex ni grid, sin fondos, solo negro sobre blanco.
 * El ancho, el tamaño de letra y los márgenes de @page NO están aquí: salen de la
 * configuración (estiloTicket() en ticket_motor.php).
 */

.tk-ticket {
    font-family: "DejaVu Sans", Arial, Helvetica, sans-serif;
    color: #000;
    background: #fff;
    line-height: 1.3;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.tk-ticket * { box-sizing: border-box; }

.tk-membrete { text-align: center; margin-bottom: 0.4em; }
.tk-logo { display: block; max-width: 60%; max-height: 22mm; margin: 0 auto 0.3em; }
.tk-negocio-nombre { font-size: 1.5em; font-weight: bold; letter-spacing: 0.04em; }
.tk-linea-centro { text-align: center; font-size: 0.92em; }

.tk-rotulo {
    text-align: center;
    font-size: 1.25em;
    font-weight: bold;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    padding: 0.15em 0;
    margin-top: 0.3em;
}
.tk-rotulo-llevar { border-top: 0; margin-top: 0; letter-spacing: 0.1em; }

.tk-reimpresion {
    text-align: center;
    font-weight: bold;
    font-size: 1.15em;
    border: 2px dashed #000;
    margin: 0.4em 0;
    padding: 0.15em 0;
}
.tk-reimpresion[hidden] { display: none; }

.tk-numero { text-align: center; font-size: 2.6em; font-weight: bold; line-height: 1.1; margin: 0.2em 0; }
.tk-numero-negocio { font-size: 3.4em; }

.tk-datos { font-size: 0.95em; margin-bottom: 0.3em; }

.tk-etiqueta { display: block; font-size: 0.75em; font-weight: normal; text-transform: uppercase; letter-spacing: 0.05em; }
.tk-cliente { font-size: 1.2em; font-weight: bold; margin: 0.3em 0; }
.tk-cliente-negocio { font-size: 1.6em; }

.tk-retiro {
    text-align: center;
    border: 2px solid #000;
    padding: 0.2em 0;
    margin: 0.4em 0;
    font-weight: bold;
}
.tk-retiro-hora { display: block; font-size: 2.2em; line-height: 1.1; }

.tk-obs-caja {
    border: 2px solid #000;
    padding: 0.3em;
    margin: 0.4em 0;
    font-size: 1.1em;
}

.tk-items, .tk-totales { width: 100%; border-collapse: collapse; }
.tk-items { border-top: 1px dashed #000; border-bottom: 1px dashed #000; margin: 0.4em 0; }
.tk-items td { vertical-align: top; padding: 0.1em 0; }
.tk-item td { padding-top: 0.35em; font-weight: bold; }
.tk-cant { width: 2.8em; white-space: nowrap; }
.tk-imp { text-align: right; white-space: nowrap; padding-left: 0.4em; }
.tk-sub { font-size: 0.92em; padding-left: 0.2em; }
.tk-sin { font-weight: bold; }
.tk-obs-linea { border: 1px solid #000; padding: 0.1em 0.25em; font-weight: bold; }
.tk-copia-negocio .tk-sub { font-size: 1em; font-weight: bold; }
.tk-copia-negocio .tk-obs-linea { border-width: 2px; }

.tk-totales td { padding: 0.05em 0; }
.tk-total td { font-weight: bold; font-size: 1.2em; border-top: 1px solid #000; }

.tk-estado-pago {
    text-align: center;
    font-size: 1.4em;
    font-weight: bold;
    border: 3px solid #000;
    padding: 0.2em 0;
    margin: 0.5em 0;
}
.tk-pagos { font-size: 0.95em; margin-top: 0.3em; }
.tk-obs-cliente { margin-top: 0.4em; }
.tk-pie { text-align: center; margin-top: 0.6em; padding-top: 0.3em; border-top: 1px dashed #000; }

/* Corte entre copias: una página por copia (la impresora corta si lo soporta). */
.tk-corte { page-break-after: always; break-after: page; height: 0; }

/* ---- Vista en pantalla (ticket.php) ---- */
.tk-pantalla { margin: 0; background: #e5e5e5; font-family: Arial, Helvetica, sans-serif; }
.tk-barra {
    position: sticky; top: 0; z-index: 2;
    background: #222; color: #fff; padding: 8px 12px;
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.tk-barra button, .tk-barra a {
    font: inherit; font-size: 15px; padding: 8px 14px; border-radius: 6px; border: 0;
    background: #f5b301; color: #000; cursor: pointer; text-decoration: none;
}
.tk-barra .tk-secundario { background: #555; color: #fff; }
.tk-barra-msg { margin-left: auto; font-size: 14px; }
.tk-hoja { padding: 16px; }
.tk-pantalla .tk-ticket { margin: 0 auto 16px; padding: 4mm 0; box-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
.tk-pantalla .tk-corte { border-top: 2px dashed #888; margin: 0 auto 16px; max-width: 90mm; }

@media print {
    .tk-pantalla { background: #fff; }
    .tk-barra { display: none !important; }
    .tk-hoja { padding: 0; }
    .tk-pantalla .tk-ticket { margin: 0; padding: 0; box-shadow: none; }
    .tk-pantalla .tk-corte { border: 0; margin: 0; }
}

/* ---- PNG de la app: contenedor fuera de pantalla con margen blanco ---- */
.tk-captura { position: fixed; left: -10000px; top: 0; background: #fff; padding: 4mm; }

/* ---- PDF (Dompdf) ---- */
.tk-pdf { margin: 0; }
