/**
 * Static Office Map - CSS
 * Stili per la mappa statica dell'ufficio con MapLibre GL
 * Ultimo aggiornamento: 31 ottobre 2025
 */

.static-office-map-container {
    position: relative !important;
    margin: 0 auto !important;
    border-radius: 12px;
    overflow: hidden;
}

.elementor-element-ddc37aa{
    padding: 50px 0 !important;
}

.maplibregl-popup-close-button {
    background: transparent !important;
    display: none !important;
}

.static-office-map {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    z-index: 1;
}

.maplibregl-marker:hover {
    filter: unset !important;
}

/* MapLibre controls - now enabled for zoom and reset */
.static-office-map .maplibregl-control-container {
    pointer-events: auto !important;
    z-index: 10 !important;
}

.static-office-map .maplibregl-ctrl {
    pointer-events: auto !important;
}

/* Ensure map fills container */
.static-office-map .maplibregl-canvas-container {
    border-radius: 12px;
}

/* Fix pointer events for map interactions */
.static-office-map .maplibregl-canvas {
    pointer-events: auto !important;
}

.static-office-map .maplibregl-canvas-container {
    pointer-events: auto !important;
}

.static-office-map .maplibregl-control-container {
    pointer-events: none;
}

.static-office-map .maplibregl-control-container * {
    pointer-events: auto;
}

/* Ensure map container allows interactions */
.static-office-map-container {
    pointer-events: auto;
}

/* Fix for overlay elements blocking interactions */
.static-office-map .maplibregl-marker {
    pointer-events: auto !important;
}

/* Marker styling with theme variables */
.static-office-map .maplibregl-marker {
    background: var(--e-global-color-primary, #007cba) !important;
    border: 2px solid var(--e-global-color-aa5884c) !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
}

/* Popup styles */
.static-office-map .maplibregl-popup-content {
    border-radius: 12px;
    border: none;
    padding: 0;
    width: 310px;
    transform: translateY(-10px) !important; /* Adjust vertical position */
}

.maplibregl-popup-content {
    max-width: 500px !important;
}

.multi-apartments-map .maplibregl-popup-content {
    transform: translate(-10%, 0%) !important;
}

.multi-apartments-map .maplibregl-popup-tip {
    background: white;
}

.multi-apartments-map .maplibregl-popup-close-button {
    color: #666;
    font-size: 18px;
    padding: 5px;
    right: 8px;
    top: 8px;
}

/* Responsive adjustments */

/* Reset Control */
.map-reset-control {
    background: rgba(220, 53, 69, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.2) !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
    overflow: hidden !important;
    z-index: 1000 !important;
    position: relative !important;
    pointer-events: auto !important;
}

.map-reset-control .maplibregl-ctrl-reset {
    min-width: 120px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    background: #dc3545 !important;
    border: none !important;
    padding: 0 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    width: auto !important;
}

.map-reset-control .maplibregl-ctrl-reset:hover {
    background: #c82333 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3) !important;
    border: none !important;
}

.map-reset-control .maplibregl-ctrl-reset:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.1) !important;
}