/* ─── 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: none;
}

.fqc-form-wrap .fqc-hsform {
  display: flex;
  flex-direction: column;
  gap: 24px;
  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: 24px;
  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: 24px;
}

.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: 41px;
  margin: 0;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid #000000;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  font-family: var(--font-barlow, 'Barlow', sans-serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #000000;
  transition: border-color 0.2s ease;
}

.fqc-form-wrap .fqc-hsform .hs-input::placeholder {
  color: #000000;
  opacity: 1;
  
}

.fqc-form-wrap .fqc-hsform .hs-input:focus {
  border-bottom-color: #000000;
}

/* 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 #000000;
  border-bottom: 1px solid #000000;
  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: 41px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #000000;
  box-sizing: border-box;
}

.fqc-form-wrap .fqc-hsform .hs-fieldtype-phonenumber .hs-fieldtype-intl-phone.hs-input:focus-within {
  border-bottom-color: #000000;
}

.fqc-form-wrap .fqc-hsform .hs-fieldtype-intl-phone::before {
  content: "Teléfono*";
  flex: 0 0 var(--tel-label, 147px);
  font-family: var(--font-barlow, 'Barlow', sans-serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #000000;
  
}

.fqc-form-wrap .fqc-hsform .hs-fieldtype-intl-phone > .hs-input {
  height: 22px;
  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-barlow, 'Barlow', sans-serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #000000;
  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-barlow, 'Barlow', sans-serif);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: #7a0b05;
}

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

.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;
  background: #ffffff;
  color: #000000;
  padding: 12px 28px;
  border-radius: 8px;
  font-family: var(--font-barlow, 'Barlow', sans-serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.form-fallback {
  font-family: var(--font-barlow, 'Barlow', sans-serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #000000;
}

/* Figma: el texto de los campos arranca 8px bajo la línea superior */
.fqc-form-wrap .fqc-hsform .hs-input {
  padding-top: 8px;
}

.fqc-form-wrap .fqc-hsform .hs-fieldtype-phonenumber .hs-fieldtype-intl-phone.hs-input {
  padding-top: 0;
}

.fqc-form-wrap .fqc-hsform .hs-fieldtype-intl-phone::before,
.fqc-form-wrap .fqc-hsform .fqc-iso {
  margin-top: 8px;
}

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

/* El formulario de HubSpot trae un campo "comentarios" además de "message": el diseño tiene una sola consulta */
.fqc-form-wrap .fqc-hsform .hs_comentarios {
  display: none !important;
}

.fqc-form-wrap .fqc-hsform fieldset:has(.hs_comentarios):not(:has(.hs-form-field:not(.hs_comentarios))) {
  display: none;
}

.fqc-form-wrap .fqc-hsform .hs-button:hover {
  background: #f4f4f5;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

@media (max-width: 992px) {
  .fqc-form-wrap .fqc-hsform fieldset.form-columns-2 {
    flex-direction: column;
    gap: 18px;
  }

  .fqc-form-wrap .fqc-hsform .hs-submit .actions {
    width: 100%;
  }

  .fqc-form-wrap .fqc-hsform .hs-button {
    width: 100%;
    text-align: center;
  }
}

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

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

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

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

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

  .fqc-form-wrap .fqc-hsform .hs-input,
  .fqc-form-wrap .fqc-hsform select.hs-input,
  .fqc-form-wrap .fqc-hsform textarea.hs-input {
    height: 41px;
    padding-bottom: 10px;
    font-family: var(--font-barlow, 'Barlow', sans-serif);
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
  }

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

  .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-barlow, 'Barlow', sans-serif);
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
  }

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

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