/* ═══════════════════════════════════════════════
   Floating CTA Button – 無料相談ボタン
   camjyo.com 全ページ共通（contact/は非表示）
   v1.0.0 – 2026-07-02
   ═══════════════════════════════════════════════ */

/* ── Container ── */
.floating-cta {
  position: fixed;
  bottom: 28px;
  right: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

.floating-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Label (text tooltip above button) ── */
.floating-cta__label {
  background: rgba(26, 26, 26, 0.92);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  letter-spacing: 0.03em;
  transform: translateY(4px);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.floating-cta.is-visible .floating-cta__label {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.15s;
}

/* ── Main button ── */
.floating-cta__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary, #4a7c59), var(--color-primary-dark, #365c42));
  color: #fff;
  box-shadow: 0 4px 20px rgba(74, 124, 89, 0.35),
              0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.floating-cta__btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold, #BA9935), var(--color-gold-light, #d4b44e));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.floating-cta__btn:hover,
.floating-cta__btn:focus-visible {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(74, 124, 89, 0.45),
              0 3px 12px rgba(0, 0, 0, 0.15);
}

.floating-cta__btn:hover::before,
.floating-cta__btn:focus-visible::before {
  opacity: 1;
}

.floating-cta__btn:active {
  transform: scale(0.95);
}

.floating-cta__btn svg {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

/* ── Pulse ring animation ── */
.floating-cta__pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--color-primary, #4a7c59);
  opacity: 0;
  animation: floating-cta-pulse 2.5s ease-out infinite;
}

@keyframes floating-cta-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }
  70% {
    opacity: 0;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* ── Responsive adjustments ── */

/* Mobile: push up when sticky-cta-bottom is present on homepage */
@media (max-width: 768px) {
  .floating-cta {
    bottom: 80px; /* Above the sticky bottom CTA bar */
    right: 16px;
  }

  .floating-cta__btn {
    width: 54px;
    height: 54px;
  }

  .floating-cta__btn svg {
    width: 22px;
    height: 22px;
  }

  .floating-cta__label {
    font-size: 0.7rem;
    padding: 5px 12px;
  }
}

/* Very small screens */
@media (max-width: 375px) {
  .floating-cta {
    bottom: 76px;
    right: 12px;
  }
}

/* ── Print: hide ── */
@media print {
  .floating-cta {
    display: none !important;
  }
}
