@charset "UTF-8";

/*
 * 下部追従CTA（SPのみ）— 全ページ共通
 * マークアップ: template/section-floating-cta.php
 * 表示制御:     js/floating-cta.js（FVのCTAが画面外になったら .is-show）
 */

:root {
  --floating-cta-height: 59px;
}

.floating {
  display: none;
}

@media (max-width: 767px) {
  body.has-floating-cta {
    padding-bottom: calc(var(--floating-cta-height) + env(safe-area-inset-bottom, 0px));
  }

  .floating {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .85);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transform: translateY(110%);
    transition: transform .35s cubic-bezier(.22, 1, .36, 1);
    pointer-events: none;
  }

  .floating.is-show {
    transform: translateY(0);
    pointer-events: auto;
  }

  .floating__btn {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 50%;
    min-width: 180px;
    height: 39px;
    padding: 0 24px 0 10px;
    border: 0;
    border-radius: 21px;
    color: #343434;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 13px;
    font-weight: 800;
    line-height: normal;
    letter-spacing: 0;
    text-align: center;
    text-decoration: none;
    box-shadow: 3px 3px 2.4px rgba(0, 0, 0, .48);
    transition: transform .2s, box-shadow .2s, opacity .2s;
  }

  .floating__btn::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 18px;
    width: 8px;
    height: 8px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
  }

  .floating__btn--orange {
    background: linear-gradient(154deg, #f2e995 7.7117%, #eca664 90.097%);
  }

  .floating__btn--blue {
    background: linear-gradient(7deg, #36a4ff 0%, #88d7ff 49.447%, #fff09c 98.894%);
  }

  @media (hover: hover) {
    .floating__btn:hover {
      transform: translate(2px, 2px);
      box-shadow: 2px 2px 2px rgba(0, 0, 0, .4);
    }
  }

  /* 追従CTAの分だけ、右下の「トップへ戻る」を持ち上げる */
  body.has-floating-cta #toTopBtn {
    bottom: calc(var(--floating-cta-height) + 12px + env(safe-area-inset-bottom, 0px));
  }
}

/* 〜400px：余白・影・矢印は 400 基準の vw でスケール（ボタンのサイズ自体は固定） */
@media (max-width: 400px) {
  .floating {
    gap: calc(8 / 400 * 100vw);
    padding: calc(10 / 400 * 100vw) calc(14 / 400 * 100vw) calc(10 / 400 * 100vw + env(safe-area-inset-bottom, 0px));
  }

  .floating__btn {
    box-shadow: calc(2 / 400 * 100vw) calc(2 / 400 * 100vw) calc(2 / 400 * 100vw) rgba(0, 0, 0, .4);
  }

  .floating__btn::after {
    right: calc(11 / 400 * 100vw);
    width: calc(6 / 400 * 100vw);
    height: calc(6 / 400 * 100vw);
  }
}
