@tailwind base;
@tailwind components;
@tailwind utilities;

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/

@layer utilities {
  .scrollbar-modern {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,.25) transparent;
  }

  .scrollbar-modern::-webkit-scrollbar {
    width: 10px;
  }

  .scrollbar-modern::-webkit-scrollbar-track {
    background: transparent;
  }

  .scrollbar-modern::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.20);
    border-radius: 9999px;
    border: 3px solid transparent;
    background-clip: content-box;
  }

  .scrollbar-modern::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,.30);
    background-clip: content-box;
  }
}

/* 背景のグラデーションがうごめく動き */
@keyframes fog-twinkle {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 光の粒がキラキラと舞う動き */
@keyframes twinkle-particles {
  0%, 100% { opacity: 0; transform: translateY(0px) translateX(0px) scale(0.5); }
  10%, 90% { opacity: 1; }
  50% { opacity: 0.7; transform: translateY(-20px) translateX(10px) scale(1.2); }
}

.animate-fog-twinkle {
  background: linear-gradient(120deg, #ffffff 0%, #fff0f5 25%, #f1f5f9 50%, #fff0f5 75%, #ffffff 100%);
  background-size: 200% 200%;
  animation: fog-twinkle 2.5s ease-in-out infinite;
  overflow: hidden;
}

/* キラキラを表現する疑似要素 */
.animate-fog-twinkle::before,
.animate-fog-twinkle::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, #fff 100%, transparent),
    radial-gradient(2px 2px at 50% 10%, #fff 100%, transparent),
    radial-gradient(1.5px 1.5px at 80% 40%, #fff 100%, transparent),
    radial-gradient(2px 2px at 30% 80%, #fff 100%, transparent),
    radial-gradient(1.5px 1.5px at 70% 60%, #fff 100%, transparent),
    radial-gradient(2px 2px at 90% 90%, #fff 100%, transparent);
  background-size: 100% 100%;
  animation: twinkle-particles 6s ease-in-out infinite;
  pointer-events: none;
}

/* アニメーションをずらしてランダムに */
.animate-fog-twinkle::after {
  animation-delay: 3s;
  background-image:
    radial-gradient(2px 2px at 10% 50%, #fff 100%, transparent),
    radial-gradient(1.5px 1.5px at 40% 90%, #fff 100%, transparent),
    radial-gradient(2px 2px at 60% 20%, #fff 100%, transparent),
    radial-gradient(1.5px 1.5px at 90% 70%, #fff 100%, transparent),
    radial-gradient(2px 2px at 20% 70%, #fff 100%, transparent);
}

/* カーテンが風ではためくような動き */
@keyframes curtain-flutter {
  0% {
    background-position: 200% 0;
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    background-position: -200% 0;
    opacity: 0.5;
  }
}

@keyframes wind-sweep {
  0% { transform: translateX(-150%) skewX(-20deg); }
  100% { transform: translateX(150%) skewX(-20deg); }
}

.animate-wind-sweep {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.03) 50%,
    transparent 100%
  );
  animation: wind-sweep 2.5s infinite ease-in-out;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

 /* パルス専用のマーカーデザイン */
.my-pulse-marker {
  width: 20px;
  height: 20px;
  background-color: transparent;
  border-radius: 50%;
  position: relative;
}

/* パルスのアニメーション定義 */
.my-pulse-marker::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: rgba(66, 133, 244, 0.6);
  z-index: -1;

  animation: my-custom-pulse 2s infinite;
}

/* パルスのアニメーションの動き */
@keyframes my-custom-pulse {
  0%   { transform: scale(1); opacity: 1; }
  70%  { transform: scale(3); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

/* GeolocateControl標準のパルスを消す */
.maplibregl-user-location-dot::before {
  display: none !important;
  animation: none !important;
}

/* スクロールバー設定 */
.overflow-y-auto::-webkit-scrollbar,
.overflow-x-auto::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.overflow-y-auto::-webkit-scrollbar-track,
.overflow-x-auto::-webkit-scrollbar-track {
  background: transparent !important;
}

.overflow-y-auto::-webkit-scrollbar-thumb,
.overflow-x-auto::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 9999px;
  border: 4px solid transparent;
  background-clip: content-box;
}

.overflow-y-auto.is-scrolling::-webkit-scrollbar-thumb,
.overflow-x-auto.is-scrolling::-webkit-scrollbar-thumb,
.overflow-y-auto::-webkit-scrollbar-thumb:hover,
.overflow-x-auto::-webkit-scrollbar-thumb:hover {
  background-color: rgba(75, 85, 99, 0.5);
}

.overflow-y-auto::-webkit-scrollbar-thumb:active,
.overflow-x-auto::-webkit-scrollbar-thumb:active {
  background-color: rgba(55, 65, 81, 0.8) !important;
}

.maplibregl-ctrl-attrib {
  font-size: clamp(8px, 2.5vw, 12px) !important;
}

.maplibregl-ctrl-bottom-right {
  bottom: 0px !important;
  z-index: 30;
}


