/* Best Roofers — MetForm quote flow (Heyflow-compatible styling) */
.br-mf-quote {
  --br-orange: #E8552A;
  --br-orange-hover: #D04A22;
  --br-navy: #1E1B3A;
  --br-grey-900: #111827;
  --br-grey-600: #6B7280;
  --br-grey-200: #E5E7EB;
  --br-grey-100: #F3F4F6;
  --br-radius: 12px;
  --br-radius-lg: 16px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--br-grey-900);
}

.br-heyflow-embed.br-mf-quote,
.brq-heyflow-embed.br-mf-quote,
.brq-form-card .br-heyflow-embed.br-mf-quote,
.br-hero-form .br-heyflow-embed.br-mf-quote {
  min-height: 280px;
  width: 100%;
  max-width: 630px;
  margin-left: auto;
  margin-right: auto;
}

.br-mf-quote .br-mf-step {
  display: none;
  animation: brMfFade 0.25s ease;
}

.br-mf-quote .br-mf-step.is-active {
  display: block;
}

@keyframes brMfFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.br-mf-quote .br-mf-q {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  margin: 0 0 8px;
  color: var(--br-grey-900);
}

.br-mf-quote .br-mf-sub {
  font-size: 15px;
  color: var(--br-grey-600);
  text-align: center;
  margin: 0 0 24px;
}

.br-mf-quote .br-mf-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

/* Heyflow-style square tile options */
.br-mf-quote .br-mf-options--tiles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.br-mf-quote .br-mf-options--tiles-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Step 2 — full-width row options (Heyflow style) */
.br-mf-quote .br-mf-options--rows {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 0;
}

.br-mf-quote .br-mf-options--rows .br-mf-option {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 14px;
  padding: 16px 18px;
  aspect-ratio: auto;
  min-height: 0;
  width: 100%;
}

.br-mf-quote .br-mf-options--rows .br-mf-emoji {
  font-size: 28px;
  width: 32px;
  text-align: center;
}

.br-mf-quote .br-mf-options--rows .br-mf-label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.br-mf-quote .br-mf-options--rows .br-mf-option:hover,
.br-mf-quote .br-mf-options--rows .br-mf-option:focus {
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.06);
  border-radius: 10px;
}

.br-mf-quote .br-mf-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 16px 18px;
  border: 2px solid var(--br-grey-200);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: var(--br-grey-900);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, color 0.2s;
  text-align: left;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.br-mf-quote .br-mf-options--tiles .br-mf-option {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 16px 10px;
  aspect-ratio: 1 / 1;
  min-height: 108px;
  border-radius: 10px;
}

.br-mf-quote .br-mf-option:hover,
.br-mf-quote .br-mf-option:focus {
  border-color: rgba(232, 85, 42, 0.45);
  border-radius: 10px;
}

.br-mf-quote .br-mf-options--tiles .br-mf-option:hover,
.br-mf-quote .br-mf-options--tiles .br-mf-option:focus {
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.08);
  border-radius: 10px;
}

.br-mf-quote .br-mf-option.is-selected {
  border-color: var(--br-orange);
  background: rgb(27 34 68);
  box-shadow: 0 0 0 1px var(--br-orange);
  color: #fff;
  border-radius: 10px;
}

.br-mf-quote .br-mf-option .br-mf-emoji {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
  font-style: normal;
}

.br-mf-quote .br-mf-options--tiles .br-mf-emoji {
  font-size: 44px;
  line-height: 1;
}

.br-mf-quote .br-mf-option.is-selected .br-mf-emoji {
  color: inherit;
  -webkit-text-fill-color: currentColor;
}

.br-mf-quote .br-mf-label {
  display: block;
  line-height: 1.25;
}

.br-mf-quote .br-mf-options--tiles .br-mf-label {
  font-size: 13px;
  font-weight: 600;
}

.br-mf-quote .br-mf-actions--back-only {
  margin-top: 16px;
}

.br-mf-quote .br-mf-fields {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.br-mf-quote .br-mf-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--br-grey-900);
}

.br-mf-quote .br-mf-field input,
.br-mf-quote .br-mf-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--br-grey-200);
  border-radius: var(--br-radius);
  font-size: 15px;
  font-family: inherit;
  color: var(--br-grey-900);
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-text-fill-color: var(--br-grey-900);
}

.br-mf-quote .br-mf-field input::placeholder,
.br-mf-quote .br-mf-field textarea::placeholder {
  color: #9CA3AF;
  opacity: 1;
  -webkit-text-fill-color: #9CA3AF;
}

.br-mf-quote .br-mf-field input:hover,
.br-mf-quote .br-mf-field textarea:hover {
  border-color: rgba(232, 85, 42, 0.45);
  border-radius: var(--br-radius);
  color: var(--br-grey-900);
  background: #fff;
  -webkit-text-fill-color: var(--br-grey-900);
}

.br-mf-quote .br-mf-field input:focus,
.br-mf-quote .br-mf-field textarea:focus {
  outline: none;
  border-color: var(--br-orange);
  border-radius: var(--br-radius);
  box-shadow: 0 0 0 3px rgba(232, 85, 42, 0.12);
  color: var(--br-grey-900);
  background: #fff;
  -webkit-text-fill-color: var(--br-grey-900);
}

.br-mf-quote .br-mf-field.is-invalid input,
.br-mf-quote .br-mf-field.is-invalid textarea {
  border-color: #DC2626;
  border-radius: var(--br-radius);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.br-mf-quote .br-mf-field.is-invalid label {
  color: #DC2626;
}

.br-mf-quote .br-mf-field.is-invalid input:hover,
.br-mf-quote .br-mf-field.is-invalid textarea:hover,
.br-mf-quote .br-mf-field.is-invalid input:focus,
.br-mf-quote .br-mf-field.is-invalid textarea:focus {
  border-color: #DC2626;
  border-radius: var(--br-radius);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.br-mf-quote .br-mf-field textarea {
  min-height: 96px;
  resize: vertical;
}

.br-mf-quote .br-mf-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.br-mf-quote .br-mf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--br-radius);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.br-mf-quote .br-mf-btn-primary {
  background: var(--br-orange);
  color: #fff;
}

.br-mf-quote .br-mf-btn-primary:hover:not(:disabled),
.br-mf-quote .br-mf-btn-primary:focus:not(:disabled) {
  background: var(--br-orange-hover);
  color: #fff;
  border: none;
  border-radius: var(--br-radius);
}

.br-mf-quote .br-mf-btn-secondary {
  background: var(--br-grey-100);
  color: var(--br-grey-900);
}

.br-mf-quote .br-mf-btn-secondary:hover:not(:disabled),
.br-mf-quote .br-mf-btn-secondary:focus:not(:disabled) {
  background: var(--br-grey-200);
  color: var(--br-grey-900);
  border: none;
  border-radius: var(--br-radius);
}

/* Override Elementor kit-14 global styles inside quote form */
.elementor-kit-14 .br-mf-quote .br-mf-field label {
  color: var(--br-grey-900) !important;
}

.elementor-kit-14 .br-mf-quote .br-mf-field input,
.elementor-kit-14 .br-mf-quote .br-mf-field textarea {
  color: var(--br-grey-900) !important;
  background-color: #fff !important;
  -webkit-text-fill-color: var(--br-grey-900) !important;
  border-style: solid !important;
  border-width: 1px !important;
  border-color: var(--br-grey-200) !important;
  border-radius: var(--br-radius) !important;
  padding: 14px 16px !important;
}

.elementor-kit-14 .br-mf-quote .br-mf-field input:hover,
.elementor-kit-14 .br-mf-quote .br-mf-field textarea:hover {
  color: var(--br-grey-900) !important;
  background-color: #fff !important;
  -webkit-text-fill-color: var(--br-grey-900) !important;
  border-color: rgba(232, 85, 42, 0.45) !important;
}

.elementor-kit-14 .br-mf-quote .br-mf-field input:focus,
.elementor-kit-14 .br-mf-quote .br-mf-field textarea:focus {
  color: var(--br-grey-900) !important;
  background-color: #fff !important;
  -webkit-text-fill-color: var(--br-grey-900) !important;
  border-color: var(--br-orange) !important;
  box-shadow: 0 0 0 3px rgba(232, 85, 42, 0.12) !important;
}

.elementor-kit-14 .br-mf-quote .br-mf-field input::placeholder,
.elementor-kit-14 .br-mf-quote .br-mf-field textarea::placeholder {
  color: #9CA3AF !important;
  -webkit-text-fill-color: #9CA3AF !important;
  opacity: 1 !important;
}

.elementor-kit-14 .br-mf-quote .br-mf-field.is-invalid label {
  color: #DC2626 !important;
}

.elementor-kit-14 .br-mf-quote .br-mf-field.is-invalid input,
.elementor-kit-14 .br-mf-quote .br-mf-field.is-invalid textarea,
.elementor-kit-14 .br-mf-quote .br-mf-field.is-invalid input:hover,
.elementor-kit-14 .br-mf-quote .br-mf-field.is-invalid input:focus,
.elementor-kit-14 .br-mf-quote .br-mf-field.is-invalid textarea:hover,
.elementor-kit-14 .br-mf-quote .br-mf-field.is-invalid textarea:focus {
  color: var(--br-grey-900) !important;
  background-color: #fff !important;
  -webkit-text-fill-color: var(--br-grey-900) !important;
  border-color: #DC2626 !important;
}

.elementor-kit-14 .br-mf-quote button.br-mf-btn:hover,
.elementor-kit-14 .br-mf-quote button.br-mf-btn:focus,
.elementor-kit-14 .br-mf-quote input[type="button"].br-mf-btn:hover,
.elementor-kit-14 .br-mf-quote input[type="button"].br-mf-btn:focus,
.elementor-kit-14 .br-mf-quote input[type="submit"].br-mf-btn:hover,
.elementor-kit-14 .br-mf-quote input[type="submit"].br-mf-btn:focus {
  border-style: solid;
  border-width: 0;
  border-color: transparent;
  border-radius: var(--br-radius) !important;
}

.elementor-kit-14 .br-mf-quote button.br-mf-btn-primary:hover,
.elementor-kit-14 .br-mf-quote button.br-mf-btn-primary:focus {
  background-color: var(--br-orange-hover);
  color: #fff;
}

.elementor-kit-14 .br-mf-quote button.br-mf-btn-secondary:hover,
.elementor-kit-14 .br-mf-quote button.br-mf-btn-secondary:focus {
  background-color: var(--br-grey-200);
  color: var(--br-grey-900);
}

.elementor-kit-14 .br-mf-quote button.br-mf-option:hover,
.elementor-kit-14 .br-mf-quote button.br-mf-option:focus,
.elementor-kit-14 .br-mf-quote button.br-mf-option.is-selected {
  border-radius: 10px !important;
}

.br-mf-quote .br-mf-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.br-mf-quote .br-mf-progress {
  height: 4px;
  background: var(--br-grey-100);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 24px;
}

.br-mf-quote .br-mf-progress-bar {
  height: 100%;
  background: var(--br-orange);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.br-mf-quote .br-mf-error {
  display: none;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--br-radius);
  background: #FEF2F2;
  color: #B91C1C;
  font-size: 14px;
  text-align: center;
}

.br-mf-quote .br-mf-error.is-visible {
  display: block;
}

.br-mf-quote .br-mf-success {
  display: none;
  text-align: center;
  padding: 32px 16px;
}

.br-mf-quote.is-success .br-mf-steps-wrap {
  display: none;
}

.br-mf-quote.is-success .br-mf-success {
  display: block;
}

.br-mf-quote .br-mf-success h4 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--br-grey-900);
}

.br-mf-quote .br-mf-success p {
  font-size: 15px;
  color: var(--br-grey-600);
  margin: 0;
}

@media (max-width: 600px) {
  .br-mf-quote .br-mf-options--tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .br-mf-quote .br-mf-options--tiles-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .br-mf-quote .br-mf-options:not(.br-mf-options--tiles) {
    grid-template-columns: 1fr;
  }

  .br-mf-quote .br-mf-q {
    font-size: 19px;
  }
}
