/* ── 하단 고정 퀵바 레이아웃 보정 ─────────────────────────────────────
   왜: 이 바는 `#gform_fields_3` 가 inline-flex 한 줄이고, 러시아어 기준으로
   이미 폭이 꽉 차 있었다(필드 끝 1254px, 버튼 1127~1296px 로 겹침).
   국가 선택 칸이 하나 더 들어가므로 한 줄로는 불가능하다 — 두 줄로 접는다.
   ⚠️ 동의 문구는 법적 문구라 줄이지 않았다. 레이아웃으로만 해결한다. */

#gform_3 #gform_fields_3{
  flex-wrap: wrap !important;
  row-gap: 8px !important;
  column-gap: 14px !important;
  align-items: center !important;
  width: 100% !important;
}
/* 입력 5칸(이름·국가·전화·주제·메모)은 같이 늘고 줄어든다 */
#gform_3 #gform_fields_3 > .gfield{
  flex: 1 1 150px !important;
  min-width: 128px !important;
  max-width: none !important;
}
/* 동의 두 칸은 **가로 한 행에 나란히** 둔다(고객사 요청 2026-08-18).
   기본 flex 배분(1 1 230px)으로는 첫 칸이 좁아 문구가 2줄로 접혔다.
   실측: 한 줄로 펴면 동의1=461px, 동의2=331px, 사용 가능 폭 1024px 이라 충분히 들어간다.
   그래서 균등 배분을 버리고 **각자 필요한 만큼만**(flex-basis:auto) 차지하게 한다. */
#gform_3 #gform_fields_3 > #field_3_8,
#gform_3 #gform_fields_3 > #field_3_14{
  /* ⚠️ shrink 를 0 으로 둘 것. `0 1 auto` 로 두면 칸이 0 까지 줄고 라벨이 서로
     겹쳐 그려진다(실측). 두 칸 합이 792px 이고 쓸 폭이 1024px 이라 안 줄여도 된다. */
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: auto !important;
}
#gform_3 #field_3_8 label,
#gform_3 #field_3_14 label,
#gform_3 #field_3_8 .gfield_label,
#gform_3 #field_3_14 .gfield_label{ white-space: nowrap !important; }

/* 줄바꿈 지점. quickbar-{lang}.js 가 동의칸 앞에 끼우는 빈 div 다.
   이게 없으면 flex-basis:auto 인 첫 동의칸이 입력칸 행으로 딸려 올라가 버튼을 덮는다(실측). */
#gform_3 #gform_fields_3 > .qb-break{
  flex: 0 0 100% !important;
  width: 100% !important; height: 0 !important;
  margin: 0 !important; padding: 0 !important;
}
#gform_3 .qb-country-field select{ width: 100% !important; }

/* 버튼이 필드를 덮지 않게 — 폼 자체를 flex 로 두고 버튼을 끝에 붙인다 */
#gform_3{ display: flex !important; align-items: center !important; gap: 14px !important; }
#gform_3 .gform-body{ flex: 1 1 auto !important; min-width: 0 !important; }
/* ⚠️ 테마가 이 푸터를 position:absolute 로 오른쪽에 못 박아 둔다(실측 x=1127).
   그래서 필드가 늘어나면 버튼이 그 위를 덮는다. static 으로 돌려 흐름에 태운다. */
#gform_3 .gform_footer{
  position: static !important;
  flex: 0 0 auto !important;
  margin: 0 !important; padding: 0 !important;
  width: auto !important; right: auto !important; left: auto !important; top: auto !important;
}
#gform_3 #gform_submit_button_3{ white-space: nowrap !important; }

/* 좁은 화면에서는 자연스럽게 여러 줄로.
   ⚠️ 모바일(≤768px)에서 동의 문구가 바 밖으로 넘쳐 본문을 덮는 문제가 있다.
      **원래 있던 것이다** — 변경 전 라이브 768px 렌더에서도 똑같이 넘친다.
      아래 height:auto 로는 안 잡힌다. 높이를 잡는 것이 폼이 아니라 **바 바깥 래퍼**라
      그 선택자를 찾아야 한다. 이번 요청(체크박스·국가칸) 범위 밖이라 남겨 둔다. */
@media (max-width: 900px){
  #gform_3{ flex-wrap: wrap !important; }
  #gform_3 #gform_fields_3 > .gfield{ flex: 1 1 45% !important; }
  /* 좁으면 nowrap 을 풀고 각자 한 줄씩 */
  #gform_3 #gform_fields_3 > #field_3_8,
  #gform_3 #gform_fields_3 > #field_3_14{ flex: 1 1 100% !important; }
  #gform_3 #field_3_8 label, #gform_3 #field_3_14 label,
  #gform_3 #field_3_8 .gfield_label, #gform_3 #field_3_14 .gfield_label{ white-space: normal !important; }
  /* 바가 내용에 맞춰 늘어나야 넘치지 않는다 */
  #gform_3, #gform_3 .gform-body, #gform_3 #gform_fields_3{ height: auto !important; overflow: visible !important; }
}
