/* Invoice Styles */
.invoice-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

.invoice-header p {
  margin: 2px 0;
}

.invoice-header h1 {
  font-size: 1.5rem;
  font-weight: bold;
}

.invoice-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 20px;
}

.invoice-billing,
.invoice-shipping {
  width: 100%;
  margin-bottom: 15px;
  flex: 1 1 45%;
}
.invoice-info {
  text-align: right;
}

.info-item p {
  margin: 2px 0;
}

.info-item h4 {
  font-weight: 500;
  margin: 7px 0 0 0;
}

.invoice-billing h4,
.invoice-shipping h4 {
  font-weight: 500;
  margin-bottom: 5px;
  margin-top: 0;
}

.invoice-billing p,
.invoice-shipping p {
  margin: 0;
}

.invoice-items-container {
  overflow-x: auto;
  margin-bottom: 20px;
}

.invoice-items {
  width: 100%;
  border-collapse: collapse;
}

.invoice-items thead tr {
  background-color: #f2f2f2;
}

.invoice-items th,
.invoice-items .invoice-item-row td {
  border: 1px solid #ddd !important;
  padding: 10px !important;
  text-align: left;
}

.invoice-items td {
  padding: 7px 10px 2px 0;
}

.invoice-total {
  text-align: right;
  margin-bottom: 20px;
}

.invoice-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.print-button {
  background-color: #3b82f6;
  color: white;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  margin-bottom: 1rem;
}

.view-invoice-button {
  display: inline-block;
  width: 100%;
  background-color: #3b82f6;
  color: white;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  text-align: center;
  text-decoration: none;
}

.invoice-payment {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.invoice-payment .payment-information h4 {
  margin-bottom: 10px;
}
.payment-amount {
  width: 40%;
}

.payment-amount table {
  width: 100%;
  border-collapse: collapse;
}

.payment-amount th,
.payment-amount td {
  padding: 3px;
  text-align: right;
}

.payment-information h4 {
  font-weight: 500;
  margin-top: 0;
}

.invoice-wrapper-inner {
  display: block;
  width: 100% !important;
  box-sizing: border-box;
}
.button-print-wrapper {
  max-width: 840px;
  margin: 0 auto;
  border-radius: 8px;
  padding: 20px 0;
  text-align: right;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
}

.button-print-wrapper .button {
  background-color: #007bff; /* A standard blue background */
  color: white; /* White text color */
  padding: 5px 30px; /* Spacing inside the button */
  border: none; /* No visible border */
  border-radius: 5px; /* Slightly rounded corners */
  cursor: pointer; /* Indicates a clickable element */
  font-size: 16px; /* Standard font size */
  text-align: center; /* Center the text */
  text-decoration: none; /* Remove underline for anchor buttons */
  display: inline-block; /* Allows for width and height settings */
}

/* Hover effect for interactivity */
.button-print-wrapper .button:hover {
  background-color: #0056b3; /* Darker blue on hover */
  color: #ffffff; /* Ensure text remains white on hover */
}

/* Active state for when the button is clicked */
.button-print-wrapper .button:active {
  background-color: #004085; /* Even darker blue when active */
  color: #ffffff; /* Ensure text remains white when active */
}
@media print {
  * {
    -webkit-print-color-adjust: exact !important; /* Safari & Chrome */
    print-color-adjust: exact !important; /* Standard */
  }
  @page {
    margin: 0;
  }

  body * {
    visibility: hidden;
  }
  body {
    margin: 0;
  }
  .invoice-wrapper,
  .invoice-wrapper * {
    visibility: visible;
  }
  .invoice-wrapper {
    position: absolute;
    width: 100% !important;
    padding: 18px !important;
    margin: 0 !important;
    top: 0;
    left: 0;
    right: 0;
    border: none !important;
    width: 100% !important;
    display: block !important;
  }

  table > tbody > tr > td,
  table > thead > tr > td,
  table > tfoot > tr > td {
    font-size: 0.875rem;
    height: 30px;
  }
  table > tbody > tr > th,
  table > thead > tr > th,
  table > tfoot > tr > th {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    font-size: 0.75rem;
    height: 30px;
  }

  #wpcontent,
  #wpfooter {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  .invoice-items th,
  .invoice-items .invoice-item-row td {
    border: 1px solid #ddd !important;
    padding: 5px !important;
    text-align: left;
  }
}
