/* The decorated wrapper owns the padding. Its form spans all available tracks. */
body div:has(> form.bottom-estimate) {
  min-width: 0;
  padding: clamp(22px, 3vw, 36px);
}
#contactForm.bottom-estimate {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  width: 100%;
  min-width: 0;
  margin: 0;
}
#contactForm.bottom-estimate .form-row { display: contents; }
#contactForm.bottom-estimate .form-group { min-width: 0; margin: 0; }
#contactForm.bottom-estimate .form-group label {
  display: block;
  font: 800 13px/1.3 Archivo, Arial, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0 0 6px;
}
#contactForm.bottom-estimate .form-group :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1.5px solid rgba(59,30,14,.55);
  border-radius: 12px;
  background-color: #fffdf9;
  color: #3b1e0e;
  font: 400 16px/1.3 Archivo, Arial, sans-serif;
}
#contactForm.bottom-estimate .form-group select {
  appearance: auto;
  line-height: normal;
}
#contactForm.bottom-estimate .form-group textarea {
  display: block;
  min-height: 110px;
  resize: vertical;
}
#contactForm.bottom-estimate > h3 {
  margin: 0 0 4px;
  font: 400 34px/1 "Instrument Serif", Georgia, serif;
  text-transform: none;
  letter-spacing: normal;
}
#contactForm.bottom-estimate > :is(h3, .full-field, .form-checkbox, [role="status"], button) {
  grid-column: 1 / -1;
}
#contactForm.bottom-estimate .form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
}
#contactForm.bottom-estimate .form-checkbox input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #3b1e0e;
}
#contactForm.bottom-estimate .form-checkbox input::before { content: none; }
#contactForm.bottom-estimate .form-checkbox label {
  display: block;
  margin: 0;
  font: 400 13px/1.45 Archivo, Arial, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
#contactForm.bottom-estimate .form-checkbox label a {
  display: inline;
  min-height: 0;
  min-width: 0;
}
#contactForm.bottom-estimate .form-submit {
  width: 100%;
  min-height: 48px;
  padding: 8px 16px;
  border: 2px solid #3b1e0e;
  background: #e8772b;
  color: #3b1e0e;
  font: 800 15px Archivo, Arial, sans-serif;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 999px;
}
#contactForm.bottom-estimate .form-submit:is(:hover, :focus-visible) {
  background: #3b1e0e;
  color: white;
}
@media (max-width: 599px) {
  #contactForm.bottom-estimate { grid-template-columns: minmax(0, 1fr); }
}

/* Keep both optional prompts readable before the estimate section stacks. */
div:has(> form.bottom-estimate) { container: estimate-card / inline-size; }
@media (min-width: 901px) {
  .end2:has(.bottom-estimate),
  .sp-cta-grid:has(.bottom-estimate),
  .contact-grid:has(.bottom-estimate) {
    grid-template-columns: minmax(0, .95fr) minmax(490px, 1.05fr);
  }
}
@media (min-width: 600px) {
  @container estimate-card (max-width: 490px) {
    #contactForm.bottom-estimate .form-group label { font-size: 12px; letter-spacing: 0; }
    #contactForm.bottom-estimate .form-group select { font-size: 14px; padding-inline: 8px; }
  }
}

@container estimate-card (max-width: 250px) {
  #contactForm.bottom-estimate .form-group select { padding-inline: 8px; }
}

/* Project Map already has a padded card around its form mount. */
.contact-form-wrapper:has(form.bottom-estimate) { padding: clamp(22px, 3vw, 36px); }
.contact-form-wrapper > div:has(> form.bottom-estimate) { padding: 0; }
