/* =============================================================
   components/menu-overlay.css
   全ページ共通オーバーレイメニュー
   ============================================================= */

/* ─── オーバーレイ本体 ─── */
.overlay-menu {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(calc(-50% + 100vw));
  width: 100%;
  max-width: var(--screen-max);
  height: 100%;
  height: 100dvh;
  background: var(--color-bg);
  z-index: var(--z-modal);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  padding: 0;  /* base.css の padding:60px 0 40px を上書き */
}

.overlay-menu.is-open {
  transform: translateX(-50%);
  pointer-events: auto;
}

/* ─── 内部縦レイアウト ─── */
.overlay-menu__inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* ─── 上部バー（×ボタンのみ、右寄せ） ─── */
.overlay-menu__topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: var(--header-h);   /* 60px — ヘッダーの三本線と同位置 */
  padding-right: 15px;
  flex-shrink: 0;
}

/* ─── 閉じるボタン（44×44px タップ領域） ─── */
.overlay-menu__close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 22px;
  color: var(--color-black);
  line-height: 1;
}

/* ─── メニューリスト（ボーダーなし） ─── */
.overlay-menu__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ─── メニューリンク（56px タップ領域・右矢印付き） ─── */
.overlay-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(var(--content-pad) + 20px);
  height: 53px;
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: var(--fw-medium);
  color: var(--color-text);
  text-decoration: none;
}

.overlay-menu__link::after {
  content: '›';
  font-size: 30px;
  color: var(--color-text-muted);
  line-height: 1;
}

.overlay-menu__link:active {
  background: var(--color-bg-warm);
}

/* ─── フッター（区切り線＋Xアイコン） ─── */
.overlay-menu__footer {
  margin-top: 30px;
  padding: 0 var(--content-pad) 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.overlay-menu__footer-line {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin-bottom: 20px;
}

.overlay-menu__x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.overlay-menu__x-link svg {
  width: 24px;
  height: 24px;
  fill: var(--color-black);
}
