/* General Reset */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  color: #333;
}

.container {
  width: 90%;
  max-width: 800px;
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
}

header {
  text-align: center; /* Centers the image */
  padding: 10px 0;
}

.header-image {
  max-width: 100%; /* Ensures the image scales properly */
  height: auto; /* Keeps the image aspect ratio */
  border-bottom: 2px solid #000; /* Optional: adds a border below the header */
}
header p {
  font-size: 14px;
  color: #000000;
  font-weight: bold;
  text-decoration: underline;
}

.invoice-header p {
  font-size: 14px;
  color: #333;
}

.invoice-header {
  text-align: left;
  margin-bottom: 20px;
}

.customer-details h2 {
  margin-bottom: 10px;
  color: #007bff;
  font-size: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 85%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

textarea {
  resize: none;
  height: 30px;
}

.item-row {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.item-row input {
  flex: 0.285;
  padding: 2px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.item-row button {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  flex: 0 0 auto;
}

.item-row button:hover {
  background-color: #0056b3;
}

#invoiceTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

#invoiceTable th,
#invoiceTable td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

#invoiceTable th {
  background-color: #f8f9fa;
  color: #007bff;
}

.summary {
  text-align: right;
}

.print-btn {
  display: block;
  margin: 20px auto 0;
  padding: 10px 20px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.print-btn:hover {
  background-color: #218838;
}

/* Media Query for Print */
@media print {
  /* Set 10px margin on all sides */
  @page {
    size: A4;
    margin: 30px; /* 10px margin on all sides */
  }

  /* Ensure the content fits within the page */
  body {
    font-size: 12px; /* Adjust font size for printing */
    line-height: 1.2;
    margin: 0;
    padding: 0;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  /* Adjust the content sections to ensure they fit within the page */
  .invoice-header,
  .customer-details,
  .billing,
  .summary {
    margin-bottom: 10px; /* Space between sections */
  }

  .summary h3 {
    font-size: 14px;
  }

  table th,
  table td {
    padding: 8px;
    border: 1px solid #ddd;
    word-wrap: break-word;
    text-align: left;
  }

  /* Show the adjustment amount */
  #adjustmentAmountDisplay {
    display: inline-block;
    font-size: 14px;
    font-weight: bold;
    color: #000000;
  }

  .signature {
    text-align: right;
    font-size: 16px;
    margin-top: 100px;
    font-style: normal;
    font-weight: bold;
    padding: 0px;
  }

  .signature p {
    margin: 0;
  }
  /* Hide the adjustments section, Add Item tab, Remove Item column, and print invoice button */
  .adjustments-row,
  .item-row,
  #invoiceTable th:nth-child(6),
  #invoiceTable td:nth-child(6),
  .print-btn {
    display: none;
  }
}
