/* husmannsplasser-map — map.css */

/* ---- Container ---- */
#hm-map-container {
    width: 100%;
    min-height: 400px;
    position: relative;
}

/* Leaflet itself sets height via JS; we ensure the container fills its parent */
#hm-map-container .leaflet-container {
    width: 100%;
    height: 100%;
    background: #e8e4dc;
    font-family: inherit;
}

/* ---- House icon wrapper (Leaflet divIcon) ---- */
.hm-house-icon {
    background: none !important;
    border: none !important;
    transition: filter .15s, transform .15s;
}

.hm-house-icon:hover,
.hm-house-icon:focus {
    filter: brightness(1.15) drop-shadow(0 2px 4px rgba(0,0,0,.3));
    transform: translateY(-2px);
}

/* ---- Leaflet popup overrides ---- */
.hm-leaflet-popup .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.12);
    border: 1px solid #c8bfa8;
    overflow: hidden;
}

.hm-leaflet-popup .leaflet-popup-content {
    margin: 0;
    width: auto !important;
}

.hm-leaflet-popup .leaflet-popup-tip-container {
    margin-top: -1px;
}

.hm-leaflet-popup .leaflet-popup-close-button {
    top: 8px;
    right: 10px;
    font-size: 20px;
    color: #888;
    padding: 2px 5px;
    border-radius: 3px;
    transition: color .12s, background .12s;
    z-index: 1;
}

.hm-leaflet-popup .leaflet-popup-close-button:hover {
    color: #333;
    background: #f0ece4;
}

/* ---- Popup content ---- */
.hm-popup__inner {
    padding: 14px 16px 14px;
    min-width: 220px;
    max-width: 300px;
}

.hm-popup__header {
    padding-right: 20px;
    margin-bottom: 10px;
}

.hm-popup__title {
    margin: 0 0 3px;
    font-size: .98rem;
    font-weight: 700;
    color: #2a2a2a;
    line-height: 1.25;
}

.hm-popup__gnr {
    font-size: .74rem;
    color: #7a6a50;
    font-style: italic;
    letter-spacing: .02em;
}

.hm-popup__image-wrap {
    margin: 0 -16px;
    border-top: 1px solid #ece7df;
    border-bottom: 1px solid #ece7df;
}

.hm-popup__image {
    display: block;
    width: 100%;
    height: 155px;
    object-fit: cover;
    object-position: center top;
}

.hm-popup__caption {
    margin: 0;
    padding: 5px 12px 7px;
    font-size: .71rem;
    color: #888;
    line-height: 1.35;
    background: #faf8f5;
    border-top: 1px solid #ece7df;
}

.hm-popup__footer {
    padding-top: 11px;
    display: flex;
    justify-content: flex-end;
}

.hm-popup__readmore {
    display: inline-block;
    font-size: .81rem;
    font-weight: 600;
    color: #4a6a2a;
    text-decoration: none;
    padding: 5px 12px;
    border: 1px solid #a8c078;
    border-radius: 4px;
    transition: background .14s, color .14s;
}

.hm-popup__readmore:hover,
.hm-popup__readmore:focus {
    background: #4a6a2a;
    color: #fff;
    outline: none;
}

/* ---- Custom map controls ---- */
.hm-map-ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #fff;
    border: 1px solid #b0b8a0;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
    cursor: pointer;
    font-size: 18px;
    color: #3a4a1f;
    padding: 0;
    margin-bottom: 6px;
    transition: background .15s, box-shadow .15s;
}

.hm-map-ctrl-btn:hover {
    background: #f0f4e8;
}

.hm-map-ctrl-btn:focus {
    outline: 2px solid #4a6a2a;
    outline-offset: 2px;
}

.hm-map-ctrl-btn:active {
    background: #e8eddc;
    transform: scale(.96);
}

/* ---- Leaflet attribution tweak ---- */
.leaflet-control-attribution {
    font-size: .68rem;
    background: rgba(255,255,255,.75) !important;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .hm-house-icon {
        transition: none;
    }
}
