/**
 * Frontend styles for Nature Reserves Map
 */

.nrm-map-container {
    margin: 2rem 0 3rem 0;
    clear: both;
    width: 100%;
    position: relative;
}

.nrm-map-container * {
    box-sizing: border-box;
}

.nrm-map-title {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    color: #166534;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.nrm-map-instance {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* MapLibre overrides with high specificity */
.maplibregl-popup {
    z-index: 999999 !important;
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup-anchor-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-right .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
    border-top-color: white !important;
    border-bottom-color: white !important;
    border-left-color: white !important;
    border-right-color: white !important;
}

.maplibregl-popup-close-button {
    font-size: 1.25rem !important;
    padding: 2px 6px !important;
    line-height: 1 !important;
    color: #6b7280 !important;
    right: 4px !important;
    top: 4px !important;
}

.maplibregl-popup-close-button:hover {
    color: #374151 !important;
    background-color: transparent !important;
}

.maplibregl-marker {
    cursor: pointer;
}

.maplibregl-popup-content {
    padding: 8px !important;
    border-radius: 8px !important;
    background-color: white !important;
    max-width: 280px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

/* Custom popup content styles */
.nrm-popup-wrapper {
    font-family: 'Roboto', sans-serif !important;
    padding: 0 !important;
    margin: 0 !important;
}

.nrm-popup-title {
    font-family: 'Roboto Slab', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #166534 !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

.nrm-popup-title a {
    color: #166534 !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.nrm-popup-title a:hover {
    text-decoration: underline !important;
}

.nrm-popup-title a:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.nrm-popup-description {
    font-family: 'Roboto', sans-serif !important;
    font-size: 12px !important;
    color: #4b5563 !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

.nrm-popup-warning {
    font-family: 'Roboto', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #dc2626 !important;
    margin: 6px 0 0 0 !important;
    padding: 4px 0 0 0 !important;
    border-top: 1px solid #e5e7eb !important;
    line-height: 1.2 !important;
}

/* Force container to not affect surrounding layout */
.nrm-map-container::after {
    content: "";
    display: table;
    clear: both;
}