/* Custom styles for Urgent Care Finder */

/* Leaflet custom marker styles */
.custom-marker {
  background: transparent;
}

.clinic-marker {
  width: 40px;
  height: 40px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.clinic-marker svg {
  transform: rotate(45deg);
  width: 20px;
  height: 20px;
}

/* User location marker */
.user-marker-container {
  background: transparent;
}

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

.user-marker-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background-color: #3B82F6;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

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

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

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  padding: 0;
}

.leaflet-popup-content {
  margin: 12px;
}

.popup-content h3 {
  margin: 0 0 4px 0;
  color: #1F2937;
}

.popup-content p {
  margin: 0;
}

/* Card highlight animation */
.clinic-card {
  transition: all 0.2s ease;
}

.clinic-card.ring-2 {
  transform: scale(1.01);
}

/* Scrollbar styling for clinic list */
#clinic-list::-webkit-scrollbar {
  width: 6px;
}

#clinic-list::-webkit-scrollbar-track {
  background: #F3F4F6;
  border-radius: 3px;
}

#clinic-list::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 3px;
}

#clinic-list::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Modal backdrop */
#booking-modal {
  backdrop-filter: blur(4px);
  z-index: 9999;
}

/* Success checkmark animation */
.success-checkmark {
  animation: checkmark 0.5s ease-in-out;
}

@keyframes checkmark {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .leaflet-popup-content-wrapper {
    max-width: 260px;
  }

  .clinic-marker {
    width: 32px;
    height: 32px;
  }

  .clinic-marker svg {
    width: 16px;
    height: 16px;
  }
}

/* Fix for Leaflet z-index issues with Tailwind */
.leaflet-pane,
.leaflet-control {
  z-index: 400;
}

.leaflet-top,
.leaflet-bottom {
  z-index: 500;
}
