/**
 * GayPHX Business Directory - Map Styles
 */

/* Map Container */
.gayphx-map {
    width: 100%;
    height: 500px;
    border-radius: var(--gayphx-radius);
    overflow: hidden;
    background: var(--gayphx-bg-light);
}

/* Leaflet Customizations */
.gayphx-map .leaflet-container {
    font-family: inherit;
    background: var(--gayphx-bg-light);
}

/* Popup Styling */
.gayphx-map .leaflet-popup-content-wrapper {
    border-radius: var(--gayphx-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0;
}

.gayphx-map .leaflet-popup-content {
    margin: 0;
    padding: 20px;
    min-width: 220px;
}

.gayphx-map .leaflet-popup-tip {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Custom Marker */
.gayphx-marker {
    position: relative;
}

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

.gayphx-marker-icon::after {
    content: '';
    width: 14px;
    height: 14px;
    background: var(--gayphx-white);
    border-radius: 50%;
}

/* Category-specific marker colors */
.gayphx-marker.health-wellness .gayphx-marker-icon {
    background: #4caf50;
}

.gayphx-marker.restaurants .gayphx-marker-icon {
    background: #ff9800;
}

.gayphx-marker.legal .gayphx-marker-icon {
    background: #3f51b5;
}

.gayphx-marker.finance .gayphx-marker-icon {
    background: #009688;
}

.gayphx-marker.real-estate .gayphx-marker-icon {
    background: #795548;
}

.gayphx-marker.arts .gayphx-marker-icon {
    background: #9c27b0;
}

.gayphx-marker.technology .gayphx-marker-icon {
    background: #607d8b;
}

.gayphx-marker.shopping .gayphx-marker-icon {
    background: #e91e63;
}

/* Marker Cluster */
.marker-cluster {
    background-color: rgba(233, 30, 99, 0.5) !important;
}

.marker-cluster div {
    background-color: var(--gayphx-primary) !important;
    color: var(--gayphx-white) !important;
    font-weight: 600;
}

.marker-cluster-small {
    background-color: rgba(233, 30, 99, 0.6) !important;
}

.marker-cluster-medium {
    background-color: rgba(233, 30, 99, 0.7) !important;
}

.marker-cluster-large {
    background-color: rgba(233, 30, 99, 0.8) !important;
}

/* My Location Button */
.gayphx-locate-btn {
    background: var(--gayphx-white);
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: var(--gayphx-transition);
}

.gayphx-locate-btn:hover {
    background: var(--gayphx-bg-light);
    border-color: var(--gayphx-primary);
}

.gayphx-locate-btn.loading {
    animation: pulse 1s infinite;
}

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

/* Location Radius Circle */
.gayphx-location-circle {
    stroke: var(--gayphx-primary);
    stroke-width: 2;
    fill: var(--gayphx-primary);
    fill-opacity: 0.1;
}

/* Popup Business Card */
.gayphx-popup-business {
    text-align: center;
}

.gayphx-popup-business h4 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: var(--gayphx-text);
}

.gayphx-popup-category {
    display: inline-block;
    padding: 3px 10px;
    background: var(--gayphx-bg-light);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--gayphx-text-light);
    margin-bottom: 10px;
}

.gayphx-popup-address,
.gayphx-popup-phone {
    margin: 5px 0;
    font-size: 0.9rem;
    color: var(--gayphx-text-light);
}

.gayphx-popup-link {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 20px;
    background: var(--gayphx-primary);
    color: var(--gayphx-white);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--gayphx-transition);
}

.gayphx-popup-link:hover {
    background: var(--gayphx-primary-dark);
    color: var(--gayphx-white);
}

/* Map Loading State */
.gayphx-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--gayphx-bg-light);
    color: var(--gayphx-text-light);
    font-size: 1.1rem;
}

.gayphx-map-loading::after {
    content: '';
    width: 30px;
    height: 30px;
    margin-left: 15px;
    border: 3px solid var(--gayphx-border);
    border-top-color: var(--gayphx-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Map Error State */
.gayphx-map-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--gayphx-bg-light);
    padding: 40px;
    text-align: center;
}

.gayphx-map-error-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.gayphx-map-error p {
    color: var(--gayphx-text-light);
    margin: 0;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .gayphx-map {
        height: 400px;
    }
    
    .gayphx-map .leaflet-control-zoom {
        margin-top: 10px !important;
        margin-left: 10px !important;
    }
    
    .gayphx-map .leaflet-control-zoom a {
        width: 36px !important;
        height: 36px !important;
        line-height: 36px !important;
    }
    
    .gayphx-map .leaflet-popup-content {
        padding: 15px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .gayphx-map {
        height: 350px;
        border-radius: 0;
    }
    
    .gayphx-map-view {
        margin: 0 -15px;
    }
}
