/* Editable print-style quote workspace. This layer only changes presentation. */
.view:has(#quote-form) {
  width: min(1220px, 100%);
  padding-top: 24px;
}

.quote-editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: -24px -8px 20px;
  padding: 14px 16px;
  border: 1px solid #e3e7ef;
  border-radius: 14px;
  background: rgba(247, 249, 252, .94);
  box-shadow: 0 10px 32px rgba(28, 38, 62, .08);
  backdrop-filter: blur(14px);
}

.quote-editor-toolbar > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quote-editor-toolbar h1 {
  margin: 0;
  font-size: 20px;
}

.quote-editor-toolbar .subtle {
  display: none;
}

.quote-editor-toolbar .back-link {
  margin: 0;
}

.quote-editor-toolbar .heading-actions {
  gap: 8px;
}

.print-action {
  border: 1px solid #d9ddea;
  background: #fff;
  color: #222b3c;
  box-shadow: 0 3px 12px rgba(35, 46, 72, .06);
}

.print-action::before {
  content: '↗';
  margin-right: 7px;
  color: var(--brand, #5b5df0);
  font-weight: 900;
}

.quote-editor-shell {
  display: block !important;
  max-width: 980px;
  margin: 0 auto 70px;
}

.quote-editor-shell .editor-main {
  width: 100%;
}

.quote-editor-shell .editor-sidebar {
  width: 100%;
}

.quote-editor-paper {
  display: block !important;
  overflow: hidden;
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid #e2e6ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(31, 42, 68, .12);
}

.quote-editor-masthead {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;
  padding: 36px 38px 30px;
  border-bottom: 2px solid #111827;
}

.quote-editor-brand-block {
  display: flex;
  gap: 14px;
  align-items: center;
}

.quote-editor-brand-block .document-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 13px;
}

.quote-editor-brand-block > div {
  display: grid;
  gap: 3px;
}

.quote-editor-brand-block strong {
  color: #111827;
  font-size: 17px;
}

.quote-editor-brand-block small {
  color: #7a8498;
  font-size: 10px;
}

.quote-editor-document-title {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.quote-editor-document-title span {
  color: #111827;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: .08em;
}

.quote-editor-document-title strong {
  color: var(--brand, #5b5df0);
  font-size: 13px;
  letter-spacing: .04em;
}

.quote-editor-paper > .form-panel,
.quote-editor-paper > .summary-card {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.quote-editor-paper > .form-panel {
  padding: 28px 38px;
}

.quote-editor-paper > .form-panel + .form-panel,
.quote-editor-paper > .quote-editor-document-totals + .form-panel {
  border-top: 1px solid #e9ecf2;
}

.quote-editor-paper .section-title {
  margin-bottom: 18px;
}

.quote-editor-paper .section-title .step {
  display: none;
}

.quote-editor-paper .section-title h2 {
  color: #111827;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.quote-editor-paper .section-title p {
  margin-top: 3px;
  color: #8a93a6;
  font-size: 10px;
}

.quote-editor-paper .field > span,
.quote-editor-paper .line-total > span {
  color: #667085;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.quote-editor-paper input,
.quote-editor-paper select,
.quote-editor-paper textarea {
  border-color: #dfe3eb;
  background: #fff;
  box-shadow: none;
}

.quote-editor-paper input:focus,
.quote-editor-paper select:focus,
.quote-editor-paper textarea:focus {
  border-color: #8d8ff8;
  box-shadow: 0 0 0 3px rgba(91, 93, 240, .10);
}

.quote-editor-customer .form-grid.two {
  grid-template-columns: 1.3fr 1fr;
}

.quote-editor-paper .saved-shortcut {
  max-width: 360px;
  margin: 0 0 16px;
  padding: 10px;
  border-style: dashed;
}

.quote-editor-details .form-grid.three {
  padding-bottom: 22px;
  border-bottom: 1px solid #edf0f4;
}

.quote-editor-paper .line-items-wrap {
  margin-top: 24px;
}

.quote-editor-paper .line-items-heading {
  margin-bottom: 10px;
}

.quote-editor-paper .line-items-heading h3 {
  color: #111827;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.quote-editor-paper .line-item {
  gap: 10px;
  margin: 0;
  padding: 12px 10px;
  border: 1px solid #e4e7ed;
  border-bottom: 0;
  border-radius: 0;
  background: #fff;
}

.quote-editor-paper .line-item:first-of-type {
  border-radius: 10px 10px 0 0;
}

.quote-editor-paper .line-item:last-child {
  border-bottom: 1px solid #e4e7ed;
  border-radius: 0 0 10px 10px;
}

.quote-editor-paper .line-item input {
  height: 38px;
}

.quote-editor-paper .line-total {
  align-self: end;
  min-height: 38px;
  padding-bottom: 8px;
}

.quote-editor-paper .pricing-grid {
  width: min(520px, 100%);
  margin: 20px 0 0 auto;
  padding: 16px;
  border: 1px solid #e4e7ed;
  border-radius: 10px;
  background: #fafbfe;
}

.quote-editor-document-totals {
  position: static !important;
  width: min(390px, calc(100% - 76px));
  margin: 0 38px 30px auto !important;
  padding: 18px 20px 16px !important;
  border: 1px solid #dfe3eb !important;
  border-radius: 12px !important;
  background: #fbfcff !important;
}

.quote-editor-document-totals .summary-brand,
.quote-editor-document-totals .button,
.quote-editor-document-totals .autosave-note {
  display: none !important;
}

.quote-editor-document-totals .summary-row,
.quote-editor-document-totals .summary-total {
  padding-block: 7px;
}

.quote-editor-document-totals .summary-total {
  margin-top: 5px;
  padding-top: 13px;
  border-top: 1px solid #dfe3eb;
}

.quote-editor-document-totals .summary-total strong {
  color: var(--brand, #5b5df0);
  font-size: 24px;
}

.quote-editor-message textarea {
  min-height: 88px;
}

.quote-editor-sidebar-empty {
  display: none !important;
}

.quote-editor-paper::after {
  content: 'Thank you for the opportunity to earn your business.  •  Created with QuoteForge';
  display: block;
  padding: 18px 38px;
  border-top: 1px solid #e9ecf2;
  color: #8a93a6;
  font-size: 9px;
  text-align: center;
  letter-spacing: .02em;
}

@media (max-width: 900px) {
  .quote-editor-toolbar {
    position: static;
    margin-inline: 0;
  }

  .quote-editor-toolbar,
  .quote-editor-toolbar > div:first-child,
  .quote-editor-toolbar .heading-actions {
    align-items: stretch;
  }

  .quote-editor-toolbar {
    gap: 12px;
  }

  .quote-editor-paper {
    border-radius: 10px;
  }

  .quote-editor-masthead,
  .quote-editor-paper > .form-panel {
    padding-inline: 24px;
  }

  .quote-editor-document-totals {
    width: calc(100% - 48px);
    margin-inline: 24px !important;
  }
}

@media (max-width: 680px) {
  .quote-editor-toolbar {
    display: grid;
  }

  .quote-editor-toolbar > div:first-child {
    display: block;
  }

  .quote-editor-toolbar .heading-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .quote-editor-toolbar .heading-actions .button {
    width: 100%;
  }

  .quote-editor-toolbar .heading-actions .button.primary {
    grid-column: 1 / -1;
  }

  .quote-editor-masthead {
    padding: 24px 18px;
  }

  .quote-editor-document-title span {
    font-size: 22px;
  }

  .quote-editor-paper > .form-panel {
    padding: 22px 18px;
  }

  .quote-editor-customer .form-grid.two {
    grid-template-columns: 1fr;
  }

  .quote-editor-document-totals {
    width: calc(100% - 36px);
    margin: 0 18px 22px !important;
  }
}

@media print {
  .quote-editor-toolbar,
  .quote-editor-shell {
    display: none !important;
  }
}
