.label-print-root {
  display: none;
}

html.printing-label .label-print-root {
  display: block;
}

.label-print-stage {
  box-sizing: border-box;
  width: 38mm;
  height: 60mm;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.tire-label {
  box-sizing: border-box;
  width: 60mm;
  height: 38mm;
  padding: 1.5mm 2mm;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1mm;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  background: #fff;
  overflow: hidden;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
}

.tire-label-barcode-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  flex: 0 0 auto;
}

.tire-label-barcode-wrap svg {
  display: block;
  width: 100%;
  max-width: 56mm;
  height: auto;
}

.tire-label-size {
  margin: 0;
  font-size: 16pt;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
}

.tire-label-flags {
  display: flex;
  gap: 2.5mm;
  justify-content: center;
  flex-wrap: wrap;
}

.tire-label-flag {
  font-size: 10pt;
  font-weight: 700;
  line-height: 1.1;
}

@media print {
  @page {
    size: 38mm 60mm;
    margin: 0;
  }

  html.printing-label,
  html.printing-label body {
    width: 38mm;
    height: 60mm;
    margin: 0;
    padding: 0;
    background: #fff;
  }

  html.printing-label body > *:not(.label-print-root) {
    display: none !important;
  }

  html.printing-label .label-print-root {
    display: block !important;
    position: static;
    margin: 0;
    padding: 0;
  }

  .label-print-stage {
    page-break-after: always;
    page-break-inside: avoid;
  }
}
