/* ─── FORMULARIO EMBEBIDO DE HUBSPOT (hbspt.forms.create, css: "") ──────────
   FUERA de @layer a propósito: el CSS que inyecta HubSpot no tiene capa y le ganaría a cualquier regla de una capa.
   HubSpot arma los campos; acá solo se estilizan con el Figma: etiqueta = placeholder sobre una línea de 1px. */
.fqc-form-wrap {
  width: 100%;
  max-width: 552px;
}

.fqc-form-wrap .fqc-hsform {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  margin: 0;
}

/* Fieldsets que solo traen campos ocultos (franquicia, fuente): sin alto, para que no sumen un espacio de la grilla */
.fqc-form-wrap .fqc-hsform fieldset:not(:has(.hs-form-field:not([style*="display: none"]))) {
  display: none;
}

.fqc-form-wrap .fqc-hsform fieldset {
  display: flex;
  gap: 40px;
  min-width: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.fqc-form-wrap .fqc-hsform fieldset > .hs-form-field,
.fqc-form-wrap .fqc-hsform fieldset > .hs-dependent-field {
  flex: 1;
  min-width: 0;
}

/* País + Provincia/Estado (campos dependientes) apilados con el mismo espacio de la grilla */
.fqc-form-wrap .fqc-hsform .hs-dependent-field {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fqc-form-wrap .fqc-hsform .hs-form-field {
  position: relative;
  width: 100%;
  margin: 0;
}

/* La etiqueta vive en el placeholder (como el Figma); el campo oculto "franquicia" ya viene con display none */
.fqc-form-wrap .fqc-hsform .hs-form-field > label {
  display: none;
}

.fqc-form-wrap .fqc-hsform .input {
  position: relative;
  width: 100%;
  margin: 0;
}

.fqc-form-wrap .fqc-hsform .hs-input,
.fqc-form-wrap .fqc-hsform select.hs-input,
.fqc-form-wrap .fqc-hsform textarea.hs-input {
  display: block;
  width: 100% !important; /* HubSpot fija 95% con un selector de instancia más específico */
  height: 27px;
  margin: 0;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid var(--super-azul);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  color: var(--super-azul);
  transition: border-color 0.2s ease;
}

.fqc-form-wrap .fqc-hsform .hs-input::placeholder {
  color: var(--super-azul);
  opacity: 1;
  
}

.fqc-form-wrap .fqc-hsform .hs-input:focus {
  border-bottom-color: var(--fucsia);
}

/* Consulta: una sola línea como los demás campos */
.fqc-form-wrap .fqc-hsform textarea.hs-input {
  resize: none;
  overflow: hidden;
}

/* Listas desplegables (País, Provincia): flecha chica a la derecha */
.fqc-form-wrap .fqc-hsform select.hs-input {
  padding-right: 20px;
  cursor: pointer;
  
}

.fqc-form-wrap .fqc-hsform .hs-fieldtype-select .input::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-right: 1px solid var(--super-azul);
  border-bottom: 1px solid var(--super-azul);
  transform: rotate(45deg);
  pointer-events: none;
}

.fqc-form-wrap .fqc-hsform select.hs-input option {
  color: #111;
  background: #fff;
  text-transform: none;
}

/* Teléfono: "Teléfono*" a la izquierda, selector de país (código) y número en la misma línea */
.fqc-form-wrap .fqc-hsform .hs-fieldtype-phonenumber .hs-fieldtype-intl-phone.hs-input {
  --tel-label: 147px;
  position: relative;
  display: flex;
  align-items: flex-start;
  width: 100%;
  height: 33px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--super-azul);
  box-sizing: border-box;
}

.fqc-form-wrap .fqc-hsform .hs-fieldtype-phonenumber .hs-fieldtype-intl-phone.hs-input:focus-within {
  border-bottom-color: var(--fucsia);
}

.fqc-form-wrap .fqc-hsform .hs-fieldtype-intl-phone::before {
  content: "Teléfono*";
  flex: 0 0 var(--tel-label, 147px);
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  color: var(--super-azul);
  
}

.fqc-form-wrap .fqc-hsform .hs-fieldtype-intl-phone > .hs-input {
  height: 17px;
  padding: 0;
  border: 0;
}

/* Selector de país: se ve solo el código ISO (el nombre completo queda en la lista) */
.fqc-form-wrap .fqc-hsform .hs-fieldtype-intl-phone > select.hs-input {
  flex: 0 0 44px;
  width: 44px;
  padding-right: 14px;
  color: transparent;
  cursor: pointer;
}

.fqc-form-wrap .fqc-hsform .fqc-iso {
  position: absolute;
  top: 0;
  left: var(--tel-label, 147px);
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  color: var(--super-azul);
  pointer-events: none;
}

.fqc-form-wrap .fqc-hsform .hs-fieldtype-intl-phone > input[type="tel"] {
  flex: 1;
  min-width: 0;
}

/* Errores de validación de HubSpot (debajo del campo) */
.fqc-form-wrap .fqc-hsform .hs-error-msgs {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.fqc-form-wrap .fqc-hsform .hs-error-msg {
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: #b3261e;
}

/* Botón (Figma) */
.fqc-form-wrap .fqc-hsform .hs-submit {
  margin-top: 24px;
}

.fqc-form-wrap .fqc-hsform .hs-submit .actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.fqc-form-wrap .fqc-hsform .hs-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-sizing: border-box;
  cursor: pointer;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
  width: 256px;
  height: 50px;
  padding: 10px;
  border-radius: 74px;
  background: var(--grad-boton);
  color: var(--blanco);
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}

.form-fallback {
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 17px;
  color: var(--super-azul);
}

.fqc-form-wrap .fqc-hsform .hs-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px #e7004c40;
}

/* Figma: el texto de Teléfono y el prefijo bajan 3px */
.fqc-form-wrap .fqc-hsform .hs-fieldtype-intl-phone::before {
  padding-top: 3px;
}

.fqc-form-wrap .fqc-hsform .fqc-iso {
  top: 3px;
}

.fqc-form-wrap .fqc-hsform .hs-fieldtype-intl-phone > .hs-input {
  margin-top: 3px;
}

/* El formulario de HubSpot trae "rubro" y "rango de inversión" (opcionales) que el diseño no tiene */
.fqc-form-wrap .fqc-hsform fieldset:has(.hs_rubro),
.fqc-form-wrap .fqc-hsform fieldset:has(.hs_rango_de_inversion) {
  display: none;
}

/* Mobile = frame Figma 480 */
@media (max-width: 767px) {
  .fqc-form-wrap {
    max-width: 552px;
  }

  .fqc-form-wrap .fqc-hsform {
    gap: 40px;
  }

  .fqc-form-wrap .fqc-hsform fieldset {
    gap: 40px;
  }

  .fqc-form-wrap .fqc-hsform fieldset.form-columns-2 {
    flex-direction: column;
  }

  .fqc-form-wrap .fqc-hsform .hs-dependent-field {
    gap: 40px;
  }

  .fqc-form-wrap .fqc-hsform .hs-input,
  .fqc-form-wrap .fqc-hsform select.hs-input,
  .fqc-form-wrap .fqc-hsform textarea.hs-input {
    height: 27px;
    padding-bottom: 10px;
    font-family: var(--font-inter, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 400;
    line-height: 17px;
  }

  .fqc-form-wrap .fqc-hsform .hs-fieldtype-phonenumber .hs-fieldtype-intl-phone.hs-input {
    --tel-label: clamp(78px, 30.6vw, 147px);
    height: 33px;
  }

  .fqc-form-wrap .fqc-hsform .hs-fieldtype-intl-phone::before,
  .fqc-form-wrap .fqc-hsform .fqc-iso,
  .fqc-form-wrap .fqc-hsform .hs-error-msg,
  .form-fallback {
    font-family: var(--font-inter, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 400;
    line-height: 17px;
  }

  .fqc-form-wrap .fqc-hsform .hs-fieldtype-intl-phone > .hs-input {
    height: 17px;
  }

  .fqc-form-wrap .fqc-hsform .hs-submit {
    margin-top: 12px;
  }
}
