/* ------------------------------------------------------------------
   FLOAT CTA — 전 페이지 공통 관심고객 등록 플로팅 버튼
   header.renew(bottom:0, z-index:999) 위로 띄우고,
   menu-layer(z-index:1000)가 열리면 자동으로 덮이도록 z-index:998.
   이 사이트는 script.js 의 handleHeaderMove() 가 푸터 근처에서
   header 를 위로 올리므로, float-cta.js 가 그 위치를 따라간다.
------------------------------------------------------------------ */

:root {
  --cta-bg: #5a5a5a;
  --cta-fg: #f5f1e7;
  --cta-line: #dbceb1;
  --cta-bg-hover: #dbceb1;
  --cta-fg-hover: #4a4a45;
  --cta-bottom: 60px; /* header.renew 높이(약 40px) + 20px 여유 — JS 가 갱신 */
  --cta-right: 20px;
}

.float-cta {
  position: fixed;
  right: var(--cta-right);
  bottom: var(--cta-bottom);
  z-index: 998;

  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  box-sizing: border-box;

  background-color: var(--cta-bg);
  border: 1px solid var(--cta-line);
  border-radius: 0;
  color: var(--cta-fg) !important;

  /* 라벨이 한글뿐이라 Everett(라틴 전용)을 앞에 두면 폴백 결과가 페이지마다
     달라진다. 사이트 body 와 동일한 스택을 써서 어느 페이지에서든
     주변 텍스트와 같은 서체로 렌더되게 한다. */
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: none;

  transition: background-color 300ms, color 300ms, border-color 300ms;

  /* 인트로(1.5s) 이후 등장 */
  opacity: 0;
  animation: floatCtaIn 800ms ease-out 1600ms forwards;
}

@keyframes floatCtaIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.float-cta:hover,
.float-cta:focus-visible {
  background-color: var(--cta-bg-hover);
  border-color: var(--cta-bg-hover);
  color: var(--cta-fg-hover) !important;
  box-shadow: none;
}

.float-cta:focus-visible {
  outline: 1px solid var(--cta-bg);
  outline-offset: 2px;
}

/* 화살표 — 사이트의 1px hairline 어휘 유지 */
.float-cta__arrow {
  width: 14px;
  height: 8px;
  flex: 0 0 auto;
  display: block;
  overflow: visible;
}

.float-cta__arrow path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* 등록 페이지 본인에서는 숨김 */
body.page-template-contact .float-cta {
  display: none !important;
}

/* ------------------------------------------------------------------
   Mobile
------------------------------------------------------------------ */
@media all and (max-width: 768px) {
  :root {
    --cta-bottom: 50px; /* 모바일 header.renew 약 34px + 16px */
    --cta-right: 12px;
  }

  .float-cta {
    height: 44px; /* 터치 타깃 최소 44px 유지 */
    padding: 0 16px;
    gap: 8px;
    font-size: 14px;
  }

  .float-cta__arrow {
    width: 12px;
  }
}

/* ------------------------------------------------------------------
   Reduced motion
------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .float-cta {
    animation: none;
    opacity: 1;
    transition: none;
  }
}
