/* ==========================================================================
   1. HubSpot Form Root (전체 테마 & 변수)
   ========================================================================== */
[data-hsfc-id="Renderer"] {
  --hsf-global__font-family: Freesentation, sans-serif !important;
  --hsf-global__font-size: 2rem !important;  
  --hsf-default-background__padding: 40px !important;
  --hsf-default-background__background-color: rgba(250, 250, 250, 1.0) !important;
  --hsf-default-background__border-style: none !important;
  --hsf-default-background__border-color: rgba(250, 250, 250, 1.0) !important;
  --hsf-default-background__border-radius: 0 !important;
  --hsf-default-progressbar-progressLine__background-color: rgba(0, 220, 132, 1.0) !important;
  --hsf-default-field-label__color: rgba(0, 0, 0, 1.0) !important;
  --hsf-default-field-input__background-color: transparent !important;
  --hsf-default-field-input__border-style: none !important;
  --hsf-default-field-checkbox__border-style: solid !important;
  --hsf-default-field-textarea__background-color: #ffffff !important;
  --hsf-default-field-textarea__border-color: #eeeeee !important;
  --hsf-default-field-checkbox__padding: 1rem !important;
}

@media (min-width: 1280px) {
  [data-hsfc-id="Renderer"] {
    --hsf-default-background__padding: 40px 60px !important; /* 반반 레이아웃에 맞춰 패딩 최적화 */
  }
}

/* ==========================================================================
   2. Layout & Container
   ========================================================================== */
.custom_modal_hsform_inner {
  padding: 4.8rem 0 6.4rem !important; /* 반반 모달에 맞춰 상하 여백 조정 */
}

.custom_modal_hsform .hsfc-Step__Content {
  /* min-height: 500px; */
  background-color: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
}

.custom_modal_hsform .hsfc-Step .hsfc-Step__Banner {
  background-color: #fafafa !important;
}

/* ==========================================================================
   3. Input Controls (언더라인 스타일 & Placeholder)
   ========================================================================== */
/* 기본 테두리 제거 및 하단 언더라인만 표시 */
.custom_modal_hsform .hsfc-TextInput,
.custom_modal_hsform .hsfc-TextInput:hover,
.custom_modal_hsform .hsfc-TextInput:focus,
.custom_modal_hsform .hsfc-DropdownInput--active {
  border: none !important;
  border-bottom: 1px solid #e0e0e0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Placeholder 색상 고정 */
.custom_modal_hsform .hsfc-TextField input::placeholder,
.custom_modal_hsform .hsfc-PhoneField input::placeholder,
.custom_modal_hsform .hsfc-EmailField input::placeholder,
.custom_modal_hsform .hsfc-DropdownInput input::placeholder,
.custom_modal_hsform .hsfc-TextareaInput::placeholder {
  color: #cccccc !important;
}

/* Dropdown Custom Styles */
.custom_modal_hsform .hsfc-DropdownOptions__Search {
  padding: 0 !important;
}

.custom_modal_hsform .hsfc-DropdownOptions__List {
  background: #fafafa !important;
}

.custom_modal_hsform li.hsfc-DropdownOptions__List__ListItem {
  padding: 0.8rem !important;
  font-size: 2rem !important;
  line-height: 1 !important;
  font-weight: 400 !important;
  background: #fafafa !important;
}

.custom_modal_hsform li.hsfc-DropdownOptions__List__ListItem:hover {
  color: #ffffff !important;
  background: #000000 !important;
}

/* ==========================================================================
   4. Typography & Labels
   ========================================================================== */
.custom_modal_hsform label {
  font-size: 2rem !important;
  font-weight: 500 !important;
}

.custom_modal_hsform label > span {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.custom_modal_hsform h2.hsfc-Heading {
  font-size: 3.2rem !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
  color: #000000 !important;
  align-self: center !important;
}

.custom_modal_hsform .hsfc-RichText {
  font-size: 24px !important;
  line-height: 36px !important;
  color: #9e9e9e !important;
}

[data-hsfc-id="Renderer"] .hsfc-FieldLabel__RequiredIndicator {
  color: #000000 !important;
}

[data-hsfc-id="Renderer"] .hsfc-CheckboxField label a {
  border-bottom: 1px solid #000000;
}

[data-hsfc-id="Renderer"] .hsfc-ErrorAlert {
  width: 100%;
  font-size: max(14px, 1.4rem) !important;
}

/* ==========================================================================
   5. General Horizontal Field Layout (범용 라벨-인풋 가로 정렬)
   ========================================================================== */
/* 텍스트/이메일/전화번호 등 일반 필드에 범용 적용 */
@media (min-width: 1024px) {
  .custom_modal_hsform .hsfc-TextField,
  .custom_modal_hsform .hsfc-EmailField,
  .custom_modal_hsform .hsfc-PhoneField,
  .custom_modal_hsform .hsfc-DropdownField {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
  }

  .custom_modal_hsform .hsfc-TextField .hsfc-FieldLabel,
  .custom_modal_hsform .hsfc-EmailField .hsfc-FieldLabel,
  .custom_modal_hsform .hsfc-PhoneField .hsfc-FieldLabel,
  .custom_modal_hsform .hsfc-DropdownField .hsfc-FieldLabel {
    flex: 0 0 100px !important; /* 모든 필드의 라벨 폭 100px 고정 */
    margin-bottom: 0 !important;
    text-align: left !important;
    white-space: nowrap !important;
  }

  .custom_modal_hsform .hsfc-TextField .hsfc-TextInput,
  .custom_modal_hsform .hsfc-EmailField .hsfc-TextInput,
  .custom_modal_hsform .hsfc-PhoneField .hsfc-PhoneInput,
  .custom_modal_hsform .hsfc-DropdownField .hsfc-DropdownInput {
    flex: 1 !important;
    width: auto !important;
  }

  .custom_modal_hsform .hsfc-ErrorAlert {
    flex: 0 0 100% !important;
  }
}

/* ==========================================================================
   6. Navigation & Buttons
   ========================================================================== */
.hsfc-NavigationRow__Buttons {
  display: flex !important;
  /* justify-content: space-between !important; */
  width: 100% !important;
  gap: 10px;
  margin-top: 10px !important;
}

/*
.hsfc-NavigationRow__Buttons:not(:has(button:nth-child(2))) {
  justify-content: flex-end !important;
}
*/

.custom_modal_hsform .hsfc-Button {
  font-size: 2rem !important;
  font-weight: 600 !important;
  color: #000000 !important;
  line-height: 1 !important;
  padding: 11px 40px !important;
  border-radius: 0 !important;
  background: #eeeeee !important;
  cursor: pointer !important;
  transition: all 0.3s ease;
}

.custom_modal_hsform .hsfc-Button:hover {
  background: #000000 !important;
  color: #ffffff !important;
}

/* Progress Bar */
.custom_modal_hsform .hsfc-ProgressBar__Text {
  margin-bottom: 11px !important;
  text-align: center !important;
}

.custom_modal_hsform .hsfc-ProgressBar__Progress,
.custom_modal_hsform .hsfc-ProgressBar__Progress > div {
  border-radius: 0 !important;
}

/* ==========================================================================
   7. Step Content Vertical Positioning (프로그래스바 상단, 버튼 하단 고정)
   ========================================================================== */
/* 프로그래스 바 최상단 고정 */
.custom_modal_hsform .hsfc-Step__Content > .hsfc-Row:has(.hsfc-ProgressBar) {
  order: -1 !important;
  margin-top: 12px !important;
  margin-bottom: 40px !important;
  padding: 0 !important;
}

/* 중간 필드 영역 자동 확장 */
.custom_modal_hsform .hsfc-Step__Content > .hsfc-Row:not(:first-child):not(:has(.hsfc-ProgressBar)):not([data-hsfc-id="NavigationRow"]) {
  flex-grow: 0 !important;
}

/* 네비게이션 버튼 바닥 고정 */
.custom_modal_hsform .hsfc-NavigationRow {
  margin-top: auto !important;
  padding-top: 20px;
}

/* ==========================================================================
   8. Data Privacy (General Handling)
   ========================================================================== */
/* 데이터 프라이버시 전체 필드 기본 여백 정리 */
.hsfc-DataPrivacyField {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* 데이터 프라이버시 내부 불필요한 타이틀/빈 공간 숨김 */
.hsfc-DataPrivacyField > .hsfc-Row:first-child,
.hsfc-DataPrivacyField > .hsfc-Row:last-child {
  display: none !important;
}

/* ==========================================================================
   9. Modal Wrapper & Overlay Styles
   ========================================================================== */

.sindoh-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sindoh-modal-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sindoh-modal-container {
  position: relative;
  width: 100%;
  max-height: 85vh;
  max-width: 600px;
  overflow-y: auto;
  background-color: #ffffff;
  border-radius: 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;

  /* PC 기본 패딩 (상단 X버튼 공간 60px 확보) */
  padding: 60px 48px 48px 48px;

  /* 스크롤바 감추기 */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sindoh-modal-container::-webkit-scrollbar {
  display: none;
}

/* Rich Text 내부의 창 닫기 링크(a태그)를 버튼 스타일로 변환 */
.custom_modal_hsform .hsfc-RichText a[rel="noopener"] {
  display: inline-block !important;
  margin-top: 20px !important;
  padding: 12px 36px !important;
  background-color: #000000 !important; /* 검은색 배경 */
  color: #ffffff !important; /* 흰색 글자 */
  font-size: max(2rem, 16px); !important;
  font-weight: 600 !important;
  text-decoration: none !important; /* 밑줄 제거 */
  border-radius: 0 !important; /* 모달 스타일과 동일하게 각진 버튼 (라운드 원하시면 4px) */
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

/* 마우스 호버 시 효과 */
.custom_modal_hsform .hsfc-RichText a[rel="noopener"]:hover {
  background-color: #333333 !important;
  color: #ffffff !important;
}

/* ================= =========================================================
   [수정 완료] 닫기 버튼 스타일링 강화
   ========================================================================== */
.sindoh-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffffff !important; /* 배경을 흰색으로 지정하여 어떤 환경이든 시인성 확보 */
  border: 1px solid #e0e0e0 !important; /* 은은한 테두리로 버튼 위치 명확화 */
  border-radius: 50% !important; /* 원형 버튼 */
  cursor: pointer !important;
  z-index: 999 !important;
  padding: 0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); /* 살짝 그림자 추가 */
  transition: all 0.2s ease !important;
}

/* SVG 크기와 위치 강제 고정 */
.sindoh-modal-close svg {
  width: 24px !important;
  height: 24px !important;
  display: block !important;
}

/* SVG 경로(선)의 색상과 두께 강제 지정 */
.sindoh-modal-close svg path {
  stroke: #111111 !important; /* 짙은 검은색 */
  stroke-width: 2.2px !important; /* 선을 살짝 더 두껍게 */
}

/* 마우스 올렸을 때 (Hover Effect) */
.sindoh-modal-close:hover {
  background-color: #000000 !important;
  border-color: #000000 !important;
  transform: rotate(90deg); /* 호버 시 회전 애니메이션 */
}

.sindoh-modal-close:hover svg path {
  stroke: #ffffff !important; /* 마우스 올리면 X선이 흰색으로 변경 */
}


/* ==========================================================================
   반응형 (Media Queries)
   ========================================================================== */

@media (max-width: 768px) {
  .sindoh-modal-container {
    width: 95%;
    max-height: 90vh;
    padding: 52px 20px 28px 20px;
  }
  
  .custom_modal_hsform_inner {
    padding: 1rem 0 !important; /* 반반 모달에 맞춰 상하 여백 조정 */
  }  
  
  .custom_modal_hsform .hsfc-Step__Content {
    /* min-height: 400px; */
  }  
  
  .sindoh-modal-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
  }
}