.shortcode-map {
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0px 3px 6px #00000029;
    position: relative;
    width: 100%;
}

.shortcode-map.loading .marker {
    display: none;
}

.shortcode-map.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
}

.shortcode-map.loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid var(--blue-md);
    border-top-color: transparent;
    border-radius: 50%;
    animation: shortcode-map-spin 0.7s linear infinite;
}

@keyframes shortcode-map-spin {
    to { transform: rotate(360deg); }
}

.shortcode-map__pin {
    width: 32px;
    color: var(--blue-md);
    cursor: pointer;
    transform-origin: 50% 100%;
    transition: transform 0.2s ease;
}

.shortcode-map__pin:hover {
    transform: scale(1.1);
}

.shortcode-map__pin.is-active {
    transform: scale(1.5);
    z-index: 10;
}

.shortcode-map__pin svg {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}

.shortcode-map__pin.is-active svg {
    filter:
        drop-shadow(0 -1.5px 0 #fff)
        drop-shadow(1.5px 0 0 #fff)
        drop-shadow(0 1.5px 0 #fff)
        drop-shadow(-1.5px 0 0 #fff)
        drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* MARKER POPUP (Google InfoWindow) */

/* Tame Google's InfoWindow chrome so .map-popup controls the whole card:
   no inner padding (image goes edge-to-edge), rounded corners, no focus ring. */
.gm-style .gm-style-iw-c {
    position: relative !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18) !important;
    overflow: hidden !important;
}
.gm-style .gm-style-iw-c:focus,
.gm-style .gm-style-iw-c:focus-visible {
    outline: none !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    padding: 0 !important;
    max-width: none !important;
}

/* Collapse the reserved header strip (.gm-style-iw-ch / -chr) so the content —
   the image — sits flush to the rounded top edge instead of below a white gap. */
.gm-style .gm-style-iw-ch,
.gm-style .gm-style-iw-chr {
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
}

/* Close button (×): a small, consistent chip pinned inside the card's top-right,
   legible whether it sits over the image or the white body. */
.gm-style .gm-style-iw button.gm-ui-hover-effect {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid var(--gray) !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18) !important;
    opacity: 1 !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.gm-style .gm-style-iw button.gm-ui-hover-effect > span {
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    background-color: var(--blue-dk) !important;
}

.map-popup {
    width: 280px;
    background: var(--white);
}

.map-popup__media {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.map-popup__media img,
.map-popup__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-popup__body {
    padding: 18px 20px 20px;
}

.map-popup__title {
    margin: 0 0 10px;
    font-family: "Cachet";
    font-weight: bold;
    font-size: 22px;
    line-height: 1.05;
    letter-spacing: -0.4px;
    text-transform: uppercase;
    color: var(--blue-dk);
}

.map-popup__address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 8px;
    white-space: pre-line;
    line-height: 1.35;
}

.map-popup__address .icon {
    flex: 0 0 auto;
    margin-top: 3px;
    font-size: 15px;
}

/* Force the brand color onto the pin — Google's .gm-style sets a near-black
   text color the bare .icon would otherwise inherit through currentColor. */
.map-popup .map-popup__address .icon,
.map-popup .map-popup__address .icon svg {
    color: var(--blue-dk);
    fill: var(--blue-dk);
}

.map-popup__phone {
    margin: 0 0 14px;
}

.map-popup__phone a {
    color: var(--blue-dk);
    font-weight: bold;
    text-decoration: none;
}

.map-popup__phone a:hover {
    text-decoration: underline;
}

.map-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.map-popup__actions .btn {
    padding: 10px 16px;
}

/* Secondary action: blue outline so it reads against the white popup card
   (the global .btn--white is white-on-white and would vanish here). */
.map-popup__actions .btn.btn--white {
    background: var(--white);
    border: 1px solid var(--blue-dk);
}
.map-popup__actions .btn.btn--white .btn-text {
    color: var(--blue-dk);
}
.map-popup__actions .btn.btn--white:hover {
    background: var(--blue-dk);
}
.map-popup__actions .btn.btn--white:hover .btn-text {
    color: var(--white);
}
