/* =====================================================
   PRINT STYLESHEET – A4 Portrait = 2× A5 quer
   Alle Einheiten in pt/mm für pixelfreies PDF
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;700;900&family=Barlow:wght@400;600;700&display=swap');

@page {
  size: A4 portrait;
  margin: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.print-body {
  margin: 0;
  padding: 0;
  background: white;
  font-family: 'Barlow', Arial, sans-serif;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* ── A4 Container ── */
.print-a4 {
  width: 210mm;
  height: 297mm;
  display: flex;
  flex-direction: column;
}

/* ── A5 Seite (je 148mm hoch) ── */
.print-a5 {
  width: 210mm;
  height: 148mm;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Schnittlinie zwischen Vorder- und Rückseite */
.print-divider {
  height: 1mm;
  background-image: repeating-linear-gradient(
    to right, #999 0, #999 3mm, transparent 3mm, transparent 6mm
  );
  flex-shrink: 0;
}

/* ── Header ── */
.print-header {
  background: #C8102E;
  color: white;
  display: flex;
  align-items: center;
  gap: 3mm;
  padding: 2mm 4mm;
  min-height: 14mm;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.print-badge {
  background: white;
  color: #C8102E;
  border-radius: 2mm;
  padding: 1mm 2mm;
  text-align: center;
  min-width: 11mm;
  flex-shrink: 0;
}
.print-badge-label { font-size: 5pt; font-weight: 700; font-family: 'Barlow Condensed', Arial Narrow, sans-serif; letter-spacing: 0.5pt; display: block; line-height: 1; }
.print-badge-num   { font-size: 16pt; font-weight: 900; font-family: 'Barlow Condensed', Arial Narrow, sans-serif; line-height: 1; display: block; }
.print-title-block { flex: 1; }
.print-title       { font-size: 14pt; font-weight: 900; font-family: 'Barlow Condensed', Arial Narrow, sans-serif; text-transform: uppercase; line-height: 1.1; }
.print-subtitle    { font-size: 7.5pt; opacity: 0.88; margin-top: 0.5mm; }
.print-branding    { text-align: right; flex-shrink: 0; }
.print-branding img { height: 9mm; filter: brightness(0) invert(1); }
.print-claim       { font-size: 5pt; opacity: 0.8; letter-spacing: 0.3pt; margin-top: 0.5mm; }

/* ── Sektion-Label ── */
.print-section-label {
  font-size: 7pt;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6pt;
  color: #C8102E;
  border-bottom: 0.7pt solid #C8102E;
  padding-bottom: 0.5mm;
  margin-bottom: 1.5mm;
  font-family: 'Barlow Condensed', Arial Narrow, sans-serif;
}

/* ── VORDERSEITE Body ── */
.print-front-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}
.print-diagram-col {
  flex: 1.1;
  border-right: 0.5pt solid #e0e0e0;
  padding: 2.5mm 3mm;
  display: flex;
  flex-direction: column;
  gap: 1.5mm;
}
.print-diagram-img {
  max-width: 100%;
  flex: 1;
  object-fit: contain;
}
.print-right-col {
  flex: 1;
  padding: 2.5mm 3mm;
  display: flex;
  flex-direction: column;
  gap: 2mm;
}

/* Ratings mini */
.print-ratings { display: flex; flex-direction: column; gap: 1mm; }
.print-rating-row { display: flex; align-items: center; gap: 1.5mm; }
.print-rating-icon { width: 3.5mm; height: 3.5mm; object-fit: contain; }
.print-rating-label { font-size: 6.5pt; font-weight: 700; font-family: 'Barlow Condensed', Arial Narrow, sans-serif; text-transform: uppercase; min-width: 20mm; }
.print-star { font-size: 7.5pt; color: #e0e0e0; }
.print-star.filled { color: #C8102E; }

/* Steps */
.print-steps { list-style: none; counter-reset: sc; display: flex; flex-direction: column; gap: 1.2mm; }
.print-step { counter-increment: sc; display: flex; gap: 1.5mm; align-items: flex-start; }
.print-step::before {
  content: counter(sc);
  background: #C8102E;
  color: white;
  font-size: 6pt;
  font-weight: 900;
  font-family: 'Barlow Condensed', Arial Narrow, sans-serif;
  min-width: 4.5mm; height: 4.5mm;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.3mm;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.print-step-title { font-size: 7pt; font-weight: 700; font-family: 'Barlow Condensed', Arial Narrow, sans-serif; text-transform: uppercase; }
.print-step-text  { font-size: 6.5pt; color: #555; line-height: 1.3; }
.print-step-icons { display: flex; align-items: center; gap: 0.5mm; flex-shrink: 0; margin-top: 0.5mm; }
.print-step-icon  { height: 8mm; width: 8mm; object-fit: contain; }
.print-step-arrow { font-size: 6pt; color: #C8102E; font-weight: 900; }

/* Ziel-Leiste */
.print-ziel-strip {
  border-top: 1pt solid #C8102E;
  background: #f5f5f5;
  padding: 1.5mm 3mm;
  display: flex; gap: 2mm; align-items: baseline;
  flex-shrink: 0;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.print-ziel-label { font-size: 7pt; font-weight: 900; color: #C8102E; font-family: 'Barlow Condensed', Arial Narrow, sans-serif; text-transform: uppercase; }
.print-ziel-text  { font-size: 7pt; }

/* ── RÜCKSEITE Body ── */
.print-back-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}
.print-back-left  { flex: 1.1; border-right: 0.5pt solid #e0e0e0; padding: 2.5mm 3mm; display: flex; flex-direction: column; gap: 2mm; }
.print-back-right { flex: 1; padding: 2.5mm 3mm; display: flex; flex-direction: column; gap: 2mm; }

/* Rules */
.print-rules { list-style: none; display: flex; flex-direction: column; gap: 1mm; }
.print-rule  { font-size: 7pt; line-height: 1.35; padding-left: 3mm; position: relative; }
.print-rule::before { content: "•"; position: absolute; left: 0; color: #C8102E; }

/* Material */
.print-material-list { display: flex; flex-wrap: wrap; gap: 1.5mm; }
.print-material-item { display: flex; flex-direction: column; align-items: center; background: #f5f5f5; border-radius: 1mm; padding: 1mm 2mm; min-width: 12mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-material-icon  { width: 7mm; height: 7mm; object-fit: contain; }
.print-material-count { font-size: 8pt; font-weight: 900; color: #C8102E; font-family: 'Barlow Condensed', Arial Narrow, sans-serif; }
.print-material-name  { font-size: 5.5pt; text-align: center; color: #555; line-height: 1.2; }

/* Schwerpunkte */
.print-sp-gruppe  { margin-bottom: 1mm; }
.print-sp-kat     { font-size: 7pt; font-weight: 900; font-family: 'Barlow Condensed', Arial Narrow, sans-serif; text-transform: uppercase; }
.print-sp-list    { list-style: none; padding-left: 2mm; }
.print-sp-item    { font-size: 6.5pt; line-height: 1.35; }
.print-sp-title   { font-weight: 700; }
.print-sp-text    { color: #555; }

/* QR Code */
.print-qr-wrap  { display: flex; align-items: center; gap: 2mm; }
.print-qr-img   { width: 18mm; height: 18mm; }
.print-qr-label { font-size: 5.5pt; color: #555; word-break: break-all; }

/* Punkte-Tabelle */
.print-scoring-strip {
  border-top: 1pt solid #C8102E;
  padding: 1.5mm 3mm 2mm;
  flex-shrink: 0;
  background: white;
}
.print-scoring-label { font-size: 7pt; font-weight: 900; color: #C8102E; font-family: 'Barlow Condensed', Arial Narrow, sans-serif; text-transform: uppercase; margin-bottom: 1mm; letter-spacing: 0.5pt; }
.print-scoring-table { border-collapse: collapse; width: 100%; }
.print-scoring-cell  { font-size: 6.5pt; text-align: center; padding: 0.5mm 0.3mm; font-family: 'Barlow Condensed', Arial Narrow, sans-serif; font-weight: 700; min-width: 6.5mm; }
.print-time-cell     { color: #666; font-weight: 400; border-bottom: 0.5pt solid #ddd; background: #f5f5f5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-pts-cell      { color: white; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pts-red      { background: #C8102E; }
.pts-orange   { background: #EA580C; }
.pts-yellow   { background: #EAB308; color: #1a1a1a !important; }
.pts-lime     { background: #84CC16; color: #1a1a1a !important; }
.pts-green    { background: #16A34A; }
.pts-darkgreen{ background: #15803D; }

/* Screen-only Elemente ausblenden */
@media print {
  .site-header, .card-actions, .card-flip-hint { display: none !important; }
}
