/**
 * Global Styles
 */

:root {
  /* 共通アニメーション（トランジション）設定 */
  --transition-duration: 0.2s;
  --transition-easing: ease-in-out;
  --transition-base: var(--transition-duration) var(--transition-easing);
}

/* ==========================================
 * 1. フロントエンド用：Sticky Footer (フッター最下部固定)
 * ========================================== */
.wp-site-blocks {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wp-site-blocks > main {
  flex-grow: 1;
}

/* ==========================================
 * 2. ブロックエディター（Gutenberg iframe）用
 * ========================================== */
/* エディター上の親コンテナを Flexbox 化 */
.editor-styles-wrapper .wp-site-blocks {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
}
/* 
 * エディター内では main は .wp-block-group などのブロックラッパーに包まれているため、
 * 直下にある main のグループブロック自体を引き伸ばします。
 * (ヘッダーとフッターは .wp-block-template-part のため、.wp-block-group を指定することで main のみを狙い撃ちできます)
 */

/* ==========================================
 * 3. スムーススクロール（ページ内リンク・ページトップへ戻る）
 * ========================================== */
html {
  scroll-behavior: smooth;
}

/* ユーザーがOS側で視覚効果の低減を設定している場合は即時スクロール */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ==========================================
 * 4. ルート直下のブロック間ギャップリセット
 *    (header / main / footer 間の不要な余白を打ち消す)
 * ========================================== */
.wp-site-blocks > * + *,
.editor-styles-wrapper .is-root-container > * + * {
  margin-block-start: 0;
}
