/**
 * Gorillah JetMaps Frontend Styles
 *
 * @package Gorillah_JetMaps
 * @since   1.0.0
 */

/* Map Container */
.gorillah-jetmaps-container {
    width: 100%;
    min-height: 200px;
    position: relative;
    z-index: 1;
    background-color: #f0f0f0;
}

/* Custom Marker Styles */
.gorillah-jetmaps-marker {
    background: transparent !important;
    border: none !important;
}

.gorillah-jetmaps-marker svg {
    display: block;
    transition: transform 0.2s ease;
}

.gorillah-jetmaps-marker:hover svg {
    transform: scale(1.1);
}

/* Library Icon Styles */
.gorillah-jetmaps-library-icon {
    background: transparent !important;
    border: none !important;
}

.gorillah-jetmaps-library-wrapper {
    transition: transform 0.2s ease;
}

.gorillah-jetmaps-library-icon:hover .gorillah-jetmaps-library-wrapper {
    transform: scale(1.1);
}

.gorillah-jetmaps-library-wrapper i {
    line-height: 1;
}

/* Popup Styles */
.leaflet-popup-content-wrapper {
    border-radius: 6px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
}

.leaflet-popup-content strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
}

.leaflet-popup-tip {
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-close-button {
    color: #999 !important;
    font-size: 20px !important;
    padding: 4px 8px !important;
}

.leaflet-popup-close-button:hover {
    color: #333 !important;
}

/* Cluster Styles */
.marker-cluster {
    background-clip: padding-box;
    border-radius: 6px;
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-cluster-small {
    background-color: rgba(181, 226, 140, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(110, 204, 57, 0.9);
}

.marker-cluster-medium {
    background-color: rgba(241, 211, 87, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(240, 194, 12, 0.9);
}

.marker-cluster-large {
    background-color: rgba(253, 156, 115, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(241, 128, 23, 0.9);
}

/* Zoom Controls */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    border-radius: 6px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 16px !important;
    color: #333 !important;
    background-color: #fff !important;
    border: none !important;
    transition: background-color 0.15s ease;
}

.leaflet-control-zoom a:hover {
    background-color: #f5f5f5 !important;
    color: #000 !important;
}

.leaflet-control-zoom-in {
    border-bottom: 1px solid #eee !important;
}

/* Attribution */
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.85) !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    border-radius: 6px 0 0 0;
}

.leaflet-control-attribution a {
    color: #0078a8;
}

/* Loading State */
.gorillah-jetmaps-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #e0e0e0;
    border-top-color: #3498db;
    border-radius: 6px;
    animation: gorillah-jetmaps-spin 0.8s linear infinite;
}

@keyframes gorillah-jetmaps-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Fix for Elementor Preview */
.elementor-editor-active .gorillah-jetmaps-container {
    pointer-events: auto;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .leaflet-popup-content {
        margin: 10px 12px;
        font-size: 13px;
    }

    .leaflet-control-zoom a {
        width: 28px !important;
        height: 28px !important;
        line-height: 28px !important;
        font-size: 14px !important;
    }
}

/* No Location Message */
.gorillah-jetmaps-no-location {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
}

.gorillah-jetmaps-no-location-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 24px 32px;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    max-width: 280px;
}

.gorillah-jetmaps-no-location-content svg {
    color: #999;
    margin-bottom: 12px;
}

.gorillah-jetmaps-no-location-content p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}