/*
 * Shared customer quote document styles.
 *
 * This file controls both the browser Customer Quote preview and generated
 * Customer PDF attachments. Renderer-specific paper and preview-shell rules
 * remain in their respective entry points.
 */

.test-quote-banner,
.quote-preview-content .test-quote-banner {
  border: 1px solid #991b1b;
  color: #991b1b;
  background: #fef2f2;
  text-align: center;
  font-weight: 800;
  letter-spacing: .08em;
  font-size: 13px;
  padding: 5px 10px;
  margin-bottom: 10px;
}

.preliminary-estimate-banner,
.quote-preview-content .preliminary-estimate-banner {
  border: 1px solid #6ca7d5;
  color: #234d73;
  background: #edf6ff;
  text-align: center;
  font-weight: 800;
  letter-spacing: .04em;
  font-size: 12px;
  padding: 6px 10px;
  margin-bottom: 10px;
}

.customer-quote header,
.customer-quote .quote-parties,
.quote-preview-content .customer-quote header,
.quote-preview-content .quote-parties {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #d1d5db;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.customer-quote .quote-header,
.quote-preview-content .customer-quote .quote-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(190px, 1fr);
  grid-template-rows: repeat(3, minmax(18px, auto));
  align-items: start;
  column-gap: 18px;
  row-gap: 0;
  padding-bottom: 9px;
  margin-bottom: 11px;
}

.customer-quote header div:last-child,
.quote-preview-content .customer-quote header div:last-child {
  display: grid;
  gap: 4px;
  text-align: right;
}

.customer-quote .quote-logo-anchor,
.quote-preview-content .customer-quote .quote-logo-anchor {
  grid-column: 1;
  grid-row: 1 / 4;
  justify-self: start;
  align-self: start;
  min-width: 0;
}

.customer-quote .quote-company-line,
.quote-preview-content .customer-quote .quote-company-line {
  grid-column: 2;
  justify-self: center;
  align-self: start;
  text-align: center;
  line-height: 18px;
  white-space: nowrap;
}

.customer-quote .quote-company-name,
.quote-preview-content .customer-quote .quote-company-name {
  grid-row: 1;
  font-size: 15px;
  font-weight: 800;
}

.customer-quote .quote-company-address,
.quote-preview-content .customer-quote .quote-company-address {
  grid-row: 2;
}

.customer-quote .quote-company-contact,
.quote-preview-content .customer-quote .quote-company-contact {
  grid-row: 3;
}

.customer-quote .quote-meta-row,
.quote-preview-content .customer-quote .quote-meta-row {
  grid-column: 3;
  display: grid;
  grid-template-columns: 54px 120px;
  column-gap: 6px;
  align-items: start;
  justify-self: end;
  align-self: start;
  line-height: 18px;
  min-width: 180px;
}

.customer-quote .quote-meta-identity,
.quote-preview-content .customer-quote .quote-meta-identity {
  grid-row: 1;
  font-size: 15px;
  font-weight: 800;
}

.customer-quote .quote-meta-date,
.quote-preview-content .customer-quote .quote-meta-date {
  grid-row: 2;
}

.customer-quote .quote-meta-expires,
.quote-preview-content .customer-quote .quote-meta-expires {
  grid-row: 3;
}

.customer-quote .quote-meta-row span:first-child,
.customer-quote .quote-meta-row span:last-child,
.quote-preview-content .customer-quote .quote-meta-row span:first-child,
.quote-preview-content .customer-quote .quote-meta-row span:last-child {
  text-align: right;
}

.customer-quote .quote-logo-block {
  display: grid;
  gap: 8px;
}

.customer-quote .quote-logo,
.quote-preview-content .customer-quote .quote-logo {
  display: block;
  width: 190px;
  max-width: 100%;
  height: auto;
}

.customer-quote .quote-notes-page,
.quote-preview-content .customer-quote .quote-notes-page {
  break-before: page;
  page-break-before: always;
}

.customer-quote .quote-notes-page-logo,
.quote-preview-content .customer-quote .quote-notes-page-logo {
  display: flex;
  justify-content: center;
  margin: 0 0 22px;
}

.customer-quote h2,
.quote-preview-content .customer-quote h2 {
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: uppercase;
}

.customer-quote p,
.customer-quote li,
.customer-quote span,
.customer-quote small,
.quote-preview-content .customer-quote p,
.quote-preview-content .customer-quote li,
.quote-preview-content .customer-quote span,
.quote-preview-content .customer-quote small {
  font-size: 12px;
  line-height: 1.45;
}

.customer-quote .quote-parties h2,
.quote-preview-content .customer-quote .quote-parties h2 {
  margin: 0 0 4px;
  color: #53657a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.customer-quote .quote-parties p,
.quote-preview-content .customer-quote .quote-parties p {
  margin: 0;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.customer-quote table,
.quote-preview-content .customer-quote table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 12px 0;
}

.customer-quote th,
.customer-quote td,
.quote-preview-content .customer-quote th,
.quote-preview-content .customer-quote td {
  border-bottom: 1px solid #d1d5db;
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  word-break: normal;
}

.customer-quote th:nth-child(1),
.customer-quote td:nth-child(1),
.quote-preview-content .customer-quote th:nth-child(1),
.quote-preview-content .customer-quote td:nth-child(1) {
  width: 52px;
}

.customer-quote th:nth-child(2),
.customer-quote td:nth-child(2),
.quote-preview-content .customer-quote th:nth-child(2),
.quote-preview-content .customer-quote td:nth-child(2) {
  width: 52px;
}

.customer-quote th:last-child,
.customer-quote td:last-child,
.quote-preview-content .customer-quote th:last-child,
.quote-preview-content .customer-quote td:last-child {
  width: 120px;
  text-align: right;
}

.customer-quote .quote-structures-table .quote-line-col,
.customer-quote .quote-structures-table th:nth-child(1),
.customer-quote .quote-structures-table td:nth-child(1),
.quote-preview-content .customer-quote .quote-structures-table .quote-line-col,
.quote-preview-content .customer-quote .quote-structures-table th:nth-child(1),
.quote-preview-content .customer-quote .quote-structures-table td:nth-child(1) {
  width: 42px;
}

.customer-quote .quote-structures-table .quote-qty-col,
.customer-quote .quote-structures-table th:nth-child(2),
.customer-quote .quote-structures-table td:nth-child(2),
.quote-preview-content .customer-quote .quote-structures-table .quote-qty-col,
.quote-preview-content .customer-quote .quote-structures-table th:nth-child(2),
.quote-preview-content .customer-quote .quote-structures-table td:nth-child(2) {
  width: 42px;
}

.customer-quote .quote-structures-table .quote-representation-col,
.customer-quote .quote-structures-table th:nth-child(4),
.customer-quote .quote-structures-table td:nth-child(4),
.quote-preview-content .customer-quote .quote-structures-table .quote-representation-col,
.quote-preview-content .customer-quote .quote-structures-table th:nth-child(4),
.quote-preview-content .customer-quote .quote-structures-table td:nth-child(4) {
  width: 120px;
}

.customer-quote .quote-structures-table .quote-amount-col,
.customer-quote .quote-structures-table th:last-child,
.customer-quote .quote-structures-table td:last-child,
.quote-preview-content .customer-quote .quote-structures-table .quote-amount-col,
.quote-preview-content .customer-quote .quote-structures-table th:last-child,
.quote-preview-content .customer-quote .quote-structures-table td:last-child {
  width: 144px;
}

.customer-quote .quote-structures-table-v2 .quote-qty-col,
.quote-preview-content .customer-quote .quote-structures-table-v2 .quote-qty-col {
  width: 42px !important;
}

.customer-quote .quote-structures-table-v2 .quote-representation-col,
.quote-preview-content .customer-quote .quote-structures-table-v2 .quote-representation-col {
  width: 120px !important;
}

.customer-quote .quote-structures-table-v2 .quote-unit-price-col,
.customer-quote .quote-structures-table-v2 .quote-amount-col,
.quote-preview-content .customer-quote .quote-structures-table-v2 .quote-unit-price-col,
.quote-preview-content .customer-quote .quote-structures-table-v2 .quote-amount-col {
  width: 110px !important;
}

.customer-quote .quote-structures-table-v2 .quote-unit-price-cell,
.customer-quote .quote-structures-table-v2 .quote-amount-cell,
.quote-preview-content .customer-quote .quote-structures-table-v2 .quote-unit-price-cell,
.quote-preview-content .customer-quote .quote-structures-table-v2 .quote-amount-cell {
  text-align: right;
  white-space: nowrap;
  width: 110px !important;
}

.customer-quote .quote-structures-table-v2 .quote-qty-cell,
.quote-preview-content .customer-quote .quote-structures-table-v2 .quote-qty-cell {
  width: 42px !important;
}

.customer-quote .quote-structures-table-v2 .quote-item-cell,
.quote-preview-content .customer-quote .quote-structures-table-v2 .quote-item-cell {
  width: auto !important;
}

.customer-quote .quote-representation-cell,
.quote-preview-content .customer-quote .quote-representation-cell {
  width: 120px;
  text-align: center !important;
  vertical-align: middle !important;
}

.customer-quote .quote-structure-representation,
.quote-preview-content .customer-quote .quote-structure-representation {
  display: block;
  width: 82px;
  max-width: 100%;
  height: 50px;
  margin: 0 auto;
  object-fit: contain;
}

.customer-quote .quote-line-footing-detail,
.quote-preview-content .customer-quote .quote-line-footing-detail {
  display: inline-block;
  margin-top: 2px;
}

.customer-quote .quote-extras-table,
.quote-preview-content .customer-quote .quote-extras-table {
  margin-top: 6px;
}

.customer-quote .quote-extras-table th:first-child,
.customer-quote .quote-extras-table td:first-child,
.quote-preview-content .customer-quote .quote-extras-table th:first-child,
.quote-preview-content .customer-quote .quote-extras-table td:first-child {
  width: auto;
}

.customer-quote .quote-extras-table th:last-child,
.customer-quote .quote-extras-table td:last-child,
.quote-preview-content .customer-quote .quote-extras-table th:last-child,
.quote-preview-content .customer-quote .quote-extras-table td:last-child {
  width: 120px;
  text-align: right;
}

.customer-quote .quote-total,
.quote-preview-content .customer-quote .quote-total {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: flex-end;
  gap: 8px 24px;
  margin: 22px 0;
  font-size: 18px;
}

.customer-quote .quote-total span,
.customer-quote .quote-total strong,
.quote-preview-content .customer-quote .quote-total span,
.quote-preview-content .customer-quote .quote-total strong {
  text-align: right;
}

.customer-quote .quote-project-visuals,
.quote-preview-content .customer-quote .quote-project-visuals {
  margin: 22px 0;
  padding-top: 16px;
  border-top: 1px solid #d1d5db;
}

.customer-quote .quote-project-visuals h2,
.quote-preview-content .customer-quote .quote-project-visuals h2 {
  margin: 0 0 10px;
}

.customer-quote .quote-project-visual-grid,
.quote-preview-content .customer-quote .quote-project-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.customer-quote .quote-project-visual-count-1,
.quote-preview-content .customer-quote .quote-project-visual-count-1 {
  grid-template-columns: minmax(0, 1fr);
}

.customer-quote .quote-project-visual,
.quote-preview-content .customer-quote .quote-project-visual {
  display: grid;
  gap: 7px;
  margin: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}

.customer-quote .quote-project-visual img,
.quote-preview-content .customer-quote .quote-project-visual img {
  display: block;
  width: 100%;
  height: 2.25in;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  object-fit: contain;
}

.customer-quote .quote-project-visual-count-1 .quote-project-visual img,
.quote-preview-content .customer-quote .quote-project-visual-count-1 .quote-project-visual img {
  height: 3.25in;
}

.customer-quote .quote-project-visual-footing,
.quote-preview-content .customer-quote .quote-project-visual-footing {
  width: min(100%, 3.5in);
  justify-self: center;
}

.customer-quote .quote-project-visual-footing img,
.customer-quote .quote-project-visual-count-1 .quote-project-visual-footing img,
.quote-preview-content .customer-quote .quote-project-visual-footing img,
.quote-preview-content .customer-quote .quote-project-visual-count-1 .quote-project-visual-footing img {
  width: 100%;
  height: 2in;
}

.customer-quote .quote-project-visual figcaption,
.quote-preview-content .customer-quote .quote-project-visual figcaption {
  color: #374151;
  font-size: 11px;
  line-height: 1.35;
}

.customer-quote .quote-line-summary td,
.quote-preview-content .customer-quote .quote-line-summary td {
  padding-top: 9px;
}

.customer-quote .quote-structure-row td,
.customer-quote .quote-option-subtotal td,
.quote-preview-content .customer-quote .quote-structure-row td,
.quote-preview-content .customer-quote .quote-option-subtotal td {
  background: #f3f5f7;
}

.customer-quote .quote-option-row.not-included td,
.quote-preview-content .customer-quote .quote-option-row.not-included td {
  color: #374151;
}

.customer-quote .not-included-text,
.quote-preview-content .customer-quote .not-included-text {
  display: inline-block;
  margin-left: 16px;
  font-style: italic;
  color: #111827;
}

.customer-quote .quote-notes,
.customer-quote .quote-notes p,
.customer-quote .quote-notes div,
.customer-quote .quote-notes li,
.quote-preview-content .customer-quote .quote-notes,
.quote-preview-content .customer-quote .quote-notes p,
.quote-preview-content .customer-quote .quote-notes div,
.quote-preview-content .customer-quote .quote-notes li {
  line-height: 1.45;
}

.customer-quote .quote-notes ul,
.customer-quote .quote-notes ol,
.quote-preview-content .customer-quote .quote-notes ul,
.quote-preview-content .customer-quote .quote-notes ol {
  margin: 0 0 0 20px;
  padding: 0;
}

.customer-quote .quote-notes p,
.customer-quote .quote-notes div,
.quote-preview-content .customer-quote .quote-notes p,
.quote-preview-content .customer-quote .quote-notes div {
  margin: 0 0 8px;
}

.customer-quote .quote-acceptance-block,
.quote-preview-content .customer-quote .quote-acceptance-block {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #111827;
  break-inside: avoid;
  page-break-inside: avoid;
}

.customer-quote .quote-acceptance-parties,
.quote-preview-content .customer-quote .quote-acceptance-parties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}

.customer-quote .quote-acceptance-party,
.quote-preview-content .customer-quote .quote-acceptance-party {
  display: grid;
  gap: 0;
}

.customer-quote .quote-acceptance-party strong,
.quote-preview-content .customer-quote .quote-acceptance-party strong {
  font-size: 12px;
}

.customer-quote .quote-acceptance-name-line,
.customer-quote .quote-acceptance-seller-name,
.quote-preview-content .customer-quote .quote-acceptance-name-line,
.quote-preview-content .customer-quote .quote-acceptance-seller-name {
  min-height: 24px;
  border-bottom: 1px solid #111827;
  padding: 4px 2px 2px;
  font-size: 12px;
  font-weight: 700;
}

.customer-quote .quote-acceptance-seller-name,
.quote-preview-content .customer-quote .quote-acceptance-seller-name {
  text-align: center;
}

.customer-quote .quote-acceptance-field,
.quote-preview-content .customer-quote .quote-acceptance-field {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  min-height: 22px;
  border-bottom: 1px solid #111827;
  align-items: end;
  font-size: 12px;
}

.customer-quote .quote-acceptance-signature-field,
.quote-preview-content .customer-quote .quote-acceptance-signature-field {
  min-height: 44px;
}

.customer-quote .quote-acceptance-field span,
.quote-preview-content .customer-quote .quote-acceptance-field span {
  padding: 2px;
}

.customer-quote .quote-acceptance-logo,
.quote-preview-content .customer-quote .quote-acceptance-logo {
  display: block;
  width: 122px;
  max-width: 100%;
  height: auto;
  margin: 22px auto 0;
}
