/* AmCharts Map Widget Styles */
.amcharts-map-wrapper {
    width: 100%;
    position: relative;
}

.amcharts-map-container {
    width: 100%;
    min-height: 300px;
    position: relative;
    box-sizing: border-box;
    overflow: visible;
}

/* Ensure map has proper spacing from canvas edges */
.amcharts-map-container > div {
    width: 100% !important;
    height: 100% !important;
    padding: 5px;
    box-sizing: border-box;
}

.amcharts-map-container #chartdiv,
.amcharts-map-container [id^="chartdiv"] {
    width: 100% !important;
    height: 100% !important;
    padding: 5px;
    box-sizing: border-box;
    min-height: 400px;
    position: absolute;
    bottom: 0;    
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .elementor-widget-amcharts-map .elementor-widget-container {
        min-height: 400px !important;
    }
    
    .amcharts-map-container {
        padding: 5px !important;
        min-height: 400px;
    }
    
    .amcharts-map-container > div,
    .amcharts-map-container #chartdiv,
    .amcharts-map-container [id^="chartdiv"] {
        padding: 5px !important;
        min-height: 400px !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Ensure SVG scales properly on mobile */
    .amcharts-map-container svg {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }
}

/* Ensure proper rendering */
.amcharts-map-container svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Zoom controls styling - using divs instead of buttons */
.amcharts-zoom-controls {
    position: relative;
    z-index: 1000;
    pointer-events: none;
}

.amcharts-zoom-btn {
    width: 30px;
    height: 30px;
    background: #ffffff;
    border: 2px solid #333333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #333333;
    position: absolute;
    pointer-events: auto;
    border-radius: 4px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.amcharts-zoom-btn:hover {
    background: #f5f5f5;
    border-color: #000000;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.amcharts-zoom-btn:active {
    background: #e0e0e0;
    transform: scale(0.95);
}

.amcharts-zoom-btn:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.amcharts-zoom-in {
    right: 50px;
    top: 30%;
}

.amcharts-zoom-out {
    right: 50px;
    bottom: 30%;
}

.amcharts-zoom-btn svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.amcharts-zoom-btn svg path {
    stroke: #333333 !important;
    fill: none !important;
}

.amcharts-zoom-btn:hover svg path {
    stroke: #000000 !important;
}

/* Make zoom controls slightly larger on mobile for better touch interaction */
@media (max-width: 768px) {
    .amcharts-zoom-btn {
        width: 35px;
        height: 35px;
    }
    
    .amcharts-zoom-btn svg {
        width: 18px !important;
        height: 18px !important;
    }
}

