/* ========================================
   클린디어 공용 플로팅 CTA
======================================== */

.floating-cta,
.floating-cta * {
  box-sizing: border-box;
}

.floating-cta {
  position: fixed;
  top: 50%;
  right: 24px;
  z-index: 9999;

  width: 116px;

  display: flex;
  flex-direction: column;
  overflow: hidden;

  background: #ffffff;
  border: 1px solid rgba(0, 102, 245, 0.14);
  border-radius: 24px;

  box-shadow:
    0 12px 30px rgba(0, 52, 128, 0.15),
    0 3px 10px rgba(0, 52, 128, 0.08);

  transform: translateY(-50%);
}

/* 버튼 공통 */
.floating-cta__item {
  min-height: 126px;
  padding: 18px 10px 16px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;

  color: #161616;
  text-align: center;
  text-decoration: none;

  background: #ffffff;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

/* 버튼 사이 구분선 */
.floating-cta__item + .floating-cta__item {
  border-top: 1px solid #d8e3f5;
}

/* 아이콘 */
.floating-cta__icon {
  display: block;

  width: 40px;
  height: 40px;

  object-fit: contain;

  transition: transform 0.2s ease;
}

/* 버튼 문구 */
.floating-cta__text {
  display: block;

  color: #222222;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.4px;

  transition: transform 0.2s ease;
}

/* 두 번째 줄 */
.floating-cta__text strong {
  display: block;
  font: inherit;
}

/* 마우스 호버 */
.floating-cta__item:hover {
  color: #0057d8;
  background: #eaf3ff;
}

/* 마우스 호버 시 아이콘과 글씨 확대 */
.floating-cta__item:hover .floating-cta__icon,
.floating-cta__item:hover .floating-cta__text {
  transform: scale(1.15);
}

/* 키보드 접근성 */
.floating-cta__item:focus-visible {
  position: relative;
  z-index: 1;

  outline: 3px solid rgba(0, 102, 245, 0.35);
  outline-offset: -3px;
}

/* 클릭 효과 */
.floating-cta__item:active {
  transform: scale(0.97);
}

/* ========================================
   태블릿
======================================== */

@media (max-width: 1200px) {
  .floating-cta {
    right: 14px;
    width: 104px;
  }

  .floating-cta__item {
    min-height: 112px;
    padding: 15px 8px;
  }

  .floating-cta__icon {
    width: 36px;
    height: 36px;
  }

  .floating-cta__text {
    font-size: 14px;
  }
}

/* ========================================
   모바일
======================================== */

@media (max-width: 768px) {
  /* 하단 버튼에 본문이 가려지지 않도록 공간 확보 */
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .floating-cta {
    top: auto;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;

    width: auto;
    height: 64px;

    flex-direction: row;

    border-radius: 18px;

    transform: none;

    box-shadow:
      0 8px 25px rgba(0, 52, 128, 0.18),
      0 2px 8px rgba(0, 52, 128, 0.1);
  }

  .floating-cta__item {
    min-width: 0;
    min-height: 64px;
    padding: 8px 5px;

    flex: 1;
    flex-direction: row;
    gap: 6px;
  }

  .floating-cta__item + .floating-cta__item {
    border-top: 0;
    border-left: 1px solid #d8e3f5;
  }

  .floating-cta__icon {
    width: 27px;
    height: 27px;

    flex: 0 0 auto;
  }

  .floating-cta__text {
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
  }
}

/* ========================================
   아주 작은 휴대폰
======================================== */

@media (max-width: 380px) {
  .floating-cta {
    right: 8px;
    left: 8px;
  }

  .floating-cta__item {
    gap: 4px;
    padding-right: 3px;
    padding-left: 3px;
  }

  .floating-cta__icon {
    width: 24px;
    height: 24px;
  }

  .floating-cta__text {
    font-size: 11px;
    letter-spacing: -0.6px;
  }
}

/* 움직임 최소화 설정 사용자 */
@media (prefers-reduced-motion: reduce) {
  .floating-cta__item,
  .floating-cta__icon,
  .floating-cta__text {
    transition: none;
  }
}

/* ========================================
   풋터가 보일 때 플로팅 CTA 숨김
======================================== */

.floating-cta {
    transition:
      opacity 0.3s ease,
      visibility 0.3s ease;
  }
  
  .floating-cta.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }