/*!
 * 또바기 Floating Menu — Frontend Styles
 * --------------------------------------------------------------
 *  - 모든 선택자는 `#tfm-root`로 격리되어 있어 워드프레스 테마/타 플러그인의
 *    스타일 영향을 거의 받지 않습니다.
 *  - 모든 속성은 `!important`로 강제 적용됩니다.
 *  - PC: `tfm-d-` / 모바일: `tfm-m-` (클래스 공유 없음)
 *  - 모든 클래스는 `tfm-` 계열 접두어
 * --------------------------------------------------------------
 */

/* ---------- 0. 루트: 하단 fixed 를 끊는 containing block 방지 ---------- */
#tfm-root {
  box-sizing: border-box !important;
  -webkit-box-sizing: border-box !important;
  position: static !important;
  z-index: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
  -webkit-transform: none !important;
  perspective: none !important;
  -webkit-perspective: none !important;
  will-change: auto !important;
  contain: none !important;
  overflow: visible !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  pointer-events: none !important;
}
/* 클릭은 자식( pill / mbar )에서만 */
#tfm-root .tfm-d-pill,
#tfm-root .tfm-m-nav,
#tfm-root .tfm-m-nav a {
  pointer-events: auto !important;
}

/* Pill 전용: 전면 리셋 (mbar 는 아래에서 별도) */
#tfm-root .tfm-d-pill,
#tfm-root .tfm-d-pill *,
#tfm-root .tfm-d-pill *::before,
#tfm-root .tfm-d-pill *::after {
  box-sizing: border-box !important;
  -webkit-box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  background-image: none !important;
  font-family: 'Noto Sans KR', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-decoration: none !important;
  text-transform: none !important;
  text-shadow: none !important;
  text-align: left !important;
  letter-spacing: 0 !important;
  word-spacing: 0 !important;
  line-height: 1 !important;
  vertical-align: baseline !important;
  list-style: none !important;
  float: none !important;
  clear: none !important;
  box-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important;
  text-indent: 0 !important;
  white-space: normal !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

#tfm-root .tfm-d-pill a,
#tfm-root .tfm-d-pill a:link,
#tfm-root .tfm-d-pill a:visited,
#tfm-root .tfm-d-pill a:hover,
#tfm-root .tfm-d-pill a:active,
#tfm-root .tfm-d-pill a:focus {
  color: inherit !important;
  background: transparent !important;
  text-decoration: none !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* PC 메뉴 아이콘: 구버전(.tfm-icon img) + 현행(img.tfm-d-icg) — 테마 img 규칙 이김(특이도 최상) */
#tfm-root .tfm-d-pill a.tfm-d-lnk .tfm-d-icn img.tfm-d-icg,
#tfm-root .tfm-d-pill a.tfm-d-lnk .tfm-d-icn > .tfm-d-icg,
#tfm-root .tfm-d-icn img.tfm-d-icg,
#tfm-root .tfm-d-pill .tfm-d-icn .tfm-d-icg,
#tfm-root .tfm-pill .tfm-icon img,
#tfm-root .tfm-icon img {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  display: block !important;
  -webkit-box-flex: 0 !important;
  -ms-flex: 0 0 auto !important;
  flex: 0 0 auto !important;
  -o-object-fit: contain !important;
  object-fit: contain !important;
  -webkit-box-sizing: border-box !important;
  box-sizing: border-box !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  vertical-align: top !important;
  margin: 0 !important;
  padding: 0 !important;
}

#tfm-root .tfm-d-pill button,
#tfm-root .tfm-d-pill button:hover,
#tfm-root .tfm-d-pill button:focus,
#tfm-root .tfm-d-pill button:active {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  cursor: pointer !important;
  font: inherit !important;
  color: inherit !important;
  text-transform: none !important;
  box-shadow: none !important;
}

#tfm-root .tfm-d-pill svg {
  display: block !important;
  fill: none !important;
  overflow: visible !important;
  max-width: none !important;
  max-height: none !important;
}

/* mbar 전용 기본( Pill 리셋과 분리 — 모바일 하단 그리드/텍스트 깨짐 방지 ) */
#tfm-root .tfm-m-nav,
#tfm-root .tfm-m-nav * {
  box-sizing: border-box !important;
  -webkit-box-sizing: border-box !important;
}
#tfm-root .tfm-m-nav {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  font-family: 'Noto Sans KR', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}
#tfm-root .tfm-m-nav a,
#tfm-root .tfm-m-nav a:link,
#tfm-root .tfm-m-nav a:visited,
#tfm-root .tfm-m-nav a:hover,
#tfm-root .tfm-m-nav a:active,
#tfm-root .tfm-m-nav a:focus {
  text-decoration: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}
#tfm-root .tfm-m-nav svg {
  display: block !important;
  flex-shrink: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  overflow: visible !important;
}

/* PC 기본: 하단 바는 비표시(모바일 max-width 쿼리로만 열림) */
#tfm-root .tfm-m-nav {
  display: none !important;
  visibility: hidden !important;
}

/* ---------- 1. Pill (메인 컨테이너) ---------- */
#tfm-root .tfm-d-pill {
  position: fixed !important;
  right: var(--tfm-right, 40px) !important;
  bottom: var(--tfm-bottom, 40px) !important;
  z-index: 2147483647 !important;
  width: calc(302px * var(--tfm-s, 0.6)) !important;
  height: calc(876px * var(--tfm-s, 0.6)) !important;
  background: #143C6B !important;
  border-radius: calc(151px * var(--tfm-s, 0.6)) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-shadow: 0 calc(8px * var(--tfm-s, 0.6)) calc(28px * var(--tfm-s, 0.6)) rgba(0,0,0,0.35) !important;
  pointer-events: auto !important;
  transition:
    width 0.5s cubic-bezier(0.65, 0, 0.35, 1),
    height 0.5s cubic-bezier(0.65, 0, 0.35, 1),
    border-radius 0.5s cubic-bezier(0.65, 0, 0.35, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s ease !important;
}

#tfm-root .tfm-d-pill.tfm-d-is-collapsed {
  width: calc(282px * var(--tfm-s, 0.6)) !important;
  height: calc(282px * var(--tfm-s, 0.6)) !important;
  border-radius: 50% !important;
  cursor: pointer !important;
}
#tfm-root .tfm-d-pill.tfm-d-is-collapsed:hover {
  transform: translateY(calc(-3px * var(--tfm-s, 0.6))) !important;
  box-shadow: 0 calc(14px * var(--tfm-s, 0.6)) calc(36px * var(--tfm-s, 0.6)) rgba(0,0,0,0.45) !important;
}

/* ---------- 2. 상단 흰 원 + 로고 + 서브타이틀 ---------- */
#tfm-root .tfm-d-twrap {
  position: relative !important;
  height: calc(287px * var(--tfm-s, 0.6)) !important;
  flex-shrink: 0 !important;
}

#tfm-root .tfm-d-oval {
  position: absolute !important;
  top: calc(10px * var(--tfm-s, 0.6)) !important;
  left: calc(10px * var(--tfm-s, 0.6)) !important;
  width: calc(282px * var(--tfm-s, 0.6)) !important;
  height: calc(282px * var(--tfm-s, 0.6)) !important;
  background: #ffffff !important;
  border-radius: 50% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding-top: calc(22px * var(--tfm-s, 0.6)) !important;
  transition:
    top 0.5s cubic-bezier(0.65, 0, 0.35, 1),
    left 0.5s cubic-bezier(0.65, 0, 0.35, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
#tfm-root .tfm-d-pill.tfm-d-is-collapsed .tfm-d-oval {
  top: 0 !important;
  left: 0 !important;
}
#tfm-root .tfm-d-pill.tfm-d-is-collapsed:hover .tfm-d-oval {
  transform: scale(1.03) !important;
}

/* .tfm-d-pill img.tfm-d-lgo — id+class+요소+class 로 메뉴용 img 보다 항상 우선 */
#tfm-root .tfm-d-pill img.tfm-d-lgo {
  max-width: none !important;
  max-height: none !important;
  width: calc(150px * var(--tfm-s, 0.6)) !important;
  height: auto !important;
  display: block !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: contain !important;
}

#tfm-root .tfm-d-hint {
  margin-top: calc(10px * var(--tfm-s, 0.6)) !important;
  color: #143C6B !important;
  font-size: calc(14px * var(--tfm-s, 0.6)) !important;
  font-weight: 600 !important;
  letter-spacing: -0.03em !important;
  line-height: 1 !important;
  text-align: center !important;
}

/* ---------- 3. 메뉴 영역 ---------- */
#tfm-root .tfm-d-mnu {
  flex: 1 1 auto !important;
  padding: calc(13px * var(--tfm-s, 0.6)) calc(25px * var(--tfm-s, 0.6)) calc(17px * var(--tfm-s, 0.6)) !important;
  display: flex !important;
  flex-direction: column !important;
  transition: opacity 0.25s ease !important;
  opacity: 1 !important;
}
#tfm-root .tfm-d-pill.tfm-d-is-collapsed .tfm-d-mnu {
  opacity: 0 !important;
  pointer-events: none !important;
}

#tfm-root .tfm-d-lnk {
  display: flex !important;
  align-items: center !important;
  padding: calc(29px * var(--tfm-s, 0.6)) 0 !important;
  position: relative !important;
  cursor: pointer !important;
  text-decoration: none !important;
  color: #ffffff !important;
}
#tfm-root .tfm-d-lnk + .tfm-d-lnk::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: calc(4px * var(--tfm-s, 0.6)) !important;
  right: calc(4px * var(--tfm-s, 0.6)) !important;
  height: 1px !important;
  background: rgba(255,255,255,0.20) !important;
  display: block !important;
}

#tfm-root .tfm-d-icn {
  width: calc(78px * var(--tfm-s, 0.6)) !important;
  height: calc(78px * var(--tfm-s, 0.6)) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  transition:
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.25s ease !important;
}

#tfm-root .tfm-d-tcol {
  flex: 1 1 auto !important;
  margin-left: calc(16px * var(--tfm-s, 0.6)) !important;
  color: #ffffff !important;
  display: block !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
#tfm-root .tfm-d-ttl {
  display: block !important;
  font-size: calc(22px * var(--tfm-s, 0.6)) !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  line-height: 1.2 !important;
  color: #ffffff !important;
}
#tfm-root .tfm-d-dsc {
  display: block !important;
  margin-top: calc(6px * var(--tfm-s, 0.6)) !important;
  font-size: calc(14px * var(--tfm-s, 0.6)) !important;
  font-weight: 400 !important;
  color: rgba(255,255,255,0.85) !important;
  letter-spacing: -0.03em !important;
  line-height: 1.2 !important;
  transition: color 0.25s ease !important;
}

#tfm-root .tfm-d-arw {
  display: block !important;
  color: rgba(255,255,255,0.9) !important;
  font-size: calc(26px * var(--tfm-s, 0.6)) !important;
  font-weight: 400 !important;
  margin-left: calc(6px * var(--tfm-s, 0.6)) !important;
  line-height: 1 !important;
  flex: 0 0 auto !important;
  transition:
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.25s ease !important;
}

/* Hover */
#tfm-root .tfm-d-lnk:hover .tfm-d-icn {
  transform: scale(1.08) !important;
  filter: brightness(1.08) !important;
}
#tfm-root .tfm-d-lnk:hover .tfm-d-tcol {
  transform: translateX(calc(2px * var(--tfm-s, 0.6))) !important;
}
#tfm-root .tfm-d-lnk:hover .tfm-d-dsc {
  color: rgba(255,255,255,1) !important;
}
#tfm-root .tfm-d-lnk:hover .tfm-d-arw {
  transform: translateX(calc(4px * var(--tfm-s, 0.6))) !important;
  color: #ffffff !important;
}

/* ---------- 4. 닫기 영역 ---------- */
#tfm-root .tfm-d-xbox {
  background: #1B4577 !important;
  height: calc(148px * var(--tfm-s, 0.6)) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: calc(14px * var(--tfm-s, 0.6)) !important;
  padding-top: calc(14px * var(--tfm-s, 0.6)) !important;
  border-top: 1px solid rgba(255,255,255,0.18) !important;
  transition: opacity 0.25s ease !important;
  opacity: 1 !important;
  flex-shrink: 0 !important;
}
#tfm-root .tfm-d-pill.tfm-d-is-collapsed .tfm-d-xbox {
  opacity: 0 !important;
  pointer-events: none !important;
}

#tfm-root .tfm-d-xbtn {
  width: calc(58px * var(--tfm-s, 0.6)) !important;
  height: calc(58px * var(--tfm-s, 0.6)) !important;
  border: calc(1.6px * var(--tfm-s, 0.6)) solid #ffffff !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  cursor: pointer !important;
  background: transparent !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  padding: 0 !important;
  transition:
    background 0.25s ease,
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.25s ease !important;
}
#tfm-root .tfm-d-xbtn svg {
  width: calc(22px * var(--tfm-s, 0.6)) !important;
  height: calc(22px * var(--tfm-s, 0.6)) !important;
  stroke: #ffffff !important;
  fill: none !important;
  display: block !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
#tfm-root .tfm-d-xbtn:hover {
  background: rgba(255,255,255,0.18) !important;
  transform: scale(1.06) !important;
}
#tfm-root .tfm-d-xbtn:hover svg {
  transform: rotate(90deg) !important;
}

#tfm-root .tfm-d-xtxt {
  color: rgba(255,255,255,0.9) !important;
  font-size: calc(16px * var(--tfm-s, 0.6)) !important;
  font-weight: 400 !important;
  letter-spacing: -0.02em !important;
  line-height: 1 !important;
  text-align: center !important;
  transition: color 0.25s ease !important;
}
#tfm-root .tfm-d-xbox:hover .tfm-d-xtxt {
  color: #ffffff !important;
}

/* ---------- 5. 데스크톱(1024px 이상): 플로팅 pill 만, 하단 바 완전 제거 ---------- */
@media (min-width: 1024px) {
  #tfm-root .tfm-d-pill {
    display: flex !important;
    visibility: visible !important;
    position: fixed !important;
  }
  #tfm-root .tfm-m-nav {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: 0 !important;
    right: auto !important;
    bottom: auto !important;
    z-index: -1 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    box-shadow: none !important;
  }
  #tfm-root .tfm-m-nav * {
    pointer-events: none !important;
  }
}

/* ---------- 6. 모바일/태블릿(1023px 이하): 하단 고정 바만, pill 숨김 ---------- */
@media (max-width: 1023px) {
  #tfm-root .tfm-d-pill {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: 0 !important;
    right: auto !important;
    bottom: auto !important;
    z-index: -1 !important;
    pointer-events: none !important;
    box-shadow: none !important;
    opacity: 0 !important;
  }
  #tfm-root .tfm-d-pill * {
    pointer-events: none !important;
  }

  #tfm-root .tfm-m-nav {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    align-items: center !important;
    justify-items: center !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 2147483000 !important;
    /* 테마/부모 transform 영향에도 뷰포트 하단에 붙도록 (fixed 기준) */
    margin: 0 !important;
    max-width: none !important;
    min-width: 0 !important;
    width: auto !important;
    min-height: 0 !important;
    height: auto !important;
    -webkit-box-sizing: border-box !important;
    box-sizing: border-box !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
    background: #022347 !important;
    background-color: #022347 !important;
    background-image: none !important;
    border-top: none !important;
    border: 0 !important;
    border-top-left-radius: 22px !important;
    border-top-right-radius: 22px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    padding: 10px 6px !important;
    padding-top: 12px !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
    padding-bottom: calc(12px + max(env(safe-area-inset-bottom, 0px), 0px)) !important;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.4) !important;
    -webkit-box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.4) !important;
    pointer-events: auto !important;
    cursor: default !important;
    overflow: visible !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  #tfm-root .tfm-m-lnk {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    align-content: center !important;
    gap: 4px !important;
    -webkit-box-orient: vertical !important;
    -webkit-box-direction: normal !important;
    padding: 4px 2px !important;
    min-width: 0 !important;
    min-height: 48px !important;
    width: 100% !important;
    max-width: 100% !important;
    -webkit-box-sizing: border-box !important;
    box-sizing: border-box !important;
    text-align: center !important;
    text-decoration: none !important;
    color: #ffffff !important;
    background: transparent !important;
    background-color: transparent !important;
    -webkit-tap-highlight-color: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    cursor: pointer !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
  }

  #tfm-root .tfm-m-lnk:active {
    -webkit-transform: scale(0.98) !important;
    transform: scale(0.98) !important;
    opacity: 0.85 !important;
  }

  #tfm-root .tfm-m-icn {
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-align: center !important;
    -ms-flex-align: center !important;
    align-items: center !important;
    -webkit-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
    -webkit-box-flex: 0 !important;
    -ms-flex: 0 0 auto !important;
    flex: 0 0 auto !important;
    width: 26px !important;
    min-width: 0 !important;
    height: 26px !important;
    min-height: 0 !important;
    margin: 0 auto 2px !important;
    line-height: 0 !important;
    color: #ffffff !important;
  }

  #tfm-root .tfm-m-icn svg {
    color: #ffffff !important;
    fill: none !important;
    fill-opacity: 1 !important;
    stroke: #ffffff !important;
    stroke-width: 1.5 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    display: block !important;
    line-height: 0 !important;
  }

  #tfm-root .tfm-m-txt {
    display: block !important;
    -webkit-box-sizing: border-box !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 1px !important;
    line-height: 1.2 !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-align: center !important;
    text-decoration: none !important;
    letter-spacing: -0.02em !important;
    white-space: normal !important;
    word-break: keep-all !important;
    word-wrap: break-word !important;
    overflow: visible !important;
  }
}

/* 아주 작은 가로 화면 (mbar 가 보이는 뷰포트에서만 의미 있음) */
@media (max-width: 360px) {
  #tfm-root .tfm-m-nav .tfm-m-txt {
    font-size: 9px !important;
  }
  #tfm-root .tfm-m-nav .tfm-m-icn {
    width: 24px !important;
    height: 24px !important;
  }
}
