/* サイト内AI検索の入力欄（key_word）の先頭にGeminiアイコンを表示 */
.c-search01 input[name="key_word"] {
  background-image: url(gemini.svg);
  background-repeat: no-repeat;
  background-position: left 16px center;
  background-size: 18px 18px;
  padding-left: 44px !important;
  border-radius: 3px; /* 角丸 */
}

/* ===== フローティング「サイト内AI検索」ボタン（FAB） ===== */
.vais-fab {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 9998;
}
.vais-fab__form {
  display: flex;
  align-items: center;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid #e2e6ea;
  box-shadow: 0 6px 24px rgba(20, 35, 50, .18);
  overflow: hidden;
  transition: width .6s cubic-bezier(.34, 1.4, .64, 1);
  will-change: width;
}
.vais-fab__form.is-open {
  width: min(440px, 92vw);
}
.vais-fab__btn {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.vais-fab__icon {
  width: 26px;
  height: 26px;
  display: block;
  transition: transform .6s cubic-bezier(.34, 1.4, .64, 1);
}
.vais-fab__form.is-open .vais-fab__icon {
  transform: rotate(360deg);
}
.vais-fab__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: none !important;
  outline: 0;
  background: transparent;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif !important; /* ゴシック */
  font-size: 16px;
  color: #1b2530;
  padding: 0 18px 0 0;
  opacity: 0;
  transition: opacity .25s ease .35s;
}
.vais-fab__form.is-open .vais-fab__input {
  opacity: 1;
}
.vais-fab__input::placeholder {
  color: #8b97a2;
}
@media (prefers-reduced-motion: reduce) {
  .vais-fab__form,
  .vais-fab__icon,
  .vais-fab__input { transition: none; }
}

/* PCヘッダー検索窓を狭め（プレイスホルダ＋アイコン程度） */
@media all and (min-width: 1180px) {
  .l-nav-search input[name="key_word"] { width: 240px !important; }
}


/* 常時：約10秒に1回、生きているように「ぷるるん」（アイコン回転なし・全デバイス） */
.vais-fab__form:not(.is-open) {
  animation: vais-idle 10s ease-in-out infinite;
}
@keyframes vais-idle {
  /* 最初の約1秒で軽く弾み、残り約9秒は静止 */
  0%  { transform: scale(1, 1); }
  2%  { transform: scale(1.1, 0.9); }
  4%  { transform: scale(0.93, 1.07); }
  6%  { transform: scale(1.04, 0.97); }
  8%  { transform: scale(0.99, 1.01); }
  10% { transform: scale(1, 1); }
  100%{ transform: scale(1, 1); }
}

/* ===== FAB ホバー：ぷるるん＋アイコン一回転バウンス（PC/ホバー可能時のみ） ===== */
@media (hover: hover) and (pointer: fine) {
  .vais-fab__form:not(.is-open):hover {
    animation: vais-jelly 0.6s ease both;
  }
  .vais-fab__form:not(.is-open):hover .vais-fab__icon {
    animation: vais-fab-turn 0.7s ease-out both;
  }
}
@keyframes vais-jelly {
  0%   { transform: scale(1, 1); }
  20%  { transform: scale(1.15, 0.85); }
  40%  { transform: scale(0.9, 1.1); }
  60%  { transform: scale(1.05, 0.96); }
  80%  { transform: scale(0.98, 1.02); }
  100% { transform: scale(1, 1); }
}
/* 一回転（少し行き過ぎて戻るバウンス） */
@keyframes vais-fab-turn {
  0%   { transform: rotate(0deg); }
  60%  { transform: rotate(384deg); }
  80%  { transform: rotate(348deg); }
  100% { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .vais-fab__form:not(.is-open),
  .vais-fab__form:not(.is-open):hover,
  .vais-fab__form:not(.is-open):hover .vais-fab__icon { animation: none; }
}
