@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&display=swap");
body,
p,
td,
div,
span,
li {
  line-height: 1.6 !important;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9pt;
  color: #000000;
  line-height: 1.3;
}

/* --- FINAL HEADER STYLES TO MATCH TARGET IMAGE --- */
.header-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px; /* Space after the header */
  border-bottom: 1px solid #cccccc; /* The grey line under the header */
  padding-bottom: 8px; /* Space between header content and the line */
}
.header-logo-cell {
  width: 100px; /* Controls the size of the logo. Adjust if needed. */
  padding-right: 15px;
  vertical-align: middle; /* Aligns the logo vertically with the text */
}
.logo {
  width: 100px; /* Explicitly set logo width to 70px */
  height: auto;
}
.header-details-cell {
  vertical-align: middle; /* Aligns the text vertically with the logo */
  text-align: center; /* Text is left-aligned in the target image */
}
.header-details-cell h1 {
  font-size: 13pt;
  font-weight: bold;
  margin: 0;
  color: #000;
  line-height: 1.1;
}
.header-details-cell p {
  margin: 0;
  font-size: 8pt;
  line-height: 1.2;
}
.header-details-cell .reg-no {
  font-size: 7.5pt;
}

/* --- DATE AND REFERENCE --- */
.date-ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9pt;
  margin-bottom: 15px;
}
.date-ref-table td {
  padding: 1px 0;
}
.date-cell {
  text-align: left;
  width: 50%;
}
.ref-cell {
  text-align: right;
  width: 50%;
  font-weight: bold;
}

/* --- RECIPIENT INFO --- */
.recipient-info {
  margin-bottom: 10px;
  font-size: 9pt;
}
.recipient-info p {
  margin: 0 0 1px 0;
  line-height: 1.2;
}

/* --- MAIN DOCUMENT BODY --- */
.quotation-title-section h2 {
  text-align: center;
  font-size: 15pt;
  font-weight: bold;
  text-decoration: underline;
  margin-top: 40px;
  margin-bottom: 20px;
  color: #000;
}
.intro-text {
  margin-bottom: 10px;
  font-size: 9pt;
}
.intro-text p {
  margin: 0;
}

/* --- ITEM SECTIONS --- */
.item-section {
  margin-bottom: 8px;
  page-break-inside: avoid;
}
.item-section h3 {
  font-size: 9pt;
  font-weight: bold;
  background-color: #d4f5f6;
  color: black;
  padding: 4px 8px;
  margin: 0;
}
.item-details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9pt;
  border: 1px solid #bfbfbf;
}
.item-details-table td {
  border: 1px solid #bfbfbf;
  padding: 3px 6px;
  vertical-align: top;
}
.item-details-table tr td:first-child {
  width: 35%;
}

.item-details-table tr.highlighted-price-row,
.item-details-table tr.unit-price-row {
  background-color: #faf9de;
}
.item-details-table td.price-value-cell {
  text-align: right;
  /* color: red; */
  font-weight: normal;
}

/* --- TERMS & CONDITIONS --- */
.terms-conditions {
  margin-top: 15px;
  margin-bottom: 10px;
  page-break-inside: avoid;
}
.terms-conditions h4 {
  font-size: 9pt;
  font-weight: bold;
  margin-bottom: 4px;
  text-decoration: underline;
}
.terms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.5pt;
}
.terms-table td {
  padding: 1px 0;
  vertical-align: top;
  line-height: 1.3;
}
.term-label {
  width: 120px;
  font-weight: bold;
  padding-right: 5px;
}

/* --- CLOSING & SIGNATURES --- */
.closing-text {
  margin-top: 15px;
  margin-bottom: 15px;
  font-size: 9pt;
}
.closing-text p {
  margin: 0;
}
.signature-table-layout {
  width: 100%;
  border-collapse: collapse;
  margin-top: 40px;
  font-size: 9pt;
}
.signature-table-layout td {
  vertical-align: top;
  padding: 0 2px;
  width: 50%;
}
.main-signature-label {
  margin-bottom: 1px;
}
.signature-company-name {
  margin-bottom: 1px;
}
.signature-line-element {
  border-bottom: 0.5pt solid #000;
  height: 1px;
  margin: 40px 0 2px 0;
  width: 75%;
}
.signature-auth-text {
  font-size: 8pt;
}
.signature-name-title-label,
.signature-date-label {
  margin-top: 8px;
  font-size: 9pt;
}

/* --- FOOTER --- */
.footer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 7pt;
  color: #000000;
  line-height: 1.2;
  table-layout: fixed;
}
.footer-table td {
  padding: 0px;
  vertical-align: middle;
}

.footer-logo-partners {
  width: 100% !important;
  height: auto !important;
  display: block;
  margin: 0 0 8px 0; /* keep a small gap above the address line */
}

.footer-address-text {
  font-size: 9.5pt;
  padding-bottom: 2px;
}
.footer-page-number {
  font-size: 8pt;
}

/* ADD THESE NEW STYLES FOR THE TWO-COLUMN LAYOUT */

.signature-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 50px; /* Space above the signature blocks */
  font-size: 9pt;
  page-break-inside: avoid; /* Prevents this table from splitting across pages */
}

.signature-table td {
  width: 50%;
  vertical-align: top;
  padding: 0 15px; /* Adds space between the columns */
}

.signature-table p {
  margin: 0 0 4px 0; /* Consistent spacing for paragraphs */
  line-height: 1.3;
}

/* Creates the tall empty space for a physical signature */
.signature-space {
  height: 60px;
}

/* The solid line for the signature */
.signature-line {
  margin: 12px 0 10px;
}

.signature-table.v2 {
  margin-top: 22px;
}

/* Additional lines for the client's details */
.client-detail-line {
  border-bottom: 1px solid #000;
  height: 1.5em; /* A bit of space for writing */
  margin-top: 15px;
}

.signature-footer {
  font-size: 8pt;
}

/* ADD THESE STYLES to generated_quotation.css */

.signature-space {
  height: 70px; /* Increased height for better spacing */
  position: relative; /* Context for the signature text */
}

.signature-text-ontop {
  position: absolute;
  bottom: -15px; /* Adjust this value to move text up/down */
  left: 0;
  right: 0;
  text-align: center;

  /* Font styles */
  font-family: "Dancing Script", cursive;
  font-size: 22pt;
  font-weight: 700;
  color: #2c3e50;
}

.signature-details {
  margin-top: 5px; /* Space between line and name */
  min-height: 40px; /* Ensures consistent height even if details are missing */
}

/* Tighter rhythm for the closing paragraph */
.closing-tight p {
  margin: 0 0 10px;
  line-height: 1.55;
}

/* New, more polished signature layout that won't clash with your existing .signature-table */
.signature-table.v2 {
  width: 100%;
  border-collapse: separate; /* more reliable spacing in mPDF */
  margin-top: 18px;
}

.signature-table.v2 .signature-cell {
  width: 50%;
  vertical-align: top;
  padding: 14px 16px; /* inner breathing room */
  border: 1px solid #e0e0e0; /* subtle card look */
  border-radius: 8px; /* mPDF supports this */
}

.sig-head {
  margin-bottom: 8px;
}
.sig-company {
  margin-bottom: 12px;
}

/* The pen-sign area */
.signature-pad {
  min-height: 110px; /* adjust to 90/110px if you need more space */
  margin: 20px 0;
  background: #fafafa;
  border: 1px dashed #cfcfcf;
  border-radius: 6px;
  position: relative;
  padding: 6px;
  margin-top: 50px;
}

/* Handwritten overlay — uses your Dancing Script import */
.signature-handwrite {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  font-family:
    "Brush Script MT", "Segoe Script", "Lucida Handwriting", "Dancing Script",
    cursive;
  font-size: 26pt;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1;
  text-transform: none;
  color: #2c3e50;
}

/* Crisp rule below the pad */
.signature-line {
  border-top: 1px solid #333;
  height: 0;
  margin: 10px 0 8px;
  margin-bottom: 50px;
}

/* Name/position/phone block */
.signature-meta {
  font-size: 9.5pt;
  line-height: 1.4;
  color: #333;
  margin-bottom: 4px;
}

.signature-name {
  font-size: 10.5pt;
  margin-bottom: 2px;
}

.signature-foot {
  font-size: 8.5pt;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #666;
  margin-top: 6px;
}

/* Labeled lines for client fill-ins */
.fill-row {
  font-size: 9.5pt;
  margin: 6px 0;
}

.fill-line {
  display: inline-block;
  border-bottom: 1px solid #999;
  width: 65%;
  height: 0.95em;
  vertical-align: baseline;
  margin-left: 6px;
}

.fill-line.short {
  width: 40%;
}

/* Slightly tighter type inside the signature “cards” */
.signature-table.v2 .signature-cell * {
  line-height: 1.45;
}

/* tiny guard so content never hugs the footer */
.page-content {
  padding-bottom: 70px;
} /* matches your larger footer area */

/* keep the signature block together and away from footer */
.signature-table.v2 {
  page-break-inside: avoid;
  margin-bottom: 6px;
}
