html, body {
  font-family: "Open Sans",sans-serif;
  margin: 0;
  padding: 0;
}

@media print {
    html, body {
        /* A4: 210mm x 297mm */
        font-size: 0.9em;
        margin: -4mm;
        /* width: 187mm; */

        /* with -7 margin */
        /* width: 198mm; */
        /* height: 280mm; */
    }
}

.receipt {
  margin-left: auto;
  margin-right: auto;
  margin-top: 20px;
  max-width: 960px;
  position: relative;
  width: 100%;
}

.taxpayer-details:after {
  clear: both;
  content: '';
  display: block;
}

.taxpayer-details > address {
  float: left;
  text-align: center;
  width: 40%;
}

.taxpayer-details img {
  margin-bottom: 1em;
  max-height: 40px;
  max-width: 180px;
}


.taxpayer-details > .receipt-details {
  float: right;
  text-align: right;
  width: 40%;
}

.receipt-type {
    background-color: #DDD;
    font-size: 1.8em;
    height: 2.6em;
    left: 50%;
    margin-left: -1.5em;
    position: absolute;
    text-align: center;
    width: 3em;
}

.receipt-type .identifier {
    font-weight: bold;
    margin-top: .3em;
}

.receipt-type .code {
  font-size: 0.3em;
}

.receipt-number {
  text-align: right;
}

.receipt-details .receipt-type-description {
  font-size: 1.3em;
  font-weight: bold;
}

address {
  float: left;
  font-style: normal;
}

.sale-conditions {
    float: right;
}

.service-dates:after {
  clear: both;
  content: '';
  display: block;
}

.service-dates > div {
    float: left;
    width: 50%;
}

.service-dates .expiration {
    text-align: right;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
  margin-bottom: 30px;
  width: 100%;
}

th {
  text-align: left;
}

th, td {
  padding: 8px;
  text-align: center;
}

th {
  border-bottom: 2px solid #DDD;
}

tbody > tr:nth-of-type(2n+1) {
  background-color: #F9F9F9;
}

td {
  border-bottom: 1px solid #DDD;
}

tfoot {
  font-weight: bold;
}

hr {
  background-color: #DDD;
  border: 0;
  height: 1px;
}

a {
  color: #00E;
}

.cae strong:nth-child(2) {
    margin-left: 20px;
}

.barcode {
    text-align: center;
}

.barcode img {
    display: block;
    height: 80px;
    margin-left: -35px;  /* Aligns with text */
    width: 450px;
}
