/* =========================================================
  13 FLOATING MENU｜右側追従メニュー
  ファイル名：/assets/css/shichigosan/13-floating-menu.css
  変更目印：七五三ページ 13-floating-menu 専用CSS
  お宮参りページの .yp-floating-menu と同じ縦長タブ型
========================================================= */

.yp-floating-menu,
.yp-floating-menu * {
  box-sizing: border-box;
}

.yp-floating-menu {
  position: fixed;
  top: 60%;
  right: 0;
  z-index: 9999;
  transform: translateY(-50%);
  color: #2f2a24;
  font-family:
    "Yu Mincho",
    "YuMincho",
    "Hiragino Mincho ProN",
    serif;
}

.yp-floating-menu a,
.yp-floating-menu button,
.yp-floating-menu span,
.yp-floating-menu p {
  background-image: none !important;
  box-shadow: none !important;
}

.yp-floating-menu a::before,
.yp-floating-menu a::after,
.yp-floating-menu button::before,
.yp-floating-menu button::after,
.yp-floating-menu span::before,
.yp-floating-menu span::after,
.yp-floating-menu p::before,
.yp-floating-menu p::after {
  content: none !important;
  display: none !important;
}

/* =========================================================
  TOGGLE｜右端の縦長タブ
========================================================= */

.yp-floating-menu__toggle {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-height: 122px;
  padding: 12px 8px;
  margin: 0;
  border: 1px solid rgba(38, 52, 61, 0.12);
  border-right: 0;
  border-radius: 18px 0 0 18px;
  background:
    linear-gradient(
      135deg,
      rgba(251, 250, 248, 0.96) 0%,
      rgba(246, 243, 237, 0.96) 100%
    ) !important;
  color: #26343d;
  cursor: pointer;
  transform: translateY(-50%);
  appearance: none;
  backdrop-filter: blur(6px);
  transition:
    transform 320ms ease,
    opacity 320ms ease,
    background-color 320ms ease;
}

.yp-floating-menu.is-open .yp-floating-menu__toggle {
  transform: translateY(-50%) translateX(46px);
  opacity: 0;
  pointer-events: none;
}

.yp-floating-menu__toggle-en {
  display: block;
  writing-mode: vertical-rl;
  color: #8a7458;
  font-family:
    "Times New Roman",
    "Yu Mincho",
    "YuMincho",
    serif;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.18em;
}

.yp-floating-menu__toggle-ja {
  display: block;
  margin-top: 10px;
  writing-mode: vertical-rl;
  color: #26343d;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.12em;
}

/* =========================================================
  PANEL｜開いた時のメニュー本体
========================================================= */

.yp-floating-menu__panel {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 4;
  width: 250px;
  max-height: min(680px, calc(100vh - 80px));
  overflow-y: auto;
  padding: 20px 18px 18px;
  border: 1px solid rgba(38, 52, 61, 0.12);
  border-right: 0;
  border-radius: 22px 0 0 22px;
  background:
    linear-gradient(
      135deg,
      rgba(251, 250, 248, 0.98) 0%,
      rgba(246, 243, 237, 0.98) 100%
    );
  backdrop-filter: blur(8px);
  transform: translateY(-50%) translateX(102%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 320ms ease;
}

.yp-floating-menu.is-open .yp-floating-menu__panel {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* =========================================================
  HEAD
========================================================= */

.yp-floating-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(38, 52, 61, 0.12);
}

.yp-floating-menu__label {
  margin: 0;
  color: #8a7458;
  font-family:
    "Times New Roman",
    "Yu Mincho",
    "YuMincho",
    serif;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.18em;
}

.yp-floating-menu__close {
  position: relative;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(138, 116, 88, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32) !important;
  cursor: pointer;
  appearance: none;
}

.yp-floating-menu__close span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 12px;
  height: 1px;
  background: rgba(38, 52, 61, 0.76);
  transform-origin: center;
}

.yp-floating-menu__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.yp-floating-menu__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* =========================================================
  LINKS
========================================================= */

.yp-floating-menu__link {
  position: relative;
  display: block;
  padding: 12px 28px 12px 0;
  border-bottom: 1px solid rgba(38, 52, 61, 0.09);
  text-decoration: none !important;
  color: #26343d !important;
  transition:
    transform 260ms ease,
    opacity 260ms ease;
}

.yp-floating-menu__link:last-child {
  border-bottom: 0;
}

.yp-floating-menu__link::after {
  display: block !important;
  content: "";
  position: absolute;
  top: 50%;
  right: 3px;
  width: 7px;
  height: 7px;
  border-right: 1px solid rgba(138, 116, 88, 0.82);
  border-bottom: 1px solid rgba(138, 116, 88, 0.82);
  transform: translateY(-50%) rotate(-45deg);
  opacity: 0.8;
}

.yp-floating-menu__link-en {
  display: block;
  margin: 0 0 6px;
  color: #8a7458;
  font-family:
    "Times New Roman",
    "Yu Mincho",
    "YuMincho",
    serif;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.16em;
}

.yp-floating-menu__link-ja {
  display: block;
  color: #26343d;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.06em;
}

/* 変更目印：予約リンクのみ強調 */
.yp-floating-menu__link--reserve {
  margin-top: 10px;
  padding: 14px 34px 14px 16px;
  border: 1px solid rgba(38, 52, 61, 0.14);
  background: rgba(38, 52, 61, 0.92) !important;
  color: #ffffff !important;
}

.yp-floating-menu__link--reserve .yp-floating-menu__link-en,
.yp-floating-menu__link--reserve .yp-floating-menu__link-ja {
  color: #ffffff !important;
}

.yp-floating-menu__link--reserve::after {
  border-color: rgba(255, 255, 255, 0.88);
  right: 16px;
}

/* =========================================================
  HOVER
========================================================= */

@media (hover: hover) and (pointer: fine) {
  .yp-floating-menu__toggle:hover {
    background:
      linear-gradient(
        135deg,
        rgba(249, 247, 243, 1) 0%,
        rgba(244, 240, 233, 1) 100%
      ) !important;
  }

  .yp-floating-menu__link:hover {
    transform: translateX(-3px);
    opacity: 0.78;
  }

  .yp-floating-menu__link--reserve:hover {
    opacity: 1;
    background: rgba(138, 116, 88, 0.96) !important;
  }
}

/* =========================================================
  SP｜スマホ表示
  変更目印：お宮参りより少し上に配置
========================================================= */

@media screen and (max-width: 767px) {
  .yp-floating-menu {
    top: 52%;
    right: 0;
    bottom: auto;
    transform: translateY(-50%);
  }

  .yp-floating-menu__toggle {
    position: absolute;
    top: 50%;
    right: 0;
    width: 48px;
    min-height: 152px;
    padding: 14px 8px;
    border: 1px solid rgba(38, 52, 61, 0.18);
    border-right: 0;
    border-radius: 20px 0 0 20px;
    background:
      linear-gradient(
        135deg,
        rgba(38, 52, 61, 0.94) 0%,
        rgba(65, 77, 85, 0.94) 100%
      ) !important;
    color: #ffffff;
    transform: translateY(-50%);
    box-shadow: 0 10px 28px rgba(38, 52, 61, 0.18);
  }

  .yp-floating-menu.is-open .yp-floating-menu__toggle {
    transform: translateY(-50%) translateX(48px);
    opacity: 0;
    pointer-events: none;
  }

  .yp-floating-menu__toggle-en {
    writing-mode: vertical-rl;
    color: rgba(220, 220, 220, 0.82);
    font-size: 10px;
    letter-spacing: 0.18em;
  }

  .yp-floating-menu__toggle-ja {
    margin-top: 12px;
    writing-mode: vertical-rl;
    color: #e2e2e2;
    font-size: 14px;
    letter-spacing: 0.14em;
  }

  .yp-floating-menu__panel {
    top: 50%;
    right: 0;
    bottom: auto;
    width: min(305px, calc(100vw - 48px));
    max-height: min(620px, calc(100vh - 60px));
    overflow-y: auto;
    padding: 20px 18px 18px;
    border: 1px solid rgba(38, 52, 61, 0.14);
    border-right: 0;
    border-radius: 24px 0 0 24px;
    background:
      linear-gradient(
        135deg,
        rgba(251, 250, 248, 0.99) 0%,
        rgba(246, 243, 237, 0.99) 100%
      );
    box-shadow: 0 14px 34px rgba(38, 52, 61, 0.18);
    transform: translateY(-50%) translateX(102%);
  }

  .yp-floating-menu.is-open .yp-floating-menu__panel {
    transform: translateY(-50%) translateX(0);
  }

  .yp-floating-menu__head {
    margin-bottom: 12px;
    padding-bottom: 14px;
  }

  .yp-floating-menu__label {
    font-size: 11px;
  }

  .yp-floating-menu__close {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    background: rgba(255, 255, 255, 0.5) !important;
  }

  .yp-floating-menu__link {
    padding: 14px 32px 14px 2px;
  }

  .yp-floating-menu__link-en {
    margin-bottom: 6px;
    font-size: 10px;
  }

  .yp-floating-menu__link-ja {
    font-size: 14px;
    line-height: 1.55;
  }

  .yp-floating-menu__link::after {
    right: 6px;
  }

  .yp-floating-menu__link--reserve {
    margin-top: 12px;
    padding: 16px 36px 16px 16px;
    background: rgba(38, 52, 61, 0.94) !important;
  }

  .yp-floating-menu__link--reserve .yp-floating-menu__link-ja {
    font-size: 15px;
  }
}

/* =========================================================
  小さいスマホ
========================================================= */

@media screen and (max-width: 374px) {
  .yp-floating-menu {
    top: 52%;
  }

  .yp-floating-menu__toggle {
    width: 44px;
    min-height: 142px;
  }

  .yp-floating-menu.is-open .yp-floating-menu__toggle {
    transform: translateY(-50%) translateX(44px);
  }

  .yp-floating-menu__toggle-ja {
    font-size: 13px;
  }

  .yp-floating-menu__panel {
    width: min(292px, calc(100vw - 44px));
    padding: 18px 16px 16px;
  }

  .yp-floating-menu__link-ja {
    font-size: 13px;
  }
}

/* =========================================================
  REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .yp-floating-menu__toggle,
  .yp-floating-menu__panel,
  .yp-floating-menu__link {
    animation: none !important;
    transition: none !important;
  }
}