/* Location Button Control Styles */

/* Hide the native GeolocateControl button */
.maplibregl-ctrl-geolocate {
  display: none !important;
}

/* Persistent user-location dot (see map/userLocation.js) */
.vv-user-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #2563EB;
  border: 2.5px solid white;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

/* Hide the native GeolocateControl dot — the persistent vv-user-dot already
   marks the user's position; keeping both would render two dots. */
.maplibregl-user-location-dot {
  display: none !important;
}

.vv-location-control {
  position: fixed !important;
  bottom: 60px; /* Space above the info button */
  right: 2px;
  margin: 0 !important;
  z-index: 1;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  transition: bottom 0.25s ease;
}

/* Remove all MapLibre control styles */
.vv-location-control.maplibregl-ctrl {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

.vv-location-control.maplibregl-ctrl-group {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Desktop */
@media (min-width: 768px) {
  .vv-location-control {
    bottom: 70px; /* More space on desktop */
    right: 2px;
  }
}

/* Mobile — below the info button (which is now at top: 80px) */
@media (max-width: 767px) {
  .vv-location-control {
    top: 134px; /* 80px info btn top + 44px height + 10px gap */
    right: 10px;
    bottom: auto !important;
  }

  /* Match info button size on mobile */
  .vv-location-button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  body.vv-od-open .vv-location-control,
  body.vv-search-active-mobile .vv-location-control {
    opacity: 0;
    pointer-events: none;
  }

  /* Hide on non-map tabs and in planner detalle state */
  body.vv-tab-overlay .vv-location-control,
  body.vv-pl-detalle-open .vv-location-control {
    display: none;
  }
}

.vv-location-button {
  min-width: 50px;
  min-height: 50px;
  width: clamp(50px, 6vw, 65px); /* Bigger responsive sizing */
  height: clamp(50px, 6vw, 65px);
  border: none !important;
  background: transparent !important;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
  outline: none !important;
  box-shadow: none !important;
}

/* Remove hover/active effects */
.vv-location-button:hover,
.vv-location-button:active,
.vv-location-button:focus {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
}


.vv-location-button svg {
  display: block;
  width: 70%;
  height: 70%;
  margin: auto;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

/* Desktop - bigger size */
@media (min-width: 768px) {
  .vv-location-button {
    min-width: 56px;
    min-height: 56px;
    width: clamp(54px, 5vw, 68px);
    height: clamp(54px, 5vw, 68px);
  }
}

/* Large desktop */
@media (min-width: 1200px) {
  .vv-location-button {
    min-width: 60px;
    min-height: 60px;
    width: clamp(58px, 4.5vw, 72px);
    height: clamp(58px, 4.5vw, 72px);
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .vv-location-button {
    min-width: 46px;
    min-height: 46px;
    width: clamp(44px, 8vw, 54px);
    height: clamp(44px, 8vw, 54px);
  }
}

/* Active state (when locating/located) */
.vv-location-button.active svg {
  transform: scale(1.05);
}


/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .vv-location-button {
    background: transparent;
  }
}


