/**
 * EMM Software Location Manager – Public CSS
 */

/* Map */
.alc-map {
    width: 100%;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

/* Leaflet popup */
.leaflet-popup-content {
    width: 300px !important;
    margin: 0;
}

.leaflet-popup-content-wrapper {
    padding: 12px;
    overflow: visible;
}

/* Popup content */
.emmslm-popup img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
    display: block;
    margin: 0 auto 8px;
}

.emmslm-popup h4 {
    margin: 0 0 6px;
    font-size: 16px;
}

.emmslm-details {
    font-size: 14px;
}

/* Button */
.emmslm-gallery-btn {
    margin-top: 10px;
    padding: 6px 12px;
    background: #0073aa;
    color: #fff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

/* Gallery overlay */
.emmslm-gallery-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emmslm-gallery-modal {
    background: #fff;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    padding: 15px;
    border-radius: 6px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.emmslm-gallery-modal img {
    width: 100%;
    border-radius: 4px;
}

/* Close */
.emmslm-gallery-close {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 26px;
    background: none;
    border: 0;
    cursor: pointer;
}

.emmslm-gallery-close::before {
    content: "✕";
}

/* Lock body scroll */
body.emmslm-gallery-open {
    overflow: hidden;
}
