/* Public quotation maker — form + A4 estimate print */

.quote-intro {
  margin: 0 0 1.5rem;
  color: var(--color-muted);
  max-width: 46em;
}

.quote-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 960px) {
  .quote-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.quote-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem 1.5rem;
}

.quote-section + .quote-section {
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--color-border);
}

.quote-section h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.quote-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .quote-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .quote-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.quote-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.quote-field span,
.quote-line__amount span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-muted);
}

.quote-field input,
.quote-field select,
.quote-field textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font: inherit;
  color: var(--color-text);
  background: #fff;
}

.quote-field textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.quote-field input:focus,
.quote-field select:focus,
.quote-field textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  border-color: var(--color-primary);
}

.quote-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.quote-presets > span {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.quote-chip {
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--color-text);
}

.quote-chip:hover,
.quote-chip:focus {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.quote-gst-hint {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.quote-lines,
.quote-charges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.quote-line,
.quote-charge {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.85rem;
  background: #f8fafc;
}

.quote-line__top,
.quote-charge {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.quote-field--grow {
  flex: 1;
}

.quote-field--amt {
  width: 7.5rem;
  flex: 0 0 7.5rem;
}

.quote-line__grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.75rem;
}

@media (min-width: 720px) {
  .quote-line__grid {
    grid-template-columns: 5.5rem 5.5rem 5rem 5rem 6.5rem 6.5rem minmax(5.5rem, 1fr);
    align-items: end;
  }
}

.quote-line__amount {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  justify-content: flex-end;
}

.quote-line__amount strong {
  font-size: 0.95rem;
}

.quote-icon-btn {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  color: #b91c1c;
}

.quote-icon-btn:hover {
  background: #fef2f2;
}

.quote-add {
  margin-top: 0.75rem;
}

/* .btn-outline is built for dark hero/CTA bands (white hover text). */
.quote-card .btn-outline,
.quote-preview-toolbar .btn-outline {
  background: #fff;
  color: var(--color-primary-dark);
  border-color: var(--color-border);
}

.quote-card .btn-outline:hover,
.quote-card .btn-outline:focus,
.quote-preview-toolbar .btn-outline:hover,
.quote-preview-toolbar .btn-outline:focus {
  background: #ecfdf5;
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.quote-error {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.quote-summary {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.quote-summary dl {
  margin: 0 0 1rem;
}

.quote-summary .quote-sum-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  font-size: 0.95rem;
}

.quote-summary .quote-sum-row dt {
  color: var(--color-muted);
  font-weight: 500;
}

.quote-summary .quote-sum-row--total {
  border-top: 1px solid var(--color-border);
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.quote-summary .btn {
  width: 100%;
  justify-content: center;
}

.quote-disclaimer {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.quote-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.quote-preview-toolbar p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.quote-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quote-estimate-wrap {
  background: #e2e8f0;
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow: auto;
}

.quote-est-sheet {
  background: #fff;
  color: #111827;
  max-width: 210mm;
  margin: 0 auto;
  padding: 14mm 12mm 12mm;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
  font-size: 12px;
  line-height: 1.45;
}

.quote-est-head {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.quote-est-head td {
  vertical-align: top;
}

.quote-est-seller {
  width: 62%;
  padding-right: 12px;
}

.quote-est-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.quote-est-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: right;
  margin-bottom: 8px;
}

.quote-est-meta table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.quote-est-meta td {
  padding: 1px 0;
}

.quote-est-meta td:first-child {
  color: #64748b;
  width: 42%;
}

.quote-est-parties {
  border: 1px solid #94a3b8;
  border-radius: 4px;
  padding: 8px 10px;
  margin-bottom: 12px;
}

.quote-est-k {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 2px;
}

.quote-est-items {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.quote-est-items th,
.quote-est-items td {
  border: 1px solid #94a3b8;
  padding: 5px 6px;
  text-align: left;
}

.quote-est-items th {
  background: #f8fafc;
  font-size: 11px;
}

.quote-est-items .num,
.quote-est-sum .num {
  text-align: right;
  white-space: nowrap;
}

.quote-est-hsn {
  color: #64748b;
  font-size: 10px;
}

.quote-est-foot {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 16px;
  align-items: start;
}

.quote-est-words p {
  margin: 4px 0 0;
}

.quote-est-sum {
  width: 100%;
  border-collapse: collapse;
}

.quote-est-sum td {
  padding: 3px 0;
}

.quote-est-sum td {
  border-bottom: 1px solid #cbd5e1;
}

.quote-est-grand td {
  font-weight: 700;
  border-top: 1px solid #64748b;
  border-bottom: none;
  padding-top: 6px;
}

.quote-est-notes {
  margin-top: 14px;
}

.quote-est-notes p {
  margin: 4px 0 0;
  white-space: pre-wrap;
}

.quote-est-disclaimer {
  margin: 16px 0 0;
  padding-top: 8px;
  border-top: 1px solid #94a3b8;
  font-size: 10px;
  color: #334155;
  text-align: center;
}

.quote-howto-steps {
  margin: 0;
  padding-left: 1.2rem;
}

.quote-howto-steps li + li {
  margin-top: 0.45rem;
}

@media print {
  .skip-link,
  .site-header,
  .site-footer,
  .page-hero,
  .quote-seo,
  .cta-band,
  .related-features,
  .quote-preview-toolbar,
  #quote-form-phase,
  #quote-error,
  noscript {
    display: none !important;
  }

  main,
  #quote-preview-phase,
  .quote-maker-section,
  .quote-maker-section .container,
  .quote-estimate-wrap {
    display: block !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: auto !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  .quote-est-sheet {
    max-width: none;
    box-shadow: none;
    padding: 0;
    color: #000;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .quote-est-parties,
  .quote-est-items,
  .quote-est-items th,
  .quote-est-items td,
  .quote-est-sum,
  .quote-est-sum td,
  .quote-est-disclaimer {
    border-color: #000 !important;
  }

  .quote-est-parties {
    border: 1px solid #000 !important;
    border-radius: 0;
  }

  .quote-est-items th,
  .quote-est-items td {
    border: 1px solid #000 !important;
    background: transparent !important;
    color: #000 !important;
  }

  .quote-est-sum td {
    border-bottom: 1px solid #000 !important;
    color: #000 !important;
  }

  .quote-est-grand td {
    border-top: 1.5px solid #000 !important;
    border-bottom: none !important;
  }

  .quote-est-disclaimer {
    border-top: 1px solid #000 !important;
    color: #000 !important;
  }

  .quote-est-disclaimer a {
    color: #000 !important;
    text-decoration: none;
  }

  @page {
    size: A4;
    margin: 12mm;
  }
}
