/**
 * Maps by G - Frontend Styles
 * Version: 1.0.0
 */

/* Map Container */
.mbyg-map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 1em 0;
    position: relative;
    z-index: 1;
}

/* Ensure Leaflet controls are styled properly */
.mbyg-map-container .leaflet-control-zoom {
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.mbyg-map-container .leaflet-control-zoom a {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 18px;
    color: #333;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.mbyg-map-container .leaflet-control-zoom a:hover {
    background: #f4f4f4;
}

.mbyg-map-container .leaflet-control-zoom a:first-child {
    border-radius: 4px 4px 0 0;
}

.mbyg-map-container .leaflet-control-zoom a:last-child {
    border-radius: 0 0 4px 4px;
    border-bottom: none;
}

/* Popup styling */
.mbyg-map-container .leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mbyg-map-container .leaflet-popup-content {
    margin: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
}

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

/* Attribution styling */
.mbyg-map-container .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px 0 0 0;
}

/* Error message styling */
.mbyg-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c00;
    padding: 12px 16px;
    margin: 1em 0;
    font-size: 14px;
}

/* Loading state - shown before map initializes */
.mbyg-map-container.mbyg-loading {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mbyg-map-container.mbyg-loading::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 115, 170, 0.2);
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: mbyg-spin 0.8s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 600px) {
    .mbyg-map-container {
        border-radius: 4px;
    }
    
    .mbyg-map-container .leaflet-control-zoom a {
        width: 44px;
        height: 44px;
        line-height: 44px;
        font-size: 20px;
    }
}
