/* ================================
   LEAFLET MAP CUSTOM STYLING
   ================================ */

/* User Location Marker */
.user-location-marker {
    background: none;
    border: none;
}

.user-location-marker i {
    color: #667eea;
    font-size: 20px;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.8),
                 0 0 20px rgba(102, 126, 234, 0.6);
    animation: pulse-user 2s ease-in-out infinite;
}

@keyframes pulse-user {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Beacon Markers */
.beacon-marker {
    background: none;
    border: none;
    position: relative;
}

.beacon-pulse {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.3);
    top: 0;
    left: 0;
    animation: pulse-beacon 2s ease-out infinite;
}

@keyframes pulse-beacon {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.beacon-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    position: relative;
    z-index: 1;
}

.beacon-icon i {
    color: white;
    font-size: 16px;
    transform: rotate(45deg);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.beacon-marker.has-note .beacon-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.beacon-marker.has-note .beacon-pulse {
    background: rgba(102, 126, 234, 0.3);
}

/* Beacon Popup */
.beacon-popup-container {
    border-radius: 1rem;
    overflow: hidden;
}

.beacon-popup-container .leaflet-popup-content-wrapper {
    border-radius: 1rem;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.beacon-popup-container .leaflet-popup-tip {
    border-top-color: white;
}

.beacon-popup {
    padding: 1rem;
    min-width: 200px;
}

.beacon-popup-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.beacon-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.beacon-info {
    flex-grow: 1;
}

.beacon-info strong {
    display: block;
    color: var(--color-gray-800);
    font-size: 1rem;
}

.beacon-note {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: var(--color-gray-600);
    font-style: italic;
}

.beacon-tags {
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.beacon-tags .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.beacon-meta,
.beacon-accuracy {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-gray-200);
}

.beacon-meta small,
.beacon-accuracy small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Marker Clusters */
.marker-cluster {
    background-clip: padding-box;
    border-radius: 50%;
}

.marker-cluster div {
    width: 34px;
    height: 34px;
    margin-left: 3px;
    margin-top: 3px;
    text-align: center;
    border-radius: 50%;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-cluster-small {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
}

.marker-cluster-small div {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.marker-cluster-medium {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(5, 150, 105, 0.3) 100%);
}

.marker-cluster-medium div {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.marker-cluster-large {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.3) 0%, rgba(245, 87, 108, 0.3) 100%);
}

.marker-cluster-large div {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* Locate Control Button */
.locate-btn {
    width: 34px;
    height: 34px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 4px;
    color: var(--color-gray-700);
    transition: all 0.3s;
    text-decoration: none;
}

.locate-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: scale(1.1);
}

.locate-btn i {
    font-size: 18px;
}

/* Map Container Styling */
.leaflet-container {
    border-radius: var(--radius-2xl);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
}

/* Zoom Control */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    border: none !important;
    width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
    transition: all 0.3s !important;
}

.leaflet-control-zoom a:hover {
    background: var(--color-primary) !important;
    color: white !important;
}

/* Attribution */
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 4px 8px !important;
    font-size: 10px !important;
}

/* Scale Control */
.leaflet-control-scale {
    margin-bottom: 10px !important;
}

.leaflet-control-scale-line {
    border: 2px solid var(--color-gray-400) !important;
    border-top: none !important;
    background: white !important;
    padding: 2px 5px !important;
    border-radius: 4px;
    font-weight: 600 !important;
    color: var(--color-gray-700) !important;
}

/* Loading State */
.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.map-loading .spinner-modern {
    margin: 0 auto 1rem;
}
