/* Leaflet Geoman Toolbar Customizations - Larger Drawing Tools */

/* Target the actual button elements */
.leaflet-pm-toolbar .leaflet-buttons-control-button {
  width: 60px !important;
  height: 60px !important;
  margin: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Target the icon containers */
.leaflet-pm-toolbar .control-icon {
  font-size: 24px !important;
  width: 60px !important;
  height: 60px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Mobile responsive - even larger for touch */
@media (max-width: 768px) {
  .leaflet-pm-toolbar .leaflet-buttons-control-button {
    width: 48px !important;
    height: 48px !important;
    margin: 3px !important;
  }

  .leaflet-pm-toolbar .control-icon {
    font-size: 24px !important;
    line-height: 48px !important;
    width: 48px !important;
    height: 48px !important;
  }
}

/* Custom Quadrat Marker Icon */
.quadrat-marker-icon {
  background: transparent !important;
  border: none !important;
}

.quadrat-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #fbbf24; /* Yellow */
  border: 3px solid #ffffff; /* White border */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: move;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quadrat-circle:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Custom Transect Circle Markers */
.transect-marker-icon {
  background: transparent !important;
  border: none !important;
}

.transect-start-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #22c55e; /* Green for start */
  border: 3px solid #ffffff; /* White border */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: move;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.transect-start-circle:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.transect-end-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #ef4444; /* Red for end */
  border: 3px solid #ffffff; /* White border */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: move;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.transect-end-circle:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Saving Indicator */
.saving-indicator {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.3s ease;
}

.saving-indicator.saving {
  background-color: #3b82f6; /* Blue */
  color: white;
  animation: pulse 1.5s ease-in-out infinite;
}

.saving-indicator.saved {
  background-color: #10b981; /* Green */
  color: white;
}

.saving-indicator.error {
  background-color: #ef4444; /* Red */
  color: white;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* User Location Marker for Mobile Map */
.user-location-icon {
  background: transparent !important;
  border: none !important;
}

.user-location-marker {
  position: relative;
  width: 24px;
  height: 24px;
}

.user-location-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background-color: #3b82f6;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.user-location-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background-color: rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  animation: location-pulse 2s ease-out infinite;
  z-index: 1;
}

@keyframes location-pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

/* Transect endpoint markers */
.transect-endpoint {
  background: transparent !important;
  border: none !important;
}

/* Mobile popup styling */
.mobile-popup .leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mobile-popup .leaflet-popup-content {
  margin: 12px 16px;
  font-size: 14px;
}
