/* ==========================================================
   Reprecinct Maps Widget – rpl-map (Google Maps)
   ========================================================== */

.rpl-map {
    position: relative;
}

.rpl-map__canvas {
    width: 100%;
    height: 500px;
    min-height: 300px;
}

/* Let floatPane / custom overlay paint to map edges (avoids bottom clipping) */
.rpl-map .gm-style {
    overflow: visible !important;
}

/* ── Zoom Controls (top-left) ── */
.rpl-map__zoom {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rpl-map__zoom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.rpl-map__zoom-btn:hover {
    background: #f5f5f5;
}

.rpl-map__zoom-btn svg {
    width: 1em;
    height: 1em;
}

/* ── Prev/Next Nav (top-right) ── */
.rpl-map__nav {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    display: flex;
    gap: 4px;
}

.rpl-map__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.rpl-map__nav-btn:hover {
    background: #f5f5f5;
}

.rpl-map__nav-btn svg {
    width: 1em;
    height: 1em;
}

/* ── Popup Card (OverlayView, positioned above pin) ── */
.rpl-map-popup {
    width: 300px;
    background: #fff;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    cursor: default;
    transform: translateZ(0);
}

/* Arrow pointing down toward the pin */
.rpl-map-popup::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0 10px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

.rpl-map-popup__close {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: rgba(0,0,0,.4);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.rpl-map-popup__close:hover {
    background: rgba(0,0,0,.7);
}

.rpl-map-popup__img-link {
    display: block;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.rpl-map-popup__img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.rpl-map-popup__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
}

.rpl-map-popup__title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #111;
    text-decoration: none;
    margin-bottom: 2px;
}

.rpl-map-popup__title:hover {
    color: #2563eb;
}

.rpl-map-popup__meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rpl-map-popup__meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
    color: #888;
}

.rpl-map-popup__meta-icon svg {
    width: 1em;
    height: 1em;
}

.rpl-map-popup__meta-text {
    font-size: 13px;
    line-height: 1.4;
    color: #333;
}
