/* =======================
   TICKET 80 MM / PNG
   Optimizado para impresora térmica de 80 mm
======================= */
.ticket-80mm {
  width: 80mm;
  box-sizing: border-box;
  padding: 3mm 4mm 4mm;
  background: #fff;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  position: fixed;
  left: -10000px;
  top: 0;
  z-index: -1;
  line-height: 1.15;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.ticket-logo-wrap {
  text-align: center;
  margin: 0 0 2.4mm;
  height: auto;
}
.ticket-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 62mm;
  max-height: none;
  margin: 0 auto;
  object-fit: contain;
  filter: grayscale(1) brightness(0);
}
.ticket-rule { border-top: .25mm dashed #000; margin: 1.5mm 0; }
.ticket-rule-strong { border-top: .45mm solid #000; }
.ticket-info > div,
.ticket-summary > div {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: baseline;
  column-gap: 2mm;
  padding: .55mm 0;
  font-size: 2.55mm;
}
.ticket-info span,
.ticket-summary span {
  font-weight: 600;
  white-space: nowrap;
}
.ticket-info strong,
.ticket-summary strong {
  text-align: right;
  font-weight: 800;
  white-space: nowrap;
}
.ticket-section-title {
  border-top: .25mm dashed #000;
  border-bottom: .25mm dashed #000;
  text-align: center;
  font-size: 3.15mm;
  font-weight: 900;
  padding: 1.15mm 0;
  margin: 1.5mm 0 0;
  letter-spacing: .05mm;
}
.ticket-selection {
  display: grid;
  grid-template-columns: 5.6mm minmax(0, 1fr);
  gap: 1.4mm;
  padding: 1.55mm 0;
  border-bottom: .22mm dashed #000;
  break-inside: avoid;
}
.ticket-selection-index {
  width: 5.2mm;
  height: 5.2mm;
  border-radius: .7mm;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  color: #fff;
  font-size: 2.85mm;
  font-weight: 900;
}
.ticket-selection-body { min-width: 0; }
.ticket-league {
  font-size: 2.45mm;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket-league-long { font-size: 2.2mm; letter-spacing: -.03mm; }
.ticket-match {
  font-size: 2.85mm;
  font-weight: 800;
  margin-top: .35mm;
  line-height: 1.08;
  white-space: nowrap;
  letter-spacing: -.035mm;
}
.ticket-match-long { font-size: 2.5mm; letter-spacing: -.075mm; }
.ticket-match-very-long { font-size: 2.2mm; letter-spacing: -.11mm; }
.ticket-datetime {
  font-size: 2.35mm;
  margin-top: .55mm;
  font-weight: 400;
}
.ticket-pick-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2mm;
  margin-top: .65mm;
  font-size: 2.5mm;
}
.ticket-pick-row span { min-width: 0; overflow-wrap: anywhere; }
.ticket-pick-row strong { font-size: 3.05mm; flex: 0 0 auto; }
.ticket-summary {
  border-top: .45mm solid #000;
  padding-top: .65mm;
}
.ticket-summary > div { font-size: 2.65mm; padding: .55mm 0; }
.ticket-summary .ticket-potential {
  border-top: .45mm solid #000;
  border-bottom: .45mm solid #000;
  margin-top: .7mm;
  padding: 1.15mm 0;
  font-size: 3.45mm;
}
.ticket-summary .ticket-potential span { font-weight: 900; }
.ticket-summary .ticket-potential strong { font-size: 4.6mm; }
.ticket-barcode-wrap { text-align: center; padding-top: 1.8mm; }
.ticket-barcode { width: 56mm; height: 11mm; }
.ticket-code { font-size: 2.65mm; font-weight: 700; letter-spacing: .65mm; margin-top: .3mm; }
.ticket-conditions { text-align: center; font-size: 2.15mm; line-height: 1.3; margin-top: 1.5mm; }

@page { size: 80mm auto; margin: 0; }
@media print {
  html, body { width: 80mm; margin: 0 !important; padding: 0 !important; background: #fff !important; }
  body > *:not(.ticket-80mm) { display: none !important; }
  .ticket-80mm {
    position: static !important;
    left: auto !important;
    top: auto !important;
    z-index: auto !important;
    width: 80mm !important;
  }
}
