/* ==========================================================================
   Conversion Form — Mobile-first
   ========================================================================== */

/* --- Wrapper (form + legal text) --- */
.cf-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* --- Legal text --- */
p.cf-legal {
  font-family: 'Metropolis', sans-serif !important;
  font-weight: 400 !important;
  font-size: 10px !important;
  line-height: 20px !important;
  letter-spacing: 0% !important;
  color: #46535D !important;
  opacity: 0.6;
  margin: 0 !important;
}

/* --- Form container --- */
.cf-form {
  background: #FDFDFD;
  border: none;
  border-radius: 20px 20px 0 0;
  box-shadow: 0px -19px 41px 0px rgba(229,235,235,0.1),
              0px -74px 74px 0px rgba(229,235,235,0.09),
              0px -167px 100px 0px rgba(229,235,235,0.05);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  width: 100%;
  z-index: 1;
  position: relative;
}

/* Fading border — solid at top, transparent at bottom */
.cf-form::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid #E5E7EB;
  border-radius: 20px 20px 0 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
  z-index: 0;
}

/* --- Screen visibility --- */
.cf-screen {
  display: none;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.cf-screen--active {
  display: flex;
}

/* --- Banner --- */
.cf-banner {
  background-color: #F5F5F5;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  height: 93px;
  position: relative;
  display: flex;
  align-items: center;
}

.cf-banner__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 14px;
  position: relative;
  z-index: 1;
}

p.cf-banner__title {
  font-family: 'Metropolis', sans-serif !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  line-height: 22px !important;
  letter-spacing: 0% !important;
  color: #00194C !important;
  max-width: 162px;
  margin: 0 !important;
}

/* People images */
.cf-banner__person {
  position: absolute;
  overflow: hidden;
}

.cf-banner__person img {
  display: block;
  height: 100%;
  width: auto;
}

/* Show mobile images by default, hide desktop */
.cf-banner__img-desktop {
  display: none !important;
}

.cf-banner__img-mobile {
  display: block !important;
}

.cf-banner__img-desktop {
  height: auto;
  width: auto;
}

/* Rita — in front, left of João */
.cf-banner__person--rita {
  right: 28px;
  top: 0;
  height: 93px;
  z-index: 2;
}

/* João — behind Rita, right edge */
.cf-banner__person--joao {
  right: 0;
  top: 6px;
  height: 87px;
  z-index: 1;
}

p.cf-banner__subtitle {
  font-family: 'Metropolis', sans-serif !important;
  font-weight: 400 !important;
  font-size: 12px !important;
  line-height: 20px !important;
  letter-spacing: 0% !important;
  color: #46535D !important;
  margin: 0 !important;
}


/* --- Radio Options --- */
.cf-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.cf-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  height: 72px;
  background: #FFFFFF;
  border: 1px solid #EDEDED;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease;
}

.cf-option--selected {
  border: 1.5px solid #244FC2;
}

/* Icon container */
.cf-option__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid #EDEDED;
}

.cf-option--selected .cf-option__icon {
  background: #F3F5F7;
  border-color: transparent;
}

.cf-option__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cf-option__icon img[src*="person-single.svg"] {
  height: 79%;
}

/* Text */
.cf-option__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
  white-space: nowrap;
}

.cf-option__title {
  font-family: 'Metropolis', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: normal;
  letter-spacing: 0%;
  color: #00194C;
}

.cf-option--selected .cf-option__title {
  color: #00194C;
}

.cf-option:not(.cf-option--selected) .cf-option__title {
  color: #212121;
}

.cf-option__subtitle {
  font-family: 'Metropolis', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0%;
  color: #46535D;
}

/* Simple option (text-only, no icon) */
.cf-option--simple {
  height: 56px;
  padding: 9px 14px 9px 16px;
}

.cf-option__label {
  flex: 1;
  font-family: 'Metropolis', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0%;
  color: #00194C;
}

.cf-option--simple:not(.cf-option--selected) .cf-option__label {
  font-weight: 500;
}

.cf-option--simple .cf-option__radio {
  position: static;
  flex-shrink: 0;
}

/* Options list wrapper */
.cf-options__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

/* 2-column grid for amount options */
.cf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

/* Custom input field */
.cf-option--input {
  position: relative;
}


.cf-input {
  flex: 1;
  font-family: 'Metropolis', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0%;
  color: #00194C;
  border: none;
  outline: none;
  background: transparent;
  padding: 0;
  width: 100%;
}

.cf-input::placeholder {
  color: #46535D;
  opacity: 0.5;
}

/* Radio indicator */
.cf-option__radio {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 16px;
  height: 16px;
  background-image: url('radio-unselected.svg');
  background-size: contain;
  background-repeat: no-repeat;
  transition: all 0.2s ease;
}

.cf-option--selected .cf-option__radio {
  background-image: url('radio-selected.svg');
}

/* --- Options title --- */
p.cf-options__title {
  font-family: 'Metropolis', sans-serif !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  line-height: 24px !important;
  letter-spacing: 0% !important;
  color: #00194C !important;
  margin: 0 !important;
}

/* --- Step Indicator --- */
.cf-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.cf-step__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.cf-step__label {
  font-family: 'Metropolis', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0%;
  color: #596780;
}

.cf-step__time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Metropolis', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0%;
  color: #596780;
}

.cf-step__clock {
  width: 15px;
  height: 15px;
}

.cf-step__bar {
  width: 100%;
  height: 6px;
  background: #F5F5F5;
  border-radius: 100px;
  overflow: hidden;
}

.cf-step__progress {
  height: 100%;
  background: #244FC2;
  /* Round only the left end. When width reaches 100%, the parent's
     overflow:hidden + border-radius clips the right edge to a rounded shape. */
  border-radius: 100px 0 0 100px;
  transition: width 0.4s ease-out;
}

/* --- Buttons --- */
.cf-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  min-height: 50px;
  padding: 0 24px;
  border: none;
  box-sizing: border-box;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cf-button span {
  font-family: 'Metropolis', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: normal;
  letter-spacing: 0%;
  white-space: nowrap;
}

.cf-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Primary button (blue) */
.cf-button--primary {
  background: #244FC2;
  width: 100%;
  flex: 1;
}

.cf-button--primary span {
  color: #FDFDFD;
}

.cf-button--primary svg {
  color: #FDFDFD;
}

.cf-button--primary:hover {
  background: #1d3fa0;
}

/* Back button (grey) */
.cf-button--back {
  background: #F5F5F5;
  flex: 1;
}

.cf-button--back span {
  color: #00194C;
}

.cf-button--back svg {
  color: #00194C;
}

.cf-button--back:hover {
  background: #EDEDED;
}

/* Button row */
.cf-buttons {
  display: flex;
  gap: 12px;
  width: 100%;
}

/* ==========================================================================
   Screen 6: Contact Form
   ========================================================================== */

/* Contact wrapper */
.cf-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Header */
.cf-contact__header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

p.cf-contact__title {
  font-family: 'Metropolis', sans-serif !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  line-height: 24px !important;
  letter-spacing: 0% !important;
  color: #00194C !important;
  margin: 0 !important;
}

p.cf-contact__subtitle {
  font-family: 'Metropolis', sans-serif !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  letter-spacing: 0% !important;
  color: #46535D !important;
  margin: 0 !important;
}

/* Name + Phone row (stacked on mobile) */
.cf-contact__row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Text input fields */
.cf-contact__fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.cf-field-wrap {
  position: relative;
  width: 100%;
}

.cf-field {
  width: 100%;
  height: 56px;
  padding: 9px 10px 9px 16px;
  background: #FFFFFF;
  border: 1px solid #EDEDED;
  border-radius: 12px;
  font-family: 'Metropolis', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.24;
  color: #00194C;
  outline: none;
  transition: border-color 0.2s ease;
}

/* Validation error state */
.cf-field--error {
  border-color: #ED513B !important;
}

/* Validation valid state */
.cf-field--valid {
  border-color: #5EBE22 !important;
}

/* Field error label — floating above the border */
.cf-field-error-msg {
  position: absolute;
  top: -9px;
  left: 9px;
  background: #FFFFFF;
  padding: 0 4px;
  font-family: 'Metropolis', sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.24;
  color: #ED513B;
  white-space: nowrap;
  z-index: 1;
}

/* Extra margin on birthdate fields when error, so label doesn't overlap title */
.cf-birthdate-1 .cf-field-wrap:has(.cf-field--error),
.cf-birthdate-2 .cf-field-wrap:has(.cf-field--error) {
  margin-top: 6px;
}

/* Ensure parent has relative positioning for the floating label */
.cf-field--error,
.cf-option--simple.cf-field--error-wrap {
  position: relative;
}

/* Terms error message */
.cf-terms--error .cf-terms-error-msg {
  position: absolute;
  top: -15px;
  left: 9px;
  background: #FFFFFF;
  padding: 0 4px;
  font-family: 'Metropolis', sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.24;
  color: #ED513B;
  white-space: nowrap;
  z-index: 1;
}

.cf-terms {
  position: relative;
}

.cf-terms--error .cf-terms__check {
  border-color: #ED513B !important;
}

.cf-terms--valid .cf-terms__check {
  border-color: #5EBE22 !important;
}

/* Spinner hidden by default */
.cf-button__spinner {
  display: none;
}

/* Loading state */
.cf-button--loading {
  pointer-events: none;
}

.cf-button--loading .cf-button__text {
  display: none;
}

.cf-button--loading > svg {
  display: none;
}

.cf-button--loading .cf-button__spinner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cf-button__spinner svg {
  width: 24px !important;
  height: 24px !important;
}

/* Result screen */
.cf-result {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  width: 100%;
}

.cf-result__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
}

.cf-result__title {
  font-family: 'Metropolis', sans-serif !important;
  font-weight: 600 !important;
  font-size: 20px !important;
  line-height: 28px !important;
  color: #00194C !important;
  margin: 0 !important;
}

.cf-result__text {
  font-family: 'Metropolis', sans-serif !important;
  font-weight: 400 !important;
  font-size: 16px !important;
  line-height: 24px !important;
  color: #46535D !important;
  margin: 0 !important;
}

/* Field label */
.cf-field-label {
  font-family: 'Metropolis', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0%;
  color: #00194C;
}

.cf-field::placeholder {
  color: #46535D;
  opacity: 0.5;
}

.cf-field:focus {
  border-color: #244FC2;
  border-width: 1.5px;
}

/* Residence toggle */
.cf-contact__residence {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.cf-contact__residence-label {
  font-family: 'Metropolis', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.24;
  color: #46535D;
}

.cf-toggle {
  display: flex;
  gap: 6px;
}

.cf-toggle__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 26px;
  padding: 5px 4px 4px;
  background: #FFFFFF;
  border: 1px solid #EDEDED;
  border-radius: 6px;
  font-family: 'Metropolis', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: #46535D;
  cursor: pointer;
}

.cf-toggle__btn--active {
  border: 1.5px solid #244FC2;
  color: #00194C;
}

/* Terms checkbox */
.cf-terms {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  cursor: pointer;
}

.cf-terms__check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #244FC2;
  border-radius: 4px;
  padding: 2.4px;
  margin-top: -2px;
}

.cf-terms__check img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Unchecked state */
.cf-terms input:not(:checked) + .cf-terms__check {
  background: #FFFFFF;
  border: 1px solid #EDEDED;
}

.cf-terms input:not(:checked) + .cf-terms__check img {
  display: none;
}

.cf-terms__text {
  font-family: 'Metropolis', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0%;
  color: #46535D;
}

.cf-terms__link {
  color: #244FC2 !important;
  text-decoration: none !important;
  font-family: inherit !important;
  font-weight: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
}

/* ==========================================================================
   768px+
   ========================================================================== */
@media (min-width: 768px) {

  p.cf-legal {
    font-size: 12px !important;
  }

  .cf-form {
    padding: 20px;
    box-shadow: 0px -19px 41px 0px rgba(193,205,205,0.1),
                0px -74px 74px 0px rgba(193,205,205,0.09),
                0px -167px 100px 0px rgba(193,205,205,0.05),
                0px -297px 119px 0px rgba(193,205,205,0.01),
                0px -464px 130px 0px rgba(193,205,205,0);
  }

  .cf-banner {
    height: 106px;
    border-radius: 16px;
  }

  .cf-banner__text {
    gap: 12px;
    padding: 0 24px;
  }

  p.cf-banner__title {
    font-family: 'Bricolage Grotesque', serif !important;
    font-weight: 600 !important;
    font-size: 20px !important;
    line-height: normal !important;
    letter-spacing: 0 !important;
    max-width: none;
    font-variation-settings: 'opsz' 14, 'wdth' 100;
  }

  p.cf-banner__subtitle {
    font-size: 14px !important;
    line-height: 20px !important;
    letter-spacing: 0% !important;
  }


  p.cf-options__title {
    font-size: 18px !important;
    line-height: 22px !important;
    letter-spacing: 0% !important;
  }

  .cf-banner__img-mobile {
    display: none !important;
  }

  .cf-banner__img-desktop {
    display: block !important;
  }

  .cf-banner__person--rita {
    right: 117px;
    top: 0;
    height: 106px;
  }

  .cf-banner__person--joao {
    right: -3px;
    top: 0;
    height: 106px;
  }

  .cf-options {
    gap: 12px;
  }

  .cf-options__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* Odd number of items: last one spans full width (alone in its row) */
  .cf-options__list > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }


  .cf-field,
  .cf-input {
    font-size: 16px;
  }

  p.cf-contact__title {
    font-size: 18px !important;
    line-height: 22px !important;
    letter-spacing: 0% !important;
  }

  .cf-contact {
    gap: 16px;
  }

  /* Scale down single person icon at 768px+ */
  .cf-option__icon img[src*="person-single-768"] {
    width: 100%;
    height: 77%;
  }

  .cf-contact__row {
    flex-direction: row;
  }

  .cf-contact__row .cf-field-wrap {
    flex: 1;
  }

  .cf-grid {
    gap: 12px;
  }

  /* Odd number of items in grid: last one spans full width */
  .cf-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

}

/* ==========================================================================
   1250px+
   ========================================================================== */
@media (min-width: 1250px) {

  .cf-wrapper {
    gap: 52px;
  }

  .cf-form {
    max-width: 754px;
    margin-left: auto;
    margin-right: auto;
  }

  p.cf-legal {
    max-width: 1200px;
    margin-left: auto !important;
    margin-right: auto !important;
    font-size: 14px !important;
    line-height: 21px !important;
    letter-spacing: 0% !important;
  }

}

/* --- Modal mode --- */
.cf-wrapper--modal {
  max-width: 580px;
  margin: 0 auto;
}

@media (min-width: 1250px) {
  .cf-wrapper--modal {
    max-width: 754px;
  }
}

.cf-wrapper--modal .cf-form {
  padding-top: 48px;
  border-radius: 20px;
}

.cf-wrapper--modal .cf-form::before {
  border-radius: 20px;
}

.cf-modal-close {
  position: absolute;
  top: 8px;
  right: 16px;
  z-index: 10;
  cursor: pointer;
  display: block !important;
}

.cf-modal-close:hover svg path {
  fill: #25232c;
}

/* ============================================================
   Combined Amount + Duration screen (data-screen="14")
   Pixel-perfect to Figma 15692:12294 (mobile)
   ============================================================ */
.cf-ad-block {
  display: flex;
  flex-direction: column;
  gap: 0;            /* input + slider glued; title has its own margin */
  width: 100%;
}

.cf-ad-block > .cf-options__title {
  margin-bottom: 8px !important;
}

/* Input row: same look as the existing cf-option--input but with no bottom
   border / radius so the slider sits flush below it (matches Figma). */
.cf-ad-input-row {
  height: 56px;
  padding: 9px 10px 4px 16px;
  background: #FFFFFF;
  border-top: 1.5px solid #EDEDED;
  border-left: 1.5px solid #EDEDED;
  border-right: 1.5px solid #EDEDED;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  cursor: text;
  /* override .cf-option--simple defaults */
  gap: 0;
}

.cf-ad-input-row .cf-input {
  font-family: 'Metropolis', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.24;
  letter-spacing: 0;
  color: #00194C;
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 0;
}

.cf-ad-input-row .cf-input::placeholder {
  color: #46535D;
  opacity: 0.5;
  letter-spacing: 0;
}

/* The slider sits flush under the input — the gray track starts immediately
   below the input's bottom edge (matches Figma "glued" look).
   Container height = track height (6px). The thumb's halo overflows above
   and below the container; overflow:visible lets it show. */
.cf-ad-slider {
  position: relative;
  height: 6px;
  width: 100%;
  overflow: visible;
}

/* Pulse ring — a sibling pseudo-element that sits exactly at the thumb's
   center (driven by --cf-thumb-x in pixels, set by JS). Animating ::before
   is reliable across browsers; animating actual slider thumbs is not. */
.cf-ad-slider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: var(--cf-thumb-x, 0px);
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  border-radius: 50%;
  background: rgba(36, 79, 194, 0.55);
  pointer-events: none;
  animation: cf-ad-thumb-pulse 1.6s ease-out infinite;
}

@keyframes cf-ad-thumb-pulse {
  0%   { transform: scale(0.5); opacity: 0.6; }
  70%  { transform: scale(2.6); opacity: 0;   }
  100% { transform: scale(2.6); opacity: 0;   }
}

@media (prefers-reduced-motion: reduce) {
  .cf-ad-slider::before { animation: none; opacity: 0; }
}

/* ============================================================
   ≥768px (and ≥1250px — same spec from Figma 15692:21772)
   Only the screen-14 internals change — banner/header/max-width untouched.
   ============================================================ */
@media (min-width: 768px) {
  .cf-ad-block > .cf-options__title,
  .cf-screen[data-screen="15"] .cf-ad-block > .cf-options__title {
    font-size: 18px !important;        /* Body L */
    line-height: 22px !important;
    letter-spacing: 0 !important;
    margin-bottom: 12px !important;
  }
}

/* ============================================================
   Combined Extra Amount screen (data-screen="15")
   Reuses .cf-ad-block / .cf-ad-input-row / .cf-ad-slider styles.
   Adds: Sim/Não 2-col grid + hide amount block when Não is selected.
   ============================================================ */
.cf-screen[data-screen="15"] .cf-ea-yesno-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

@media (min-width: 768px) {
  .cf-screen[data-screen="15"] .cf-ea-yesno-grid { gap: 12px; }
}

/* When "Não" is selected, hide the amount block (smooth transition) */
.cf-screen[data-screen="15"].cf-screen--ea-no .cf-ea-amount-block {
  display: none;
}

/* ============================================================
   Housing / Only Credits Choice screen (data-screen="16")
   Per-option subtitle: when ACF subtitle field is empty, the option
   gets .cf-option--no-subtitle and the title is vertically centered.
   When subtitle is filled, the option renders normally (title + subtitle).
   ============================================================ */
.cf-option--no-subtitle .cf-option__text {
  justify-content: center;
  padding-top: 0;
}

/* Custom-styled HTML5 range — visual styling lives on the track pseudo-elements
   (works reliably across browsers). The input element itself is just a
   transparent positioning host. Sharp corners (no border-radius) per Figma. */
.cf-ad-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: transparent;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  outline: none;
  cursor: pointer;
  display: block;
  overflow: visible;
}

/* WebKit: gray track with the gradient fill drawn via background-image whose
   width is controlled by --cf-range-pct from JS. */
.cf-ad-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border: 0;
  border-radius: 0;
  background-color: #F5F5F5;
  background-image: linear-gradient(to right, #244FC2 0%, #4C71D4 50%, #5893FF 100%);
  background-size: var(--cf-range-pct, 0%) 100%;
  background-repeat: no-repeat;
  background-position: left center;
}

/* Firefox: gray track + separate ::-moz-range-progress for the fill */
.cf-ad-slider input[type="range"]::-moz-range-track {
  height: 6px;
  border: 0;
  border-radius: 0;
  background: #F5F5F5;
}
.cf-ad-slider input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 0;
  background: linear-gradient(to right, #244FC2 0%, #4C71D4 50%, #5893FF 100%);
}

/* Thumb (Figma "Bullet"):
   - 16px solid blue core (#244FC2)        — per Figma
   - 3px white ring around it (22px outer)
   - 3px translucent blue static halo (28px visible)
   The pulsing ring is rendered separately by .cf-ad-slider::before */
.cf-ad-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #244FC2;
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 3px rgba(36, 79, 194, 0.2);
  box-sizing: content-box;
  cursor: grab;
  /* Center the 22px outer thumb box on the 6px track: (6 - 22) / 2 = -8px */
  margin-top: -8px;
  position: relative;
  z-index: 1; /* keep thumb visually above the ::before pulse ring */
}
.cf-ad-slider input[type="range"]:active::-webkit-slider-thumb {
  cursor: grabbing;
}

.cf-ad-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #244FC2;
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 3px rgba(36, 79, 194, 0.2);
  box-sizing: content-box;
  cursor: grab;
}

/* Error state on the input row matches the existing cf-field--error pattern */
.cf-ad-input-row.cf-field--error {
  border-top-color: #ED513B;
  border-left-color: #ED513B;
  border-right-color: #ED513B;
}
.cf-ad-input-row .cf-field-error-msg {
  position: absolute;
  bottom: auto;
  left: 10px;
}
