/* ================================
   F2F Estimate Form — Contractor clean, Empire-ish
================================== */

.f2f-ef{
  --ink:#0f172a;
  --muted:#475569;
  --line:rgba(15,23,42,.12);
  --bg:#ffffff;

  --brand:#0040A0;
  --brand2:#0A6CF1;
  --soft:rgba(0,64,160,.08);

  font-family: system-ui,-apple-system,"Segoe UI",Roboto,Inter,Arial,sans-serif;
  color: var(--ink);
}

.f2f-ef__card{
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(0,0,0,.08);
  overflow:hidden;
}

.f2f-ef__head{
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  background: linear-gradient(180deg, rgba(0,64,160,.06), rgba(255,255,255,0));
}

.f2f-ef__title{
  margin: 0 0 6px;
  font-weight: 950;
  letter-spacing:.01em;
  font-size: 20px;
}

.f2f-ef__sub{
  margin: 0;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
  font-size: 14px;
}

.f2f-ef__form{
  padding: 16px 18px 18px;
}

.f2f-ef__hp{
  position:absolute !important;
  left:-9999px !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
}

.f2f-ef__grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.f2f-ef__field label{
  display:block;
  font-weight: 850;
  font-size: 13px;
  margin: 0 0 6px;
  color: var(--ink);
}

.f2f-ef__field input,
.f2f-ef__field select,
.f2f-ef__field textarea{
  width: 100%;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 15px;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.f2f-ef__field textarea{
  resize: vertical;
  min-height: 120px;
}

.f2f-ef__field input:focus,
.f2f-ef__field select:focus,
.f2f-ef__field textarea:focus{
  border-color: rgba(10,108,241,.55);
  box-shadow: 0 0 0 4px rgba(10,108,241,.12);
}

.f2f-ef__field--full{
  grid-column: 1 / -1;
}

.f2f-ef__radio{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(15,23,42,.02);
  border-radius: 12px;
  padding: 10px 12px;
}

.f2f-ef__radio > span:first-child{
  font-weight: 900;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.f2f-ef__radioGroup{
  display:flex;
  gap: 12px;
  flex-wrap:wrap;
}

.f2f-ef__radioGroup label{
  display:flex;
  align-items:center;
  gap: 6px;
  font-weight: 850;
  font-size: 13px;
  margin: 0;
  color: var(--ink);
}

/* --- Hard reset for radios/checkboxes (protect against theme/global form CSS) ---
   Only touches the two affected areas:
   - Preferred reply (radio group)
   - Consent checkbox
*/
.f2f-ef .f2f-ef__radioGroup input[type="radio"],
.f2f-ef .f2f-ef__consent input[type="checkbox"]{
  -webkit-appearance: auto;
  appearance: auto;
  display: inline-block;
  flex: 0 0 auto;
  margin: 0;
  transform: none;
  accent-color: var(--brand2);
}

.f2f-ef .f2f-ef__radioGroup input[type="radio"]{
  width: 18px;
  height: 18px;
}

.f2f-ef .f2f-ef__consent input[type="checkbox"]{
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.f2f-ef .f2f-ef__radioGroup label,
.f2f-ef .f2f-ef__consent{
  max-width: none;
  overflow: visible;
}

.f2f-ef__consent{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(0,64,160,.05);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 750;
  color: var(--ink);
}

.f2f-ef__consent input{
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.f2f-ef__actions{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap:wrap;
}

.f2f-ef__btn{
  position: relative;
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,64,160,.35);
  background: var(--brand);
  color: #fff;
  font-weight: 950;
  letter-spacing:.02em;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  box-shadow: 0 18px 34px rgba(0,64,160,.22);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.f2f-ef__btn:hover{
  background: #00368a;
  box-shadow: 0 22px 42px rgba(0,64,160,.28);
}
.f2f-ef__btn:active{ transform: translateY(1px); }

.f2f-ef__spinner{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: rgba(255,255,255,1);
  display:none;
  animation: f2fSpin .7s linear infinite;
}

.f2f-ef__status{
  flex: 1 1 auto;
  min-width: 220px;
  color: var(--muted);
  font-weight: 750;
  font-size: 14px;
}

.f2f-ef__fineprint{
  margin-top: 12px;
  color: rgba(71,85,105,.95);
  font-weight: 700;
  font-size: 12px;
}

.f2f-ef.is-loading .f2f-ef__spinner{ display:inline-block; }
.f2f-ef.is-loading .f2f-ef__btn{ opacity:.95; }

.f2f-ef.is-error .f2f-ef__status{ color: #b91c1c; }
.f2f-ef.is-success .f2f-ef__status{ color: #0f766e; }

@keyframes f2fSpin{ to{ transform: rotate(360deg); } }

@media (max-width: 980px){
  .f2f-ef__grid{ grid-template-columns: 1fr; }
  .f2f-ef__radio{ flex-direction:column; align-items:flex-start; }
  .f2f-ef__status{ min-width: 0; }
}

/* Optional compact mode: [f2f_estimate_form compact="1"] */
.f2f-ef[data-compact="1"] .f2f-ef__sub{ display:none; }
.f2f-ef[data-compact="1"] .f2f-ef__head{ padding-bottom: 14px; }
