/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Ensure Mapbox controls are positioned correctly (map starts below header) */
.mapboxgl-ctrl-top-right {
  top: 120px !important;
  right: 10px !important;
  z-index: 25 !important;
}

.mapboxgl-ctrl-bottom-right {
  bottom: 100px !important;
  right: 10px !important;
  z-index: 25 !important;
}

/* Mapbox popup dark mode support */
.mapboxgl-popup-content {
  border-radius: 8px;
  padding: 0;
  min-width: 280px;
}

.mapboxgl-popup-close-button {
  font-size: 18px;
  font-weight: normal;
  right: 8px;
  top: 8px;
  transition: color 0.2s ease;
}

/* Hide scrollbars but keep functionality */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Filter button active state */
.filter-btn.active {
  box-shadow: 0 0 0 2px rgb(59 130 246 / 0.5);
  transform: translateY(-1px);
}

/* Bounce animation for map markers */
@keyframes bounce {
  0%,
  20%,
  53%,
  80%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  40%,
  43% {
    transform: translate3d(0, -8px, 0);
  }
  70% {
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

/* Better focus states for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .mapboxgl-ctrl-group {
    margin-right: 8px;
    margin-top: 8px;
  }

  .mapboxgl-ctrl-top-right {
    top: 160px !important;
  }

  .mapboxgl-ctrl-bottom-right {
    bottom: 120px !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .mapboxgl-popup-content {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
