/* ============================================================
   Ticket preview + badge printing.
   The ticket itself is drawn on a canvas (see hr/tickets.js), so
   preview, download and print are all the same pixels.
   ============================================================ */

.ticket-preview {
  display: grid;
  place-items: center;
  padding: 12px;
  background: var(--surface-sunken);
  border-radius: var(--r-md);
}
.ticket-preview canvas {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.ticket-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  cursor: pointer;
}
.ticket-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); }
.ticket-card .tq { width: 52px; height: 52px; flex: none; border-radius: 6px; overflow: hidden; background: #fff; }
.ticket-card .tq svg { display: block; width: 100%; height: 100%; }
.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.tt-dot {
  width: 9px; height: 9px; border-radius: 50%;
  display: inline-block; flex: none;
}

/* ---------- printing ---------- */
.print-only { display: none; }

@media print {
  body * { visibility: hidden !important; }
  #printArea, #printArea * { visibility: visible !important; }
  #printArea {
    position: fixed;
    inset: 0;
    display: grid !important;
    place-items: center;
    background: #fff;
    padding: 0;
    margin: 0;
  }
  #printArea img { max-width: 100%; max-height: 100vh; object-fit: contain; }
  @page { margin: 8mm; }
}

/* badge layout used for the check-in name print */
.badge-print {
  width: 90mm;
  text-align: center;
  font-family: var(--font-ar);
}
.badge-print .bp-name { font-size: 26pt; font-weight: 800; margin: 6mm 0 2mm; }
.badge-print .bp-spec { font-size: 13pt; font-weight: 600; color: #555; }
.badge-print .bp-serial { font-size: 10pt; font-weight: 700; letter-spacing: .08em; margin-top: 4mm; }
