/* =========================================================================
   메인 하단 간편 상담 배너 (Main Consult Banner)
   - /inquiry 하단 배너와 동일 양식을 메인 페이지 전용으로 이식
   - CSS 변수 의존 제거(값 하드코딩), 클래스명 mcb- 로 네임스페이스 (충돌 방지)
   - 브랜드 컬러: #347BF7
   ========================================================================= */

/* 공통 리셋(범위 한정) */
.mcb-banner *,
.mcb-mobile-banner *,
.mcb-modal *,
.mcb-privacy-modal * {
  box-sizing: border-box;
}

/* -------------------------------------------------------------------------
   데스크톱 하단 고정 배너 (>=1024px 노출)
   ------------------------------------------------------------------------- */
.mcb-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #347BF7;
  color: #ffffff;
  z-index: 1000;
  box-shadow: 0 -1px 0 #e4e4e7, 0 -8px 24px rgb(0 0 0 / 0.08);
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
}

.mcb-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.mcb-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.mcb-badge {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.mcb-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.3;
}

.mcb-form {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  justify-content: flex-end;
}

.mcb-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mcb-field label {
  font-size: 11px;
  opacity: 0.85;
  color: #ffffff;
}

.mcb-field input,
.mcb-field select {
  padding: 10px 14px;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 8px;
  font-size: 14px;
  min-width: 180px;
  background: rgb(255 255 255 / 0.95);
  color: #18181b;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.2;
}

.mcb-field input:focus,
.mcb-field select:focus {
  outline: none;
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgb(255 255 255 / 0.25);
}

.mcb-field input::placeholder {
  color: #8a8a92;
}

.mcb-field select {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.mcb-field select:invalid {
  color: #8a8a92;
}

.mcb-field select option {
  color: #18181b;
}

.mcb-submit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.mcb-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  cursor: pointer;
  opacity: 0.9;
  color: #ffffff;
}

.mcb-checkbox input[type="checkbox"] {
  /* 메인 스킨 전역 리셋(appearance:none)로 체크박스가 사라지는 문제 → 네이티브 렌더 강제 복원 */
  -webkit-appearance: checkbox !important;
  appearance: auto !important;
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #ffffff;
  margin: 0;
}

.mcb-checkbox .mcb-privacy-link {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mcb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  background: #ffffff;
  color: #347BF7;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  font-family: inherit;
}

.mcb-btn:hover {
  background: #f4f4f5;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  transform: translateY(-1px);
}

.mcb-btn:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.mcb-arrow {
  font-size: 18px;
  font-weight: 400;
}

/* -------------------------------------------------------------------------
   모바일 하단 고정 CTA (<1024px 노출) — 클릭 시 모달 오픈
   ------------------------------------------------------------------------- */
.mcb-mobile-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #347BF7;
  padding: 14px 20px;
  z-index: 1000;
  cursor: pointer;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgb(52 123 247 / 0.5);
  box-shadow: 0 -8px 24px rgb(0 0 0 / 0.12);
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
}

.mcb-m-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mcb-m-badge {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
  color: #ffffff;
}

.mcb-m-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.mcb-m-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mcb-m-btn {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.mcb-m-arrow {
  font-size: 18px;
  color: #ffffff;
}

/* -------------------------------------------------------------------------
   상담 신청 모달 (모바일에서 사용)
   ------------------------------------------------------------------------- */
.mcb-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgb(0 0 0 / 0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
}

.mcb-modal-content {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.3);
  animation: mcb-pop 0.2s ease;
}

@keyframes mcb-pop {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mcb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #eef0f3;
}

.mcb-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #18181b;
}

.mcb-modal-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #8a8a92;
  cursor: pointer;
  padding: 0;
}

.mcb-modal-body {
  padding: 24px;
}

.mcb-modal-form .mcb-form-group {
  margin-bottom: 16px;
}

.mcb-modal-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 6px;
}

.mcb-modal-form .mcb-required {
  color: #e5484d;
}

.mcb-modal-form input[type="text"],
.mcb-modal-form input[type="tel"],
.mcb-modal-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dce0e6;
  border-radius: 8px;
  font-size: 15px;
  color: #18181b;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.mcb-modal-form input:focus,
.mcb-modal-form select:focus {
  outline: none;
  border-color: #347BF7;
  box-shadow: 0 0 0 3px rgb(52 123 247 / 0.15);
}

.mcb-modal-form input::placeholder {
  color: #adb5bd;
}

.mcb-modal-form select {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.mcb-form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.mcb-form-checkbox input[type="checkbox"] {
  /* 전역 리셋(appearance:none) 무력화 → 네이티브 체크박스 복원 */
  -webkit-appearance: checkbox !important;
  appearance: auto !important;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #347BF7;
  cursor: pointer;
  flex-shrink: 0;
}

.mcb-form-checkbox label {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #555555;
  line-height: 1.5;
}

.mcb-form-checkbox .mcb-privacy-link {
  color: #347BF7;
  text-decoration: underline;
  cursor: pointer;
}

.mcb-btn-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  background: #347BF7;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}

.mcb-btn-submit:hover {
  background: #2a6ae0;
}

.mcb-btn-submit:disabled {
  opacity: 0.7;
  cursor: default;
}

/* -------------------------------------------------------------------------
   개인정보 처리방침 모달
   ------------------------------------------------------------------------- */
.mcb-privacy-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100001;
  background: rgb(0 0 0 / 0.55);
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
}

.mcb-privacy-modal.mcb-open {
  display: flex;
}

.mcb-privacy-content {
  background: #ffffff;
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.3);
}

.mcb-privacy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #eef0f3;
  flex-shrink: 0;
}

.mcb-privacy-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #18181b;
}

.mcb-privacy-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #8a8a92;
  cursor: pointer;
  padding: 0;
}

.mcb-privacy-body {
  padding: 24px;
  overflow-y: auto;
}

.mcb-privacy-body h4 {
  margin: 18px 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #18181b;
}

.mcb-privacy-body h4:first-child {
  margin-top: 0;
}

.mcb-privacy-body p {
  margin: 0 0 8px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #555555;
}

/* -------------------------------------------------------------------------
   메인 스킨 전역 CSS 누수 차단 (reset/common의 select·label 규칙이 배너에 새어들어
   피해유형 select가 60px로 커지고, 동의 라벨이 18px·flex-start로 어긋나던 문제)
   → .mcb-banner 스코프 + !important 로 확정
   ------------------------------------------------------------------------- */
.mcb-banner .mcb-field input,
.mcb-banner .mcb-field select {
  height: 40px !important;
  line-height: 20px !important;
}
.mcb-banner .mcb-checkbox {
  align-items: center !important;
  gap: 6px !important;
  font-size: 11px !important;
}
.mcb-banner .mcb-checkbox span {
  font-size: 11px !important;
  line-height: 1.3 !important;
  display: inline !important;
}
.mcb-banner .mcb-checkbox .mcb-privacy-link {
  font-size: 11px !important;
  line-height: 1.3 !important;
}
.mcb-banner .mcb-checkbox input[type="checkbox"] {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}
/* 모바일 모달 폼도 동일 누수 방어 */
.mcb-modal-form input[type="text"],
.mcb-modal-form input[type="tel"],
.mcb-modal-form select {
  height: 48px !important;
  line-height: 22px !important;
}
.mcb-modal-form label {
  font-size: 14px !important;
  line-height: 1.4 !important;
}
.mcb-form-checkbox {
  align-items: center !important;
}
.mcb-form-checkbox label {
  font-size: 13px !important;
}
.mcb-form-checkbox input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
}

/* -------------------------------------------------------------------------
   모바일 전용 커스텀 플로팅 스택 (위→아래: 채널톡 · 전화하기 · 상단이동)
   - 모바일에선 사이트 .main_quick 와 ChannelIO 기본 버튼을 숨기고 이 스택으로 대체
   ------------------------------------------------------------------------- */
.mcb-fab {
  display: none;
  position: fixed;
  right: 12px;
  bottom: 80px; /* 하단 CTA 배너(약 67px) 바로 위 */
  z-index: 1001;
  flex-direction: column;
  gap: 12px;
}
.mcb-fab-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.22);
  -webkit-appearance: none;
  appearance: none;
  text-decoration: none;
}
.mcb-fab-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: #ffffff;
}
.mcb-fab-chat { background: #347BF7; }
.mcb-fab-call { background: #347BF7; }
.mcb-fab-top  { background: #111827; }
.mcb-fab-btn:active { transform: scale(0.94); }

/* -------------------------------------------------------------------------
   반응형 노출 제어
   ------------------------------------------------------------------------- */
/* 기존 우측 고정 퀵메뉴(.main_quick, bottom:40px)가 하단 배너에 가리지 않도록
   배너 위로 올림 — 이 파일은 메인 페이지에서만 로드되므로 타 페이지 영향 없음 */
.main_quick {
  bottom: 84px !important;
}

@media (min-width: 1024px) {
  .mcb-banner {
    display: block;
  }
  .mcb-mobile-banner {
    display: none;
  }
  /* 채널톡 런처(우측 하단 bottom:~184px)를 덮지 않도록 그 위로 배치 + 배너도 클리어 */
  .main_quick {
    bottom: 250px !important;
  }
  /* 데스크톱: 배너(약 100px)가 푸터 콘텐츠를 가리지 않도록 여백 확보 */
  #footer {
    padding-bottom: 120px;
  }
}

@media (max-width: 1023px) {
  .mcb-banner {
    display: none;
  }
  .mcb-mobile-banner {
    display: flex;
  }
  /* 모바일: 고정 CTA(약 67px)가 푸터 하단 콘텐츠를 가리지 않도록 여백 확보 */
  #footer {
    padding-bottom: 88px;
  }
  /* 모바일: 사이트 기본 퀵메뉴 숨기고 커스텀 스택으로 대체 (채널톡 기본버튼은 JS로 숨김) */
  .main_quick {
    display: none !important;
  }
  .mcb-fab {
    display: flex;
  }
}

/* 태블릿: 배너 2줄 레이아웃 */
@media (min-width: 1024px) and (max-width: 1279px) {
  .mcb-container {
    flex-wrap: wrap;
    padding: 8px 20px;
  }
  .mcb-left {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
  }
  .mcb-form {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }
  .mcb-field input,
  .mcb-field select {
    min-width: 140px;
  }
  .mcb-title {
    font-size: 18px;
  }
  /* 태블릿에서도 채널톡 런처 위로 (2줄 배너 대응 포함) */
  .main_quick {
    bottom: 250px !important;
  }
  #footer {
    padding-bottom: 170px;
  }
}
