/* ============================
   LEAFLET MAP STYLES
   ============================ */

/* Map View Container */
.map-view-container {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: calc(100vh - 56px - 74px - 56px - 20px);
    max-height: 600px;
    min-height: 300px;
    margin: 40px 16px 0 16px;
}

/* Map Container */
#practicesMap {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Custom Map Marker */
.custom-map-marker {
    background: transparent;
    border: none;
}

.marker-pin {
    width: 40px;
    height: 40px;
    border-radius: 50% 50% 50% 0;
    background: var(--primary-green);
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -20px 0 0 -20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.marker-pin:hover {
    background: var(--primary-green-dark);
    transform: rotate(-45deg) scale(1.1);
}

.marker-pin i {
    transform: rotate(45deg);
    color: white;
    font-size: 18px;
}

.marker-pin::after {
    content: '';
    width: 8px;
    height: 8px;
    margin: 16px 0 0 16px;
    background: var(--primary-green-dark);
    position: absolute;
    border-radius: 50%;
}

/* Custom Popup Styles */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    width: 280px !important;
}

.custom-popup .leaflet-popup-content-wrapper {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-popup .leaflet-popup-tip {
    background: white;
}

/* Map Popup Content */
.map-popup {
    padding: 16px;
}

.map-popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.map-popup-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.map-popup-icon i {
    color: white;
    font-size: 20px;
}

.map-popup-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.map-popup-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-popup-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.map-popup-row i {
    color: var(--text-light);
    width: 16px;
}

.map-popup-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.map-popup .practice-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.map-popup .telehealth-badge {
    background-color: #e3f2ff;
    color: #0a7aff;
}

.map-popup .bulk-billing-badge {
    background-color: #dcfce7;
    color: #16a34a;
}

.map-popup .disabled-badge {
    background-color: #f5f5f5;
    color: #999999;
}

.map-popup .btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-popup .btn-primary {
    background-color: var(--primary-green);
    color: white;
}

.map-popup .btn-primary:hover {
    background-color: var(--primary-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(45, 134, 89, 0.3);
}

/* Leaflet Control Styles Override */
.leaflet-control-zoom a {
    color: var(--text-primary) !important;
    border-radius: 4px;
}

.leaflet-control-zoom a:hover {
    background-color: var(--bg-light) !important;
}

.leaflet-control-attribution {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.8) !important;
    padding: 4px 8px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .leaflet-popup-content {
        width: 260px !important;
    }
    
    .map-popup {
        padding: 12px;
    }
    
    .map-popup-title {
        font-size: 16px;
    }
}

/* Map Loading State */
.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}

.map-loading i {
    font-size: 36px;
    color: var(--primary-green);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
