/* ═══════════════════════════════════════════════════
   Fortray Lead Form — form.css
   Uses theme CSS variables where available,
   falls back to Fortray brand tokens.
═══════════════════════════════════════════════════ */

/* ── Reset ── */
.flf-wrap *,
.flf-wrap *::before,
.flf-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Jump-to-form banner (shown when arriving via a tracking link, in
   case the automatic scroll gets overridden by the page's own theme) ── */
#flf-jump-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111827;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  max-width: calc(100% - 24px);
  user-select: none;
  animation: flf-banner-in 0.25s ease-out;
}
#flf-jump-banner:hover,
#flf-jump-banner:focus {
  background: #1f2937;
  outline: none;
}
#flf-jump-banner .flf-jump-arrow {
  display: inline-block;
  animation: flf-bounce 1.1s infinite;
}
@keyframes flf-banner-in {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes flf-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}
@media (max-width: 480px) {
  #flf-jump-banner {
    font-size: 13px;
    padding: 10px 14px;
    top: 8px;
  }
}

/* ── Container ── */
.flf-wrap {
  scroll-margin-top: 80px; /* keeps native #anchor jumps clear of sticky headers */
  width: 1280px;
  max-width: 100%;
  margin: 10px auto;
  padding: 48px 56px !important;
  font-family: var(--e-global-typography-primary-font-family);
  color: var(--color-text-primary, var(--wp--preset--color--foreground, #0d1117));
  border-radius: 18px !important;
  background-color: #f4f4f4 !important;
  box-shadow: 0 10px 30px -4px #0F172A14;
  overflow-x: hidden;
}

/* Steps that hold text-heavy content (tags, fields, success) stay readable
   instead of stretching edge-to-edge on the wide container */
.flf-narrow { max-width: 1000px; margin-left: auto; margin-right: auto; }

/* ── Progress Bar ── */
.flf-progress-bar {
  height: 4px;
  background: var(--color-border-tertiary, #e8ecf4);
  border-radius: 2px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

/* ── Step meta row: "Step X of N"  ⟷  section eyebrow ── */
.flf-step-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.flf-step-meta .flf-step-counter { margin-bottom: 0; }
.flf-step-meta .flf-eyebrow { margin-bottom: 0; }
.flf-progress-fill {
  height: 100%;
  width: 16%;
  background: #0a1a56;
  border-radius: 2px;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Steps ── */
.flf-step { display: none; }
.flf-step.flf-active { display: block; animation: flfFadeIn 0.3s ease; }

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

/* ── Typography ── */
.flf-step-counter {
  font-size: 16px;
  color: #000;
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.flf-eyebrow {
  font-size: 14px;
  font-weight: 700;
  color: #df451d;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.flf-headline {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  color: var(--color-text-primary, #0d1117);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.flf-sub {
  font-size: 15px;
  color: var(--color-text-secondary, #6b7280);
  margin-bottom: 2rem;
  line-height: 1.6;
}
.flf-center { text-align: center; }

/* ── Option Cards ── */
.flf-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 1.75rem;
}
.flf-options--three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.flf-opt {
  border: 1px solid var(--color-border-tertiary, #e8ecf4);
  border-radius: var(--border-radius-lg, 12px);
  padding: 22px 20px;
  cursor: pointer;
  text-align: left;
  background: var(--color-background-primary, #ffffff);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  width: 100%;
}
.flf-opt:hover {
    border-color: #1E3A8A;
    box-shadow: 0 4px 16px rgba(10, 26, 86, 0.08);
    transform: translateY(-1px);
    background: #F8FAFF !important;
}
.flf-opt:focus-visible {
  outline: 2px solid #0a1a56;
  outline-offset: 2px;
}
.flf-opt.flf-selected {
  border: 1px solid #1E3A8A;
  background: #F8FAFF;
  box-shadow: 0 4px 16px rgba(10, 26, 86, 0.1);
}
.flf-opt-icon {
  font-size: 24px;
  margin-bottom: 14px;
  color: #df451d;
  line-height: 1;
}
.flf-opt-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary, #0d1117);
  display: block;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.flf-opt-hint {
  font-size: 11px;
  color: var(--color-text-secondary, #6b7280);
  margin-top: 5px;
  display: block;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Tags ── */
.flf-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
}
.flf-tag {
  border: 1px solid var(--color-border-tertiary, #e8ecf4);
  border-radius: 100px;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--color-background-primary, #fff);
  color: var(--color-text-primary, #0d1117);
  transition: all 0.15s ease;
}
.flf-tag:hover { border-color: #0a1a56; }
.flf-tag:focus-visible { outline: 2px solid #0a1a56; outline-offset: 2px; }
.flf-tag.flf-selected {
  background: #0a1a56;
  color: #fff;
  border-color: #0a1a56;
}

/* ── Buttons ── */
.flf-btn-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.flf-btn-primary {
  background: #59657F;
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: var(--border-radius-md, 10px);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  
}
.flf-btn-primary:hover:not(:disabled) { opacity: 0.88; background: #0b1a56 !important; }
.flf-btn-primary:active:not(:disabled) {     transform: scale(0.98);     background: #0b1a56; }
.flf-btn-primary:focus-visible { outline: 2px solid #0a1a56; outline-offset: 3px; }
.flf-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #0b1a56 !important;
}
.flf-btn-back {
  background: transparent;
  color: #000;
  border: 1px solid var(--color-border-secondary, #d1d5db);
  padding: 14px 22px;
  border-radius: var(--border-radius-md, 10px);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 48px;
  white-space: nowrap;
}
.flf-btn-back:hover { background: var(--color-background-secondary, #f8f9fc); }
.flf-btn-back:focus-visible { outline: 2px solid #0a1a56; outline-offset: 2px; }

/* Spinner animation */
@keyframes flfSpin {
  to { transform: rotate(360deg); }
}
.flf-btn-spinner i {
  display: inline-block;
  animation: flfSpin 0.7s linear infinite;
}

/* ── Form Fields ── */
.flf-field {
  margin-bottom: 1rem;
}
.flf-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary, #6b7280);
  display: block;
  margin-bottom: 6px;
}
.flf-required { color: #df451d !important; }
.flf-optional {
  color: var(--color-text-secondary, #6b7280);
  font-weight: 400;
  font-size: 12px;
}
.flf-field input[type="text"],
.flf-field input[type="email"],
.flf-field input[type="tel"],
.flf-field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--color-border-secondary, #d1d5db);
  border-radius: var(--border-radius-md, 8px);
  font-size: 14px;
  color: var(--color-text-primary, #0d1117);
  background: var(--color-background-primary, #fff);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.flf-field input:focus,
.flf-field select:focus {
  outline: none;
  border-color: #0a1a56;
  box-shadow: 0 0 0 3px rgba(10, 26, 86, 0.1);
}
.flf-field input.flf-input-error { border-color: #df451d; }

/* ── Checkbox Row ── */
.flf-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--color-text-secondary, #6b7280);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.flf-checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  accent-color: #0a1a56;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.flf-checkbox-row label { cursor: pointer; }

/* ── Error Message ── */
.flf-error-msg {
  background: #fff5f5;
  border: 1px solid #f5c4c4;
  color: #c0392b;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 1rem;
}

/* ── Trust Row ── */
.flf-trust-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 1rem;
  justify-content: flex-start;
}
.flf-trust-row.flf-center { justify-content: center; }
.flf-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: #334155;
}
.flf-trust-item i { color: #df451d; font-size: 20px; }

/* ── Success Screen ── */
.flf-success-wrap { text-align: left; }

.flf-success-icon {
  width: 56px;
  height: 56px;
  background: #eef1ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.flf-success-icon i { font-size: 26px; color: #0a1a56; }

/* ── Summary Card ── */
.flf-summary-card {
  background: var(--color-background-secondary, #f8f9fc);
  border-radius: var(--border-radius-lg, 10px);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.flf-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid var(--color-border-tertiary, #e8ecf4);
  gap: 12px;
}
.flf-summary-row:last-child { border-bottom: none; }
.flf-summary-label { color: var(--color-text-secondary, #6b7280); flex-shrink: 0; }
.flf-summary-val {
  font-weight: 600;
  color: var(--color-text-primary, #0d1117);
  text-align: right;
}

/* ── Finance Card ── */
.flf-finance-card {
  background: #fff5f2;
  border-radius: var(--border-radius-lg, 10px);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid #f5c4b3;
}
.flf-finance-title {
  font-size: 13px;
  font-weight: 600;
  color: #df451d;
  margin-bottom: 4px;
}
.flf-finance-body {
  font-size: 13px;
  color: var(--color-text-secondary, #6b7280);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */

/* Desktop container never touches the viewport edges */
.flf-wrap { margin: 10px auto; }

/* ── Tablet (≈ iPad portrait/landscape, small laptops) ── */
@media (max-width: 1024px) {
  
  .flf-options,
  .flf-options--three { grid-template-columns: 1fr 1fr; gap: 14px; }

  .flf-narrow { max-width: 100%; }
}

@media (max-width: 900px) {
  .flf-wrap { padding: 2rem 1.5rem !important; }

  .flf-quiz-heading { margin-bottom: 2rem; }
}

/* ── Mobile ── */
@media (max-width: 560px) {
  .flf-wrap { margin: 8px 10px; padding: 1.5rem 0.85rem !important; border-radius: 12px !important; }

  .flf-quiz-heading { margin-bottom: 1.5rem; }
  .flf-quiz-title { font-size: 22px; }
  .flf-quiz-subtitle { font-size: 14px; }

  .flf-step-meta { margin-bottom: 1.25rem; }
  .flf-step-counter { font-size: 13px; }
  .flf-eyebrow { font-size: 11px; }

  .flf-headline { font-size: 18px; }
  .flf-sub { font-size: 13px; margin-bottom: 1.25rem; }

  .flf-options,
  .flf-options--three { grid-template-columns: 1fr; gap: 8px; }

  .flf-opt { padding: 14px 12px; }
  .flf-opt-icon { font-size: 20px; margin-bottom: 10px; }
  .flf-opt-label { font-size: 12px; }
  .flf-opt-hint { font-size: 10px; }

  .flf-tag { font-size: 12px; padding: 6px 12px; }

  .flf-btn-row { flex-wrap: wrap; }
  .flf-btn-primary,
  .flf-btn-back { flex: 1 1 auto; }   

  .flf-summary-row { flex-wrap: wrap; }
  .flf-summary-val { text-align: left; }

  .flf-trust-row { gap: 10px; }
}

@media (max-width: 400px) {
  .flf-options,
  .flf-options--three { grid-template-columns: 1fr; }

  .flf-btn-row { flex-direction: column; align-items: stretch; }
  .flf-btn-row .flf-btn-back { order: 2; }
  .flf-btn-row .flf-btn-primary { order: 1; }

  .flf-btn-back { padding: 12px 12px; font-size: 13px; }
  .flf-btn-primary { font-size: 13px; }

  .flf-trust-row { flex-direction: column; gap: 6px; }
}

/* ── Screen reader only ── */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Quiz Heading (above progress bar) ── */
.flf-quiz-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}
.flf-quiz-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #df451d;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.flf-quiz-title {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  color: var(--color-text-primary, #0d1117);
  margin: 0 0 0.6rem;
  line-height: 1.2;
}
.flf-quiz-subtitle {
  font-size: 16px;
  color: var(--color-text-secondary, #6b7280);
  margin: 0;
  line-height: 1.6;
}
