/**
 * FCM 共通インタラクション
 *
 * 風CAMP 昼テーマを基準に、テーマ・SWELL・プラグインより後から
 * ボタン／カード／方向リンクの動きだけを統一する。
 */

/* 保存済みブロックの「白」指定も風CAMPの紙面色へ寄せる */
.has-white-background-color {
  background-color: var(--fcm-color-surface) !important;
}

/* ボタンテキストは全バリエーションで Shippori Mincho */
:is(
  button,
  input[type="button"],
  input[type="submit"],
  input[type="reset"],
  .wp-block-button__link,
  .c-btn,
  .fcm-headerAction,
  .fcm-memberForm__button,
  .fcm-mypage__cta,
  .fcm-mypagePayment__button,
  .fcm-cancelRequest__button
) {
  font-family: var(--fcm-font-serif, var(--fcm-font-en)) !important;
}

/* Primary — 風CAMP .btn-primary */
:is(
  .wp-block-button.is-style-fcm-accent .wp-block-button__link,
  .c-hero__actions .wp-block-button__link,
  .c-btn.-primary,
  .c-stickyCta .wp-block-button__link,
  .fcm-header__inner .fcm-gnavWrap__actions .c-headerActions a,
  .fcm-header__inner .fcm-gnavWrap__actions .fcm-headerAction,
  .fcm-header__inner .fcm-gnavWrap__actions .c-btn,
  .fcm-gnavWrap .fcm-gnavWrap__actions .c-headerActions a,
  .fcm-gnavWrap .fcm-gnavWrap__actions .fcm-headerAction,
  .fcm-gnavWrap .fcm-gnavWrap__actions .c-btn,
  .post_content .wpcf7-submit,
  .entry-content .wpcf7-submit,
  .fcm-memberForm__button:not(.fcm-memberForm__button--secondary),
  .fcm-memberForm--login input[type="submit"],
  body.fcm-login-page #loginform input[type="submit"],
  body.fcm-login-page #fcm-loginform input[type="submit"],
  .fcm-mypage__cta,
  .fcm-mypagePayment__button,
  .fcm-eventApplyCta .fcm-eventApplyCta__btn,
  .fcm-eventApplyCta .c-btn.-accent,
  .fcm-eventApplyCta .wp-block-button__link
) {
  color: #fff !important;
  background: var(--fcm-color-primary) !important;
  border: 0 !important;
  border-radius: var(--fcm-radius-sm) !important;
  box-shadow: 0 8px 24px rgba(46, 148, 120, 0.28) !important;
  text-decoration: none !important;
  position: relative;
  transform: translate3d(0, 0, 0);
  will-change: transform, box-shadow;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease !important;
}

:is(
  .wp-block-button.is-style-fcm-accent .wp-block-button__link,
  .c-hero__actions .wp-block-button__link,
  .c-btn.-primary,
  .c-stickyCta .wp-block-button__link,
  .fcm-header__inner .fcm-gnavWrap__actions .c-headerActions a,
  .fcm-header__inner .fcm-gnavWrap__actions .fcm-headerAction,
  .fcm-header__inner .fcm-gnavWrap__actions .c-btn,
  .fcm-gnavWrap .fcm-gnavWrap__actions .c-headerActions a,
  .fcm-gnavWrap .fcm-gnavWrap__actions .fcm-headerAction,
  .fcm-gnavWrap .fcm-gnavWrap__actions .c-btn,
  .post_content .wpcf7-submit,
  .entry-content .wpcf7-submit,
  .fcm-memberForm__button:not(.fcm-memberForm__button--secondary),
  .fcm-memberForm--login input[type="submit"],
  body.fcm-login-page #loginform input[type="submit"],
  body.fcm-login-page #fcm-loginform input[type="submit"],
  .fcm-mypage__cta,
  .fcm-mypagePayment__button,
  .fcm-eventApplyCta .fcm-eventApplyCta__btn,
  .fcm-eventApplyCta .c-btn.-accent,
  .fcm-eventApplyCta .wp-block-button__link
):hover:not(:disabled) {
  color: #fff !important;
  background: var(--fcm-color-primary-dark) !important;
  transform: translate3d(0, -2px, 0) !important;
  box-shadow: 0 12px 30px rgba(46, 148, 120, 0.36) !important;
  opacity: 1 !important;
}

/* Secondary — 風CAMP .btn-secondary */
:is(
  .wp-block-button.is-style-fcm-outline .wp-block-button__link,
  .c-btn:not(.-primary):not(.-accent),
  .fcm-memberForm__button--secondary,
  .fcm-cancelRequest__button,
  .fcm-logoutPanel__cancel,
  .fcm-mypageProfile__cancel
) {
  color: var(--fcm-color-text) !important;
  background: transparent !important;
  border: 1.5px solid rgba(43, 36, 27, 0.2) !important;
  border-radius: var(--fcm-radius-sm) !important;
  box-shadow: none !important;
  text-decoration: none !important;
  position: relative;
  transform: translate3d(0, 0, 0);
  will-change: transform, border-color;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease !important;
}

:is(
  .wp-block-button.is-style-fcm-outline .wp-block-button__link,
  .c-btn:not(.-primary):not(.-accent),
  .fcm-memberForm__button--secondary,
  .fcm-cancelRequest__button,
  .fcm-logoutPanel__cancel,
  .fcm-mypageProfile__cancel
):hover:not(:disabled) {
  color: var(--fcm-color-primary) !important;
  background: transparent !important;
  border-color: var(--fcm-color-primary) !important;
  transform: translate3d(0, -1px, 0) !important;
  opacity: 1 !important;
}

/* カード — 風CAMP .artist-card（浮上量は最大 3px、回転なし） */
:is(
  .c-eventCard,
  body.fcm-content-page .is-style-fcm-card,
  body.fcm-wide-page .is-style-fcm-card
) {
  transform: translate3d(0, 0, 0);
  will-change: transform, box-shadow;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

:is(
  .c-eventCard,
  body.fcm-content-page .is-style-fcm-card,
  body.fcm-wide-page .is-style-fcm-card
):hover {
  transform: translate3d(0, -3px, 0) !important;
  box-shadow: var(--fcm-shadow-md) !important;
}

/* 横長リンク — 風CAMP .venue-card-link */
.c-newsItem {
  transform: translate3d(0, 0, 0);
  will-change: transform, border-color;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.c-newsItem:hover {
  border-color: var(--fcm-color-primary);
  transform: translate3d(2px, 0, 0);
}

.c-newsItem a:hover {
  background: transparent;
}

/* テキストリンクは色変化のみ。矢印付きリンクだけ右へ送る */
:is(
  .post_content a:not(.wp-block-button__link),
  .entry-content a:not(.wp-block-button__link),
  .fcm-memberForm__links a,
  .fcm-policy-link
):hover {
  color: var(--fcm-color-primary) !important;
}

:is(
  .c-eventCard__more,
  .c-newsItem__arrow,
  .c-qaCatNav a
) {
  transition: color 0.18s ease, transform 0.18s ease;
}

:is(
  .c-eventCard__more,
  .c-qaCatNav a
):hover {
  color: var(--fcm-color-primary) !important;
  transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
  :is(
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .wp-block-button__link,
    .c-btn,
    .c-eventCard,
    .c-newsItem,
    .is-style-fcm-card
  ) {
    transform: none !important;
    transition: none !important;
  }
}
