.quote-tool-page {
  background: #eef2f4;
}

.quote-tool-main {
  min-height: 100vh;
}

.quote-tool-intro {
  padding: clamp(48px, 7vw, 82px) 0 38px;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(4, 11, 18, .96), rgba(6, 27, 40, .86)),
    url("assets/img/hero-hg.webp") center / cover no-repeat;
}

.quote-tool-intro h1 {
  max-width: 760px;
  margin: 8px 0 14px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1;
}

.quote-tool-intro p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 1.05rem;
}

.quote-builder {
  padding: 36px 0 68px;
}

.quote-builder__layout {
  display: grid;
  grid-template-columns: minmax(360px, .8fr) minmax(520px, 1.2fr);
  align-items: start;
  gap: 28px;
}

.quote-editor,
.quote-preview-panel {
  border: 1px solid #d5dde2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(5, 19, 28, .09);
}

.quote-editor {
  padding: clamp(20px, 3vw, 32px);
}

.quote-editor__heading,
.quote-preview-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.quote-editor__heading h2,
.quote-preview-panel__header h2 {
  margin: 5px 0 0;
  font-size: 1.7rem;
}

.quote-editor__saved {
  min-height: 22px;
  color: #287048;
  font-size: .84rem;
  font-weight: 700;
  text-align: right;
}

.quote-fieldset {
  min-width: 0;
  margin: 24px 0 0;
  padding: 20px;
  border: 1px solid #dce3e7;
  border-radius: 14px;
}

.quote-fieldset legend {
  padding: 0 8px;
  color: #0b2737;
  font-size: 1rem;
  font-weight: 800;
}

.quote-fieldset__help {
  margin: 0 0 14px;
  color: #5d6971;
  font-size: .88rem;
}

.quote-fields {
  display: grid;
  gap: 16px;
}

.quote-fields--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quote-fields label,
.parts-grid label {
  color: #1c2c35;
  font-size: .9rem;
  font-weight: 700;
}

.quote-fields input,
.quote-fields textarea,
.quote-fields select {
  width: 100%;
  margin-top: 7px;
  border: 1px solid #bdc8ce;
  border-radius: 10px;
  background: #fff;
  color: #101b21;
  font: inherit;
}

.quote-fields input,
.quote-fields select {
  min-height: 45px;
  padding: 0 13px;
}

.quote-fields select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #f15a0a 50%),
    linear-gradient(135deg, #f15a0a 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 20px,
    calc(100% - 14px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.quote-fields textarea {
  min-height: 126px;
  padding: 12px 13px;
  resize: vertical;
}

.quote-fields input:focus,
.quote-fields textarea:focus,
.quote-fields select:focus {
  border-color: #f15a0a;
  outline: 3px solid rgba(241, 90, 10, .14);
}

.quote-fields input[readonly] {
  background: #edf1f3;
  color: #35434b;
}

.quote-fields small {
  display: block;
  margin-top: 5px;
  color: #718087;
  font-weight: 500;
  text-align: right;
}

.quote-fields__hint {
  text-align: left !important;
  line-height: 1.45;
}

.parts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
}

.parts-grid label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid #dce3e7;
  border-radius: 9px;
  background: #f8fafb;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}

.parts-grid label:has(input:checked) {
  border-color: #f15a0a;
  background: #fff1e8;
}

.parts-grid input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: #f15a0a;
}

.quote-editor__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.quote-editor__actions .button {
  width: 100%;
  min-height: 48px;
}

.button--secondary {
  border: 1px solid #0e2838;
  background: #0e2838;
  color: #fff;
}

.button--outline-dark {
  border: 1px solid #40525d;
  background: transparent;
  color: #1b2b34;
}

.button--ghost {
  border: 1px dashed #aebbc2;
  background: #f7f9fa;
  color: #33444d;
}

.quote-editor__note {
  margin: 16px 0 0;
  color: #718087;
  font-size: .8rem;
  line-height: 1.5;
}

.quote-preview-panel {
  position: sticky;
  top: 118px;
  padding: 22px;
}

.quote-preview-panel__header {
  margin-bottom: 16px;
}

.preview-zoom {
  border: 1px solid #c7d0d5;
  border-radius: 999px;
  padding: 8px 13px;
  background: #fff;
  color: #17262e;
  font-weight: 800;
  cursor: pointer;
}

.quote-preview-shell {
  overflow: auto;
  max-height: calc(100vh - 210px);
  border: 1px solid #cbd3d8;
  border-radius: 10px;
  background: #dfe5e8;
}

.quote-preview-shell canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.quote-preview-shell.is-zoomed canvas {
  width: 1103px;
  max-width: none;
}

.quote-tool-footer .footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.quote-tool-footer a {
  color: #fff;
}

@media (max-width: 1120px) {
  .quote-builder__layout {
    grid-template-columns: 1fr;
  }

  .quote-preview-panel {
    position: static;
  }

  .quote-preview-shell {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .quote-tool-intro {
    padding-top: 36px;
  }

  .quote-builder {
    padding-top: 22px;
  }

  .quote-editor,
  .quote-preview-panel {
    border-radius: 12px;
  }

  .quote-editor {
    padding: 16px;
  }

  .quote-fieldset {
    padding: 15px;
  }

  .quote-fields--two,
  .parts-grid,
  .quote-editor__actions {
    grid-template-columns: 1fr;
  }

  .quote-preview-panel {
    padding: 14px;
  }

  .quote-tool-footer .footer__bottom {
    flex-direction: column;
  }
}

@media print {
  body * {
    visibility: hidden !important;
  }

  .quote-preview-panel,
  .quote-preview-panel * {
    visibility: visible !important;
  }

  .quote-preview-panel {
    position: absolute;
    inset: 0;
    width: 100%;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .quote-preview-panel__header {
    display: none;
  }

  .quote-preview-shell {
    overflow: visible;
    max-height: none;
    border: 0;
    background: #fff;
  }

  .quote-preview-shell canvas {
    width: 100%;
  }
}
