/* WanMap Custom Styles */

/* ローディングアニメーション */
@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.fade-out {
  animation: fadeOut 0.5s ease-out forwards;
}

/* 地図コンテナ */
#map, #recordMap, #detailMap {
  width: 100%;
  height: calc(100vh - 128px); /* ナビバー(64px) + ボトムナビ(64px) */
  min-height: 400px; /* 最小高さを確保 */
}

#recordMap {
  flex: 1; /* flexコンテナ内で伸縮 */
  min-height: 300px;
}

/* カードホバー効果 */
.route-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.route-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* ボタンリップル効果 */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* GPS記録中のパルスアニメーション */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.recording-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* カスタムスクロールバー */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #10B981;
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #059669;
}

/* モバイル最適化 */
@media (max-width: 640px) {
  #map {
    height: calc(100vh - 132px);
  }
}

/* Leaflet マーカーのカスタマイズ */
.custom-marker {
  background: #10B981;
  border: 3px solid white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.start-marker {
  background: #3B82F6;
}

.end-marker {
  background: #EF4444;
}

/* PWAインストールバナー */
.install-prompt {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
