/* ACF Map Pins — Frontend  v3.0 */

/* ── Wrapper ── */
.mp-wrap {
    font-family: inherit;
}

/* ── Map ── */
.mp-map-outer {
    width: 100%;
}

.mp-map-container {
    position: relative;
    width: 100%;
    height: 0; /* height driven by padding-bottom ratio set inline */
    overflow: hidden;
}

.mp-map-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Pins ── */
.mp-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    cursor: pointer;
    z-index: 1;
    transition: transform .2s ease;
}

.mp-pin.is-active {
    transform: translate(-50%, -130%);
    z-index: 10;
}

.mp-pin__dot {
    width: 23px;
    height: 23px;
    position: relative;
    
    &::before {
        content: '';
        width: 100%;
        height: 100%;
        background: url(/wp-content/uploads/2026/04/Waterway_Drop_Pin.svg);
        background-size: 100% 100%;
        position: absolute;
        inset: 0;
    }
}

/*.mp-pin:hover .mp-pin__dot,*/
/*.mp-pin.is-active .mp-pin__dot {*/
/*    background: #e63946;*/
/*}*/

/* ── Popup ── */
.mp-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 14px 10px;
    min-width: 180px;
    max-width: 240px;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
    z-index: 20;
    pointer-events: auto;
    white-space: normal;
    text-align: left;
}

/* Little arrow pointing down */
.mp-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: #fff;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,.1));
}

.mp-pin.is-active .mp-popup {
    display: block;
    animation: mp-popup-in .18s ease;
}

@keyframes mp-popup-in {
    from { opacity: 0; transform: translateX(-50%) translateY(6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.mp-popup__close {
    position: absolute;
    top: 6px; right: 8px;
    background: none; border: none;
    cursor: pointer; font-size: 12px; color: #999;
    padding: 0; line-height: 1;
}
.mp-popup__close:hover { color: #333; }


/* ── Search ── */
.mp-search-wrap {
    margin: 24px 0 16px;
    display: flex;
    justify-content: center;
}

.mp-search {
    width: 100%;
    max-width: 460px;
    padding: 10px 16px;
    border: 1px solid #ccc;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.mp-search:focus {
    border-color: #c8860a;
    box-shadow: 0 0 0 3px rgba(200,134,10,.15);
}

/* ── Cards grid ── */
.mp-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(306px, 1fr));
    gap: 16px;
    padding-inline: var(--sidepadding-xs);
}

.mp-card {
    background: #FFE9B7;
    border-radius: 20px;
    padding: 2.083vw 1.736vw;
    cursor: pointer;
    box-shadow: 20px 20px 4px 0 rgba(50, 35, 0, 0.10);
    transition: background .15s , transform .15s;
}

.mp-card:hover {
    transform: translateY(-2px);
}

.mp-card.is-active {
    background: #FF6C03;
}

.mp-card.is-hidden {
    display: none;
}

.mp-card__title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1d2327;
}

.mp-card__address,
.mp-card__hours {
    margin: 0 0 6px;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    display: flex;
    gap: 6px;
}

.mp-card__icon {
    flex-shrink: 0;
    font-size: 12px;
    margin-top: 1px;
}

/* ── No results ── */
.mp-no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 24px 0;
}

/* ── Mobile responsive ── */
@media (max-width: 768px) {
    .mp-pin__dot {
        width: 14px;
        height: 14px;
    }

    .mp-popup {
        min-width: 150px;
        max-width: 200px;
        padding: 10px 12px 8px;
    }

    .mp-search-wrap {
        margin: 16px 0 12px;
    }

    .mp-search {
        padding: 8px 14px;
        font-size: 13px;
    }

    .mp-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mp-card {
        padding: 16px 14px;
        box-shadow: 10px 10px 4px 0 rgba(50, 35, 0, 0.10);
    }
}

@media (max-width: 480px) {
    .mp-pin__dot {
        width: 12px;
        height: 12px;
    }

    .mp-popup {
        min-width: 130px;
        max-width: 170px;
        padding: 8px 10px 6px;
    }

    .mp-card {
        padding: 14px 12px;
        border-radius: 14px;
    }
}
