/* =============================================
追従CTA（float-cta.php）。common.css を読まないコラムでも同じ見た目になるよう、ボタンの指定まで含めて完結させる。
--clamp-* は、コラム（column.css）が全要素の font-size をこの変数で上書きするため。他ページでは無視される
============================================= */

.cta--float {
  --clamp-max: 16;
  --clamp-min: 16;
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 99997;
  width: 100%;
  padding: 24px 0 8px;
  text-align: center;
  translate: -50%;
  transform: translateY(0);
  transition: transform 0.5s ease;
  will-change: transform;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cta--float.hide {
  transform: translateY(200%);
}

/* キャンペーンコードのチップ。PCはボタンの左、SPはボタンの下（マークアップはボタン→チップの順） */
.cta--float__inner {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.cta--float .cta--float__link.cta--float__link {
  --clamp-max: 22;
  --clamp-min: 22;
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  width: fit-content;
  min-width: 370px;
  max-width: 580px;
  margin: 0;
  padding: 19px 58px;
  border: 0;
  border-radius: 9999px;
  background: #f56947 url(../../images/cta-bg.svg) no-repeat center center / cover;
  box-shadow: 0 6px 13px rgba(245, 105, 71, 0.3);
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.cta--float .cta--float__link.cta--float__link::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 26px;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: url(../../images/cta-arrow.svg) no-repeat center center / 26px;
  translate: 0 -50%;
}

@media (hover: hover) {
  .cta--float .cta--float__link.cta--float__link:hover {
    opacity: 1;
    filter: brightness(105%);
  }
}

.cta--float .cta__microcopy {
  --clamp-max: 14;
  --clamp-min: 14;
  position: absolute;
  top: -16px;
  left: 50%;
  width: fit-content;
  padding: 5px 10px;
  border: 2px solid #f56947;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 3px 5px rgba(123, 29, 7, 0.3);
  color: #f56947;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  translate: -50% 0;
}

.cta--float .cta__maincopy {
  --clamp-max: 22;
  --clamp-min: 22;
}

.cta--float .cta__note {
  margin-top: 4px;
  font-size: 14px;
}

@media (max-width: 767px) {
  .cta--float .cta--float__link.cta--float__link {
    --clamp-max: 18;
    --clamp-min: 18;
    width: 90%;
    min-width: unset;
    max-width: 460px;
    padding: 20px 0;
    font-size: 18px;
  }

  .cta--float .cta__maincopy {
    --clamp-max: 18;
    --clamp-min: 18;
  }

  .cta--float .cta__note {
    font-size: 10px;
  }

  .cta--float__inner {
    flex-direction: column;
    gap: 8px;
  }
}
