* {
  font-family: "Open Sans", sans-serif;
  box-sizing: border-box;
}
body {
  margin: 0px;
}
/* General CSS */

.wrapper {
  max-width: 800px;
  height: 1100px;
  margin: auto;
  padding: 20px 65px;
  color: #555;
  font-size: 10px;
  line-height: 9px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.shadow {
  box-shadow: 0 0 10px rgb(0 0 0 / 15%);
}
.row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.vat:nth-child(2n) {
  flex-grow: 2;
  line-height: 15px;
}

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

.justify-end {
  justify-content: end;
}

.bold {
  font-weight: bold;
}

.spacer-xs {
  height: 3px;
}

.spacer-s {
  height: 7px;
}

.spacer-m {
  height: 15px;
}

.spacer-l {
  height: 20px;
}

.spacer-xl {
  height: 30px;
}

@media print {
  .wrapper {
    box-shadow: none;
    padding: 20px 65px;
  }

  /* Ensure table spacing is identical in print */
  .table {
    width: 100%;
    line-height: 1.4;
    margin: 0;
  }

  .heading td {
    padding: 8px 5px;
    text-transform: uppercase;
  }

  .item td {
    padding: 8px 5px;
    border-bottom: 1px solid #eee;
  }

  /* Hide control elements */
  .remove-item,
  .add-new-item,
  .translateBtns,
  .save-to-pdf,
  .upload-logo,
  .billing-type-switch {
    display: none !important;
    visibility: hidden !important;
  }
}

/* Jebena tabela */
.table {
  width: 100%;
  line-height: 1.4;
  margin: 0;
}

.heading {
  background: #eee;
  border-bottom: 1px solid #ddd;
  font-weight: bold;
}

.heading td {
  padding: 8px 5px;
  text-transform: uppercase;
}

.item td {
  padding: 8px 5px;
  border-bottom: 1px solid #eee;
}

/* EDIT BUTTONS */
.add-new-item {
  position: relative;
  width: 120px;
  padding: 13px;
  text-align: center;
  background-color: aquamarine;
  border: 1px solid black;
  cursor: pointer;
  font-weight: bold;
  display: none;
  float: right;
  clear: both;
  margin: 20px 0;
  z-index: 1000;
}
.add-new-item:hover {
  background-color: rgb(35, 253, 180);
}

.remove-item {
  background-color: tomato;
  font-size: 10px;
  padding: 7px;
  font-weight: bold;
  position: absolute;
  right: -25px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  width: 22px;
  cursor: pointer;
  margin: 0;
}
.remove-item:hover {
  background-color: rgb(255, 100, 75);
}

.dbc-show {
  display: none;
}

.remove-item.dbc-show {
  display: inline-block !important;
}

.add-new-item.dbc-show,
.billing-type-switch.dbc-show,
.save-to-pdf.dbc-show,
.translateBtns.dbc-show,
.upload-logo.dbc-show {
  display: block !important;
}

.translateBtns {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 20px;
  width: 150px;
  font-weight: bold;
  display: none;
  z-index: 1000;
}
.translateBtns p {
  text-align: center;
  font-size: 15px;
  margin: 0 0 5px 0;
}
.langSelector {
  display: flex;
  justify-content: center;
}

.langSelector div {
  width: 30px;
  height: 30px;

  font-size: 13px;
  text-align: center;

  line-height: 28px;
  margin-left: 10px;
  cursor: pointer;
  background-color: aquamarine;
  box-shadow: 0 0 10px rgb(0 0 0 / 15%);
  border: 1px solid #ccc;
}
.langSelector div:hover {
  background-color: rgb(35, 253, 180);
}
.invoiceDetails {
  line-height: 15px;
}

.invoice-label,
.invoice-separator,
.invoice-number {
  display: inline-block;
  font-weight: 600;
  font-size: 15px;
  padding: 0;
}

.invoice-number:focus {
  outline: 1px solid #ccc;
  padding: 0 2px;
}

.save-to-pdf {
  position: fixed;
  right: 20px;
  top: 20px;
  display: none;
  z-index: 1000;
}

.save-to-pdf div {
  border: 1px solid;
  padding: 10px;
  background: aquamarine;
  cursor: pointer;
  font-weight: bold;
}

.save-to-pdf div:hover {
  background-color: rgb(35, 253, 180);
}

.footer-section {
  position: relative;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 150px;
}

.upload-logo {
  margin-top: 10px;
  display: none;
  width: 100%;
  text-align: center;
}

.upload-logo div {
  border: 1px solid;
  padding: 10px;
  background: aquamarine;
  cursor: pointer;
  font-weight: bold;
}

.upload-logo div:hover {
  background-color: rgb(35, 253, 180);
}

.time-separator {
  display: inline-block;
  padding: 0 2px;
  font-weight: bold;
}

.signature-section {
  margin-top: 20px;
  width: 25%;
}

.signature-line {
  margin: 20px 0;
}

.dotted-line {
  border: none;
  border-top: 2px dotted #555;
  margin: 10px 0;
}

.representative-name {
  display: block;
  text-align: left;
  margin-top: 10px;
}

.billing-type-switch {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 85px;
  width: 150px;
  font-weight: bold;
  display: none;
  z-index: 1000;
}

.billing-type-switch.dbc-show {
  display: block !important;
}

.billing-type-switch div {
  border: 1px solid;
  padding: 10px;
  background: aquamarine;
  cursor: pointer;
  text-align: center;
}

.billing-type-switch div:hover {
  background-color: rgb(35, 253, 180);
}

body.printing .remove-item,
body.printing .add-new-item,
body.printing .translateBtns,
body.printing .save-to-pdf,
body.printing .upload-logo,
body.printing .billing-type-switch {
  display: none !important;
  visibility: hidden !important;
}

.item td:last-child {
  white-space: nowrap;
  width: 15%;
  position: relative;
}

/* Add fixed widths to table columns */
.heading td:nth-child(1) {
  width: 50%; /* Description column */
}

.heading td:nth-child(2) {
  width: 20%; /* Quantity column */
}

.heading td:nth-child(3) {
  width: 15%; /* Unit price column */
}

.heading td:nth-child(4) {
  width: 15%; /* Amount column */
}
