/* ==================================================================
 | Consumer complaint form.
 |
 | Self-contained: served outside the Perfex admin and often inside an
 | iframe on another site, so nothing here can depend on the CRM's CSS
 | and nothing must leak out. All classes are .cf-*.
 |
 | Fonts load from Google but the form degrades to the system stack if
 | that request is blocked, so an embed on a locked-down site still
 | looks right.
 | ================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --cf-accent: #FF6A1A;
  --cf-accent-dark: #E4530A;
  --cf-accent-soft: #FFF3EC;
  --cf-ink: #0F1115;
  --cf-ink-2: #3F4654;
  --cf-ink-3: #6B7280;
  --cf-line: #E3E6EB;
  --cf-line-2: #F0F2F5;
  --cf-canvas: #F6F7F9;
  --cf-ok: #16A34A;
  --cf-ok-soft: #ECFDF3;
  --cf-bad: #DC2626;
  --cf-bad-soft: #FEF2F2;
  --cf-r: 16px;
  --cf-r-sm: 11px;
  --cf-shadow: 0 1px 2px rgba(16,24,40,.04), 0 2px 6px rgba(16,24,40,.05);
  --cf-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --cf-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--cf-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--cf-ink);
  background: var(--cf-canvas);
  -webkit-font-smoothing: antialiased;
}

/* Embedded: transparent so it sits on the host page's own background,
   and no outer padding fighting the host layout. */
body.cf-embed { background: transparent; }
body.cf-embed .cf-wrap { padding: 0; max-width: 100%; }
body.cf-embed .cf-body { padding: 0 0 8px; }

h1, h2, h3, legend {
  font-family: var(--cf-display);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 8px;
}

a { color: var(--cf-accent-dark); }
a:hover { color: var(--cf-accent); }

.cfi {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}

.cf-wrap { max-width: 780px; margin: 0 auto; padding: 0 20px; }

/* ---------- Hero (standalone page only) ---------- */
.cf-hero {
  background: var(--cf-ink);
  color: #fff;
  padding: 48px 0 44px;
  position: relative;
  overflow: hidden;
}
.cf-hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(120deg, #FF9A3D, #FF6A1A 55%, #F1500E);
}
.cf-hero h1 { font-size: 36px; color: #fff; line-height: 1.15; }
.cf-eyebrow {
  margin: 0 0 12px;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #FF9A3D;
  font-weight: 700;
}
.cf-lede { margin: 8px 0 0; color: #C3C8D2; font-size: 17px; max-width: 60ch; }

.cf-embed-head { margin-bottom: 18px; }
.cf-embed-head h1 { font-size: 27px; color: var(--cf-ink); }
.cf-embed-head p { margin: 0; color: var(--cf-ink-3); font-size: 16px; }

.cf-body { padding: 26px 20px 56px; }

/* ---------- Reassurance strip ---------- */
.cf-assure {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.cf-assure-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  background: #fff;
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-r-sm);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--cf-ink-2);
  box-shadow: var(--cf-shadow);
}
.cf-assure-item .cfi { color: var(--cf-accent); margin-top: 1px; }
.cf-assure-item strong { color: var(--cf-ink); }

.cf-alt {
  background: #fff;
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-r-sm);
  padding: 14px 17px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--cf-ink-2);
  box-shadow: var(--cf-shadow);
}
.cf-alt p { margin: 0; }

.cf-errors {
  display: flex;
  gap: 12px;
  background: var(--cf-bad-soft);
  border: 1px solid #FBD5D5;
  border-radius: var(--cf-r-sm);
  padding: 15px 18px;
  margin-bottom: 20px;
  color: #932020;
}
.cf-errors .cfi { color: var(--cf-bad); margin-top: 2px; }
.cf-errors ul { margin: 5px 0 0; padding-left: 19px; }
.cf-errors strong { display: block; margin-bottom: 2px; }

/* ---------- Cards ---------- */
.cf-card {
  background: #fff;
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-r);
  padding: 24px 26px 26px;
  margin: 0 0 16px;
  box-shadow: var(--cf-shadow);
}
.cf-card legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  color: var(--cf-ink);
  padding: 0;
  margin-bottom: 4px;
  float: left;
  width: 100%;
}
/* float + clearfix keeps legend styling consistent across browsers */
.cf-card legend + * { clear: both; }
.cf-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: linear-gradient(140deg, #FF9A3D, #F1500E);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  flex: none;
}

/* ---------- Fields ---------- */
.cf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.cf-full { grid-column: 1 / -1; }
.cf-mt { margin-top: 16px; }

.cf-field { display: block; }
.cf-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--cf-ink-2);
  margin-bottom: 6px;
}
.cf-req { color: var(--cf-accent-dark); font-style: normal; margin-left: 3px; }
.cf-help {
  display: block;
  font-size: 13px;
  color: var(--cf-ink-3);
  margin: -2px 0 7px;
  line-height: 1.5;
}
.cf-note { font-size: 13.5px; color: var(--cf-ink-3); margin: 10px 0 0; }
.cf-note-top { margin: 6px 0 0; }

input[type=text], input[type=tel], input[type=email], textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-r-sm);
  font: inherit;
  font-size: 15.5px;
  color: var(--cf-ink);
  background: #fff;
  transition: border-color .14s, box-shadow .14s;
}
input[type=text]:hover, input[type=tel]:hover, input[type=email]:hover, textarea:hover { border-color: #CBD1D9; }
input[type=text]:focus, input[type=tel]:focus, input[type=email]:focus, textarea:focus {
  outline: none;
  border-color: var(--cf-accent);
  box-shadow: 0 0 0 3px rgba(255,106,26,.15);
}
textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.cf-field input + input { margin-top: 8px; }

/* ---------- Choices ---------- */
.cf-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-choice { position: relative; cursor: pointer; }
.cf-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.cf-choice span {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--cf-line);
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--cf-ink-2);
  background: #fff;
  transition: all .14s;
}
.cf-choice:hover span { border-color: #CBD1D9; }
.cf-choice input:checked + span {
  border-color: var(--cf-accent);
  background: var(--cf-accent-soft);
  color: var(--cf-accent-dark);
  font-weight: 600;
}
.cf-choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255,106,26,.22); }

.cf-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  color: var(--cf-ink-2);
  padding: 4px 0;
}
.cf-check input { margin: 4px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--cf-accent); }
.cf-check-lead { margin-top: 18px; font-size: 15.5px; }

/* ---------- Outcome cards ---------- */
.cf-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.cf-outcome { cursor: pointer; }
.cf-outcome input { position: absolute; opacity: 0; width: 0; height: 0; }
.cf-outcome-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 18px 12px;
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-r-sm);
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: var(--cf-ink-2);
  height: 100%;
  transition: all .14s;
}
.cf-outcome-box .cfi { width: 24px; height: 24px; color: var(--cf-ink-3); }
.cf-outcome:hover .cf-outcome-box { border-color: #CBD1D9; transform: translateY(-1px); }
.cf-outcome input:checked + .cf-outcome-box {
  border-color: var(--cf-accent);
  background: var(--cf-accent-soft);
  color: var(--cf-accent-dark);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--cf-accent);
}
.cf-outcome input:checked + .cf-outcome-box .cfi { color: var(--cf-accent-dark); }
.cf-outcome input:focus-visible + .cf-outcome-box { box-shadow: 0 0 0 3px rgba(255,106,26,.22); }

/* ---------- Safety ---------- */
.cf-safety {
  margin-top: 20px;
  padding: 15px 17px;
  background: var(--cf-bad-soft);
  border: 1px solid #FBD5D5;
  border-radius: var(--cf-r-sm);
}
.cf-safety .cf-check { padding: 0; color: #932020; }
.cf-safety .cf-check input { accent-color: var(--cf-bad); }
.cf-safety p { margin: 10px 0 0; font-size: 14px; color: #932020; line-height: 1.6; }

/* ---------- Reveal panels ---------- */
.cf-reveal { display: none; }
.cf-reveal.cf-open { display: block; animation: cf-in .18s ease; }
@keyframes cf-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* With JS off nothing gets .cf-open, so show everything rather than hide it. */
.no-js .cf-reveal { display: block; }

/* ---------- File upload ---------- */
.cf-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 26px 20px;
  border: 1.5px dashed var(--cf-line);
  border-radius: var(--cf-r-sm);
  background: var(--cf-canvas);
  cursor: pointer;
  text-align: center;
  transition: border-color .14s, background .14s;
}
.cf-drop:hover { border-color: var(--cf-accent); background: var(--cf-accent-soft); }
.cf-drop input[type=file] { position: absolute; opacity: 0; width: 0; height: 0; }
.cf-drop-icon { width: 26px; height: 26px; color: var(--cf-ink-3); }
.cf-drop-text { font-size: 14.5px; font-weight: 600; color: var(--cf-ink-2); }
.cf-drop-list { font-size: 13px; color: var(--cf-accent-dark); word-break: break-word; }

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- What happens next ---------- */
.cf-next {
  background: var(--cf-ink);
  color: #C3C8D2;
  border-radius: var(--cf-r);
  padding: 24px 26px;
  margin-bottom: 16px;
}
.cf-next h3 { color: #fff; font-size: 18px; margin-bottom: 12px; }
.cf-next ol { margin: 0; padding-left: 20px; }
.cf-next li { margin-bottom: 9px; font-size: 14.5px; line-height: 1.6; }
.cf-next strong { color: #fff; }
.cf-edr {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13.5px;
}

.cf-privacy { font-size: 13px; color: var(--cf-ink-3); line-height: 1.6; margin: 0 0 18px; }

/* ---------- Submit ---------- */
.cf-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 17px 24px;
  border: none;
  border-radius: var(--cf-r-sm);
  background: linear-gradient(140deg, #FF9A3D, #F1500E);
  color: #fff;
  font-family: var(--cf-display);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(241,80,14,.3);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.cf-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(241,80,14,.36); }
.cf-submit:active { transform: none; }
.cf-submit:disabled, .cf-submit.cf-busy { opacity: .6; cursor: wait; transform: none; }
.cf-submit .cfi { width: 19px; height: 19px; }

/* ---------- Confirmation page ---------- */
.cf-success {
  background: #fff;
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-r);
  padding: 32px 30px;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: var(--cf-shadow);
}
.cf-tick {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--cf-ok-soft);
  color: var(--cf-ok);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.cf-tick .cfi { width: 30px; height: 30px; stroke-width: 2.5; }
.cf-reflabel {
  margin: 16px 0 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--cf-ink-3);
  font-weight: 700;
}
.cf-ref {
  font-family: var(--cf-display);
  font-size: 31px;
  font-weight: 800;
  color: var(--cf-accent-dark);
  margin: 6px 0 2px;
  letter-spacing: .01em;
}
.cf-panel {
  background: #fff;
  border: 1px solid var(--cf-line);
  border-radius: var(--cf-r);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--cf-shadow);
}
.cf-panel h3 { font-size: 17px; margin-bottom: 10px; }
.cf-panel p:last-child { margin-bottom: 0; }
.cf-steps { margin: 10px 0 0; padding-left: 20px; }
.cf-steps li { margin-bottom: 9px; }
.cf-contacts { list-style: none; margin: 12px 0 0; padding: 0; }
.cf-contacts li {
  padding: 12px 0;
  border-bottom: 1px solid var(--cf-line-2);
  font-size: 14.5px;
}
.cf-contacts li:last-child { border-bottom: none; }
.cf-contacts .cf-help { margin: 3px 0 0; }

.cf-urgent {
  background: var(--cf-bad-soft);
  border: 1px solid #FBD5D5;
  border-radius: var(--cf-r-sm);
  padding: 16px 18px;
  margin-bottom: 16px;
  color: #932020;
}
.cf-urgent h3 { color: #932020; font-size: 16px; }
.cf-urgent p { margin: 0; font-size: 14px; }

.cf-foot {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--cf-line);
  font-size: 13px;
  color: var(--cf-ink-3);
  text-align: center;
}
.cf-foot p { margin: 3px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .cf-grid { grid-template-columns: 1fr; }
  .cf-hero { padding: 34px 0 30px; }
  .cf-hero h1 { font-size: 27px; }
  .cf-lede { font-size: 15.5px; }
  .cf-card { padding: 20px 17px 22px; }
  .cf-card legend { font-size: 17px; }
  .cf-next { padding: 20px 18px; }
  .cf-ref { font-size: 25px; }
  body { font-size: 15.5px; }
}

/* Respect a reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .cf-submit:hover, .cf-outcome:hover .cf-outcome-box { transform: none; }
}
