/* ============================================================
   style.css — Tailwind CSS 補完スタイルシート
   ============================================================ */

/* ---- スクロールバーのカスタマイズ ---- */
#listScroll::-webkit-scrollbar,
#modalContent::-webkit-scrollbar {
  width: 6px;
}
#listScroll::-webkit-scrollbar-track,
#modalContent::-webkit-scrollbar-track {
  background: transparent;
}
#listScroll::-webkit-scrollbar-thumb,
#modalContent::-webkit-scrollbar-thumb {
  background: #ece2d6; /* earthBorder */
  border-radius: 3px;
}
#listScroll::-webkit-scrollbar-thumb:hover,
#modalContent::-webkit-scrollbar-thumb:hover {
  background: #8c7a6b; /* earthTextMuted */
}

/* ---- Leaflet マーカークラスタのカラーカスタマイズ ---- */
.marker-cluster-small {
  background-color: rgba(255, 118, 117, 0.15) !important;
}
.marker-cluster-small div {
  background-color: rgba(255, 118, 117, 0.6) !important;
  color: #fff !important;
  font-weight: 700 !important;
}
.marker-cluster-medium {
  background-color: rgba(0, 206, 201, 0.15) !important;
}
.marker-cluster-medium div {
  background-color: rgba(0, 206, 201, 0.6) !important;
  color: #fff !important;
  font-weight: 700 !important;
}
.marker-cluster-large {
  background-color: rgba(140, 122, 107, 0.15) !important;
}
.marker-cluster-large div {
  background-color: rgba(140, 122, 107, 0.6) !important;
  color: #fff !important;
  font-weight: 700 !important;
}

/* ---- エリアスキャン（リップル）アニメーション ---- */
.ripple-scan {
  position: absolute;
  pointer-events: none;
  z-index: 100;
}
.ripple-scan__ring {
  position: absolute;
  border: 2px solid #ff7675; /* earthPrimary */
  border-radius: 50%;
  width: 40px;
  height: 40px;
  top: 50%;
  left: 50%;
  margin-top: -20px;
  margin-left: -20px;
  opacity: 0;
}
.ripple-scan__ring.is-active {
  animation: rippleExpand 1.5s ease-out forwards;
}
.ripple-scan__ring:nth-child(2).is-active {
  animation-delay: 0.75s;
}
@keyframes rippleExpand {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* ---- 地図カスタムピン用のCSSバウンスアニメーション ---- */
.leaflet-custom-marker {
  transition: transform 0.2s ease-out;
}
.leaflet-custom-marker:hover {
  z-index: 1000 !important;
}
.leaflet-custom-marker:hover .fallback-pin,
.leaflet-custom-marker:hover img {
  transform: scale(1.15) translateY(-3px);
  filter: drop-shadow(0 4px 8px rgba(45, 52, 54, 0.3));
}
.leaflet-custom-marker img,
.leaflet-custom-marker .fallback-pin {
  transition: transform 0.2s ease;
}

/* ---- 遷移アニメーション制御クラス ---- */
#siteHeader.is-scrolled {
  box-shadow: 0 4px 20px rgba(45, 52, 54, 0.05);
  background-color: rgba(254, 249, 244, 0.95);
  backdrop-filter: blur(8px);
}

/* モバイルメニュー開閉状態 */
#mobileMenu.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* モーダル表示状態 */
#modalBackdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}
#modalPanel.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* 凡例表示状態 */
#legendContent.is-open {
  display: block;
}

/* チェックボックス用カスタムスタイル */
#filterRestaurant:checked ~ #boxRestaurant {
  background-color: #ff7675; /* earthPrimary */
  border-color: #ff7675;
}
#filterRestaurant:checked ~ #boxRestaurant::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 10px;
  color: #fff;
}
#filterDonation:checked ~ #boxDonation {
  background-color: #00cec9; /* earthSecondary */
  border-color: #00cec9;
}
#filterDonation:checked ~ #boxDonation::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 10px;
  color: #fff;
}

#filterRestaurant:focus-visible ~ #boxRestaurant,
#filterDonation:focus-visible ~ #boxDonation {
  outline: 2px solid #ff7675;
  outline-offset: 2px;
}
