/* v0.74.2: corrected invoice-request layout contract. */
#customerInvoiceRequestDialog {
  width: min(1340px, calc(100vw - 20px));
  max-width: none;
  max-height: calc(100vh - 12px);
  padding: 0;
  overflow: hidden;
}

#customerInvoiceRequestDialog > form {
  box-sizing: border-box;
  width: 100%;
  max-height: calc(100vh - 12px);
  padding: .75rem .9rem;
  overflow-x: hidden;
  overflow-y: auto;
}

#customerInvoiceRequestDialog .dialog-actions {
  position: sticky;
  bottom: -.75rem;
  z-index: 9;
  margin: .65rem 0 -.75rem;
  padding: .65rem 0 .75rem;
  background: rgba(255, 255, 255, .98);
}

#customerInvoiceRequestDialog .dialog-heading {
  margin-bottom: .65rem;
  padding-bottom: .65rem;
}

#customerInvoiceRequestDialog .customer-request-layout {
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(270px, .72fr) minmax(500px, 1.5fr);
  grid-template-areas:
    "customer coding lines"
    "customer files lines";
  gap: 10px;
  width: 100%;
  min-width: 0;
  align-items: start;
}

#customerInvoiceRequestDialog .customer-request-customer-section { grid-area: customer; }
#customerInvoiceRequestDialog .customer-request-coding-section { grid-area: coding; }
#customerInvoiceRequestDialog .customer-request-lines-section { grid-area: lines; }
#customerInvoiceRequestDialog .customer-request-files-section { grid-area: files; }

#customerInvoiceRequestDialog .customer-request-panel {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
}

#customerInvoiceRequestDialog .customer-request-panel h3 { margin: 0 0 7px; }
#customerInvoiceRequestDialog .compact-form-grid { gap: .38rem .48rem; }
#customerInvoiceRequestDialog .compact-form-grid input,
#customerInvoiceRequestDialog .compact-form-grid select { min-width: 0; min-height: 35px; }
#customerInvoiceRequestDialog .compact-form-grid textarea { min-width: 0; min-height: 54px; }

#customerInvoiceRequestDialog .customer-request-panel .check-label {
  display: flex;
  min-height: 30px;
  margin: 0;
  align-items: center;
  gap: .5rem;
}

#customerInvoiceRequestDialog .customer-request-panel .check-label input {
  flex: 0 0 auto;
  width: 17px;
  min-width: 17px;
  height: 17px;
  min-height: 17px;
  margin: 0;
}

#customerInvoiceRequestDialog .customer-request-lines-heading {
  margin-bottom: 7px;
}

#customerInvoiceRequestDialog .customer-request-lines-heading h3 { margin: 0; }

#customerInvoiceRequestDialog .customer-request-line {
  box-sizing: border-box;
  grid-template-columns: 64px 78px minmax(90px, 1fr) minmax(90px, 1fr);
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 8px;
  align-items: end;
}

#customerInvoiceRequestDialog .request-line-description { grid-column: 1 / -1; }
#customerInvoiceRequestDialog .request-line-actions { grid-column: span 2; justify-self: end; }

#customerInvoiceRequestDialog .customer-request-line label { min-width: 0; }
#customerInvoiceRequestDialog .customer-request-line input,
#customerInvoiceRequestDialog .customer-request-line textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 35px;
  padding: .4rem .45rem;
}

#customerInvoiceRequestDialog .customer-request-line textarea {
  height: 58px;
  min-height: 58px;
}

#customerInvoiceRequestDialog .request-line-gross {
  min-width: 0;
  min-height: 35px;
  padding: .25rem .35rem;
}

#customerInvoiceRequestDialog .request-line-actions {
  display: grid;
  grid-template-columns: 34px 34px minmax(72px, auto);
  gap: 4px;
}

#customerInvoiceRequestDialog .request-line-actions button {
  min-width: 0;
  min-height: 35px;
  margin: 0;
  padding: .35rem .45rem;
}

#customerInvoiceRequestDialog .customer-request-totals {
  gap: 1.4rem;
  padding: .5rem .25rem 0;
}

#customerInvoiceRequestDialog .customer-request-files-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px 12px;
}

#customerInvoiceRequestDialog .customer-request-files-section h3 { grid-column: auto; }
#customerInvoiceRequestDialog .customer-request-files-section textarea { min-height: 54px; }
#customerInvoiceRequestDialog .customer-request-error { margin: .4rem 0 0; }

.quote-selection-actions { display: flex; align-items: end; gap: 6px; }
.quote-selection-actions button { min-height: 38px; margin: 0; }
.quote-pdf-page .pdf-text-layer > .quote-text-item {
  margin: -3px;
  padding: 3px;
  border-radius: 3px;
  cursor: pointer;
}
.quote-pdf-page .pdf-text-layer > .quote-text-item:hover,
.quote-pdf-page .pdf-text-layer > .quote-text-item:focus-visible {
  outline: 2px solid #1d9a52;
  outline-offset: 0;
  background: rgba(35, 154, 84, .22);
}
.quote-pdf-page .pdf-text-layer > .quote-text-selected {
  outline: 2px solid #087a3c;
  outline-offset: 0;
  background: rgba(35, 154, 84, .42);
}

@media (min-width: 901px) and (min-height: 850px) {
  #customerInvoiceRequestDialog {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  #customerInvoiceRequestDialog > form {
    max-height: none;
    padding-bottom: .8rem;
    overflow: visible;
  }

  #customerInvoiceRequestDialog .dialog-actions {
    position: static;
    margin: .65rem 0 0;
    padding: .65rem 0 0;
  }

  #customerInvoiceRequestDialog:has(#customerRequestLineRows .customer-request-line:nth-child(2)) {
    max-height: calc(100vh - 12px);
    overflow: hidden;
  }

  #customerInvoiceRequestDialog:has(#customerRequestLineRows .customer-request-line:nth-child(2)) > form {
    max-height: calc(100vh - 12px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  #customerInvoiceRequestDialog:has(#customerRequestLineRows .customer-request-line:nth-child(2)) .dialog-actions {
    position: sticky;
    bottom: -.75rem;
    margin: .65rem 0 -.75rem;
    padding: .65rem 0 .75rem;
  }
}

@media (max-width: 1150px) {
  #customerInvoiceRequestDialog .customer-request-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "customer" "coding" "lines" "files";
  }

  #customerInvoiceRequestDialog .customer-request-line {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #customerInvoiceRequestDialog .request-line-gross { align-self: center; }
  #customerInvoiceRequestDialog .request-line-actions { grid-column: span 2; justify-self: end; }
}

@media (max-width: 700px) {
  #customerInvoiceRequestDialog { width: calc(100vw - 8px); max-height: calc(100vh - 8px); }
  #customerInvoiceRequestDialog > form { max-height: calc(100vh - 8px); padding-inline: .65rem; }
  #customerInvoiceRequestDialog .compact-form-grid { grid-template-columns: 1fr; }
  #customerInvoiceRequestDialog .compact-form-grid .span-2,
  #customerInvoiceRequestDialog .compact-form-grid .full { grid-column: auto; }
  #customerInvoiceRequestDialog .customer-request-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #customerInvoiceRequestDialog .request-line-description,
  #customerInvoiceRequestDialog .request-line-actions { grid-column: 1 / -1; }
  #customerInvoiceRequestDialog .request-line-actions { justify-self: stretch; }
  #customerInvoiceRequestDialog .customer-request-files-section { grid-template-columns: 1fr; }
  #customerInvoiceRequestDialog .customer-request-files-section h3 { grid-column: auto; }
  #customerInvoiceRequestDialog .customer-request-lines-heading { align-items: flex-start; }
  #customerInvoiceRequestDialog .customer-request-totals { justify-content: space-between; gap: .5rem; }
}
