.cbf-form-wrapper {
  --cbf-primary: #2f9e6f;
  --cbf-primary-dark: #1f7a54;
  --cbf-primary-light: #eaf7ef;
  --cbf-bg: #ffffff;
  --cbf-bg-soft: #f7faf8;
  --cbf-border: #e3e9e5;
  --cbf-text: #1c2b23;
  --cbf-text-soft: #5b6b62;
  --cbf-text-faint: #8b968f;
  --cbf-error: #c0392b;
  --cbf-error-bg: #fdecea;
  --cbf-radius-lg: 16px;
  --cbf-radius-md: 12px;
  --cbf-radius-sm: 8px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  background: var(--cbf-bg);
  border-radius: var(--cbf-radius-lg);
  padding: 36px 32px;
  box-shadow: 0 1px 2px rgba(16, 40, 29, 0.04), 0 12px 32px rgba(16, 40, 29, 0.08);
  border: 1px solid rgba(16, 40, 29, 0.04);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--cbf-text);
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}
.cbf-form-wrapper * { box-sizing: border-box; }
.cbf-form-wrapper img { max-width: 100%; }

/* Header */
.cbf-form-header { margin-bottom: 28px; }
.cbf-form-wrapper h3 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--cbf-text);
}
.cbf-form-subtitle {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--cbf-text-soft);
}
.cbf-form-wrapper h4 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--cbf-primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
}

/* Notice banner */
.cbf-form-notice {
  padding: 13px 16px;
  border-radius: var(--cbf-radius-sm);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 22px;
  font-weight: 500;
}
.cbf-form-notice.cbf-notice-success {
  background: var(--cbf-primary-light);
  border: 1px solid #b9e4c9;
  color: var(--cbf-primary-dark);
}
.cbf-form-notice.cbf-notice-error {
  background: var(--cbf-error-bg);
  border: 1px solid #f2c1bb;
  color: var(--cbf-error);
}

/* Progress bar */
.cbf-progress { margin-bottom: 30px; }
.cbf-progress-bar-track {
  background: var(--cbf-border);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}
.cbf-progress-bar {
  background: linear-gradient(90deg, var(--cbf-primary), var(--cbf-primary-dark));
  height: 100%;
  border-radius: 3px;
  transition: width 0.35s ease;
}
.cbf-progress-steps { display: flex; justify-content: space-between; }
.cbf-step {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--cbf-bg-soft);
  border: 2px solid var(--cbf-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cbf-text-faint);
  transition: all 0.25s ease;
}
.cbf-step.is-active {
  background: var(--cbf-primary);
  border-color: var(--cbf-primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(47, 158, 111, 0.15);
}
.cbf-step.is-done {
  background: var(--cbf-primary-dark);
  border-color: var(--cbf-primary-dark);
  color: #fff;
}

/* Panels */
.cbf-step-panel { display: none; animation: cbf-fade-in 0.3s ease; }
.cbf-step-panel.is-active { display: block; }
@keyframes cbf-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section cards */
.cbf-section {
  background: var(--cbf-bg-soft);
  border: 1px solid var(--cbf-border);
  border-radius: var(--cbf-radius-md);
  padding: 20px;
  margin-bottom: 16px;
}
.cbf-section:last-child { margin-bottom: 0; }

.cbf-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--cbf-text);
  margin: 16px 0 6px;
}
.cbf-label:first-child { margin-top: 0; }

/* Fields */
.cbf-form-wrapper input[type="text"],
.cbf-form-wrapper input[type="email"],
.cbf-form-wrapper input[type="tel"],
.cbf-form-wrapper input[type="date"],
.cbf-form-wrapper input[type="number"],
.cbf-form-wrapper select,
.cbf-form-wrapper textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  min-height: 46px;
  border: 1.5px solid var(--cbf-border);
  border-radius: var(--cbf-radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--cbf-text);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.cbf-form-wrapper select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235b6b62' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.cbf-form-wrapper input:focus,
.cbf-form-wrapper select:focus,
.cbf-form-wrapper textarea:focus {
  outline: none;
  border-color: var(--cbf-primary);
  box-shadow: 0 0 0 3px rgba(47, 158, 111, 0.15);
}
.cbf-form-wrapper input::placeholder,
.cbf-form-wrapper textarea::placeholder { color: var(--cbf-text-faint); }
.cbf-form-wrapper textarea { resize: vertical; min-height: 92px; }
.cbf-form-wrapper input.cbf-field-error,
.cbf-form-wrapper select.cbf-field-error {
  border-color: var(--cbf-error);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

/* Honeypot (hidden from real users) */
.cbf-honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

/* Checkboxes */
.cbf-check .cbf-list-item {
  display: block;
  margin: 0 0 8px;
  padding: 12px;
  background: #fff;
  border: 1.5px solid var(--cbf-border);
  border-radius: var(--cbf-radius-sm);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.cbf-check .cbf-list-item:last-child { margin-bottom: 0; }
.cbf-check .cbf-list-item:hover { border-color: var(--cbf-primary); }
.cbf-check .cbf-list-item:has(input:checked) {
  border-color: var(--cbf-primary);
  background: var(--cbf-primary-light);
}
.cbf-check .cbf-list-item label {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}
.cbf-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--cbf-primary);
}

/* Radio-style choice cards (service type, frequency, rate plan, contact method) */
.cbf-choice-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 6px;
}
@media (min-width: 480px) {
  .cbf-choice-group.cbf-cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.cbf-choice-card {
  position: relative;
  border: 1.5px solid var(--cbf-border);
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  display: block;
}
.cbf-choice-card:hover { border-color: var(--cbf-primary); }
.cbf-choice-card input[type="radio"] {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 18px;
  height: 18px;
  accent-color: var(--cbf-primary);
}
.cbf-choice-card .cbf-choice-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--cbf-text);
  padding-right: 26px;
  line-height: 1.3;
}
.cbf-choice-card .cbf-choice-sub {
  font-size: 12.5px;
  color: var(--cbf-text-soft);
  margin-top: 4px;
  line-height: 1.45;
}
.cbf-choice-card.is-selected {
  border-color: var(--cbf-primary);
  background: var(--cbf-primary-light);
  box-shadow: 0 0 0 2px rgba(47, 158, 111, 0.12);
}
#service-type-group.cbf-field-error .cbf-choice-card,
#preferred-contact-group.cbf-field-error .cbf-choice-card {
  border-color: var(--cbf-error);
}
@media (min-width: 640px) {
  #service-type-group.cbf-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Hints / callouts */
.cbf-hint {
  background: var(--cbf-primary-light);
  border: 1px solid #cfe8db;
  border-radius: var(--cbf-radius-sm);
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cbf-text);
  margin-top: 12px;
}
.cbf-hint strong { color: var(--cbf-primary-dark); }
.cbf-hint-muted {
  background: var(--cbf-bg-soft);
  border-color: var(--cbf-border);
  color: var(--cbf-text-soft);
  margin-top: 0;
  margin-bottom: 4px;
}

.cbf-price-callout {
  background: var(--cbf-primary-dark);
  color: #fff;
  border-radius: var(--cbf-radius-sm);
  padding: 14px 16px;
  margin-top: 14px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.cbf-price-callout .cbf-price-amount { font-size: 19px; font-weight: 700; }

/* Range slider (property condition) */
.cbf-range-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.cbf-range-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--cbf-text-soft);
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
  width: 52px;
}
.cbf-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #e2a83f, var(--cbf-primary));
  outline: none;
  margin: 10px 0;
}
.cbf-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--cbf-primary-dark);
  box-shadow: 0 1px 4px rgba(16, 40, 29, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.cbf-range::-webkit-slider-thumb:hover { transform: scale(1.08); }
.cbf-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--cbf-primary-dark);
  box-shadow: 0 1px 4px rgba(16, 40, 29, 0.25);
  cursor: pointer;
}
.cbf-range::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #e2a83f, var(--cbf-primary));
}
.cbf-range-value {
  font-size: 13.5px;
  margin-top: 4px;
  color: var(--cbf-text-soft);
}
.cbf-range-value strong { color: var(--cbf-primary-dark); font-size: 15px; }

/* Nav buttons */
.cbf-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.cbf-btn {
  flex: 1;
  padding: 14px 20px;
  min-height: 48px;
  border-radius: var(--cbf-radius-sm);
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}
.cbf-btn.cbf-next,
.cbf-btn.cbf-submit {
  background: var(--cbf-primary);
  color: #fff;
  width: 100%;
  box-shadow: 0 2px 8px rgba(47, 158, 111, 0.25);
}
.cbf-btn.cbf-next:hover,
.cbf-btn.cbf-submit:hover { background: var(--cbf-primary-dark); }
.cbf-btn.cbf-submit:disabled { opacity: 0.65; cursor: not-allowed; box-shadow: none; }
.cbf-btn.cbf-back {
  background: #fff;
  color: var(--cbf-text);
  border: 1.5px solid var(--cbf-border);
  flex: 0 0 100px;
}
.cbf-btn.cbf-back:hover { background: var(--cbf-bg-soft); }
.cbf-btn:active { transform: scale(0.98); }
.cbf-btn:focus-visible { outline: 2px solid var(--cbf-primary-dark); outline-offset: 2px; }

/* Consent */
.cbf-consent {
  background: transparent;
  border: none;
  padding: 4px 2px 2px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--cbf-text-soft);
}
.cbf-consent label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.cbf-consent input[type="checkbox"] { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; accent-color: var(--cbf-primary); }

/* Photo/video upload (Move In / Move Out) */
.cbf-upload-hint {
  background: var(--cbf-primary-light);
  border: 1px solid #cfe8db;
  border-radius: var(--cbf-radius-sm);
  padding: 11px 14px;
  font-size: 13px;
  color: var(--cbf-primary-dark);
  font-weight: 600;
  margin: 10px 0;
  line-height: 1.45;
}
.cbf-file-input { cursor: pointer; padding: 10px 14px; }
.cbf-upload-status {
  font-size: 12.5px;
  color: var(--cbf-text-soft);
  margin-top: 8px;
  min-height: 16px;
  line-height: 1.4;
}
.cbf-upload-status.is-compressing { color: var(--cbf-primary-dark); }
.cbf-upload-status.is-error { color: var(--cbf-error); }
.cbf-upload-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cbf-upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--cbf-border);
  border-radius: var(--cbf-radius-sm);
  padding: 9px 12px;
  font-size: 12.5px;
  color: var(--cbf-text);
}
.cbf-upload-item span { word-break: break-word; }
.cbf-upload-item .cbf-upload-remove {
  background: none;
  border: none;
  color: var(--cbf-error);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 0;
  flex-shrink: 0;
}
.cbf-upload-note {
  font-size: 11.5px;
  color: var(--cbf-text-faint);
  margin-top: 8px;
  line-height: 1.45;
}

.cbf-hidden { display: none !important; }

/* ---------- Responsive breakpoints ---------- */

/* Tablets and small laptops: a little extra breathing room */
@media (min-width: 768px) {
  .cbf-form-wrapper { padding: 44px 48px; }
  .cbf-form-wrapper h3 { font-size: 27px; }
}

/* Small phones: full-width edge-to-edge, bigger text, bigger tap targets */
@media (max-width: 480px) {
  .cbf-form-wrapper {
    /* Break out of whatever narrower content column/theme container the
       shortcode is sitting inside, so the form spans the full screen width
       on mobile instead of just filling that column. */
    max-width: 100vw;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 20px 16px;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }
  .cbf-form-wrapper h3 { font-size: 22px; }
  .cbf-form-subtitle { font-size: 15px; }
  .cbf-form-wrapper h4 { font-size: 16.5px; }
  .cbf-section { padding: 16px; border-radius: 10px; }
  .cbf-label { font-size: 14.5px; }
  .cbf-step { width: 30px; height: 30px; font-size: 13px; }
  .cbf-nav { flex-wrap: wrap; }
  .cbf-btn { padding: 14px 18px; font-size: 15.5px; }
  .cbf-btn.cbf-back { flex: 1 1 100%; order: 2; }
  .cbf-btn.cbf-next,
  .cbf-btn.cbf-submit { order: 1; }

  /* Range slider: bigger label text and a much bigger, easier-to-drag thumb */
  .cbf-range-label { width: 46px; font-size: 12px; }
  .cbf-range { height: 10px; margin: 16px 0; }
  .cbf-range::-webkit-slider-thumb { width: 30px; height: 30px; }
  .cbf-range::-moz-range-thumb { width: 30px; height: 30px; }
  .cbf-range-value { font-size: 15px; }
  .cbf-range-value strong { font-size: 17px; }
}

/* Very small / older phones */
@media (max-width: 360px) {
  .cbf-form-wrapper { padding: 18px 12px; }
  .cbf-form-wrapper input[type="text"],
  .cbf-form-wrapper input[type="email"],
  .cbf-form-wrapper input[type="tel"],
  .cbf-form-wrapper input[type="date"],
  .cbf-form-wrapper input[type="number"],
  .cbf-form-wrapper select,
  .cbf-form-wrapper textarea { font-size: 16px; } /* prevents iOS Safari zoom-on-focus */
}
