/* Styles for jacana_highlights_map */

.jacana-highlights-map .jacana-map-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 52px;
}

.jacana-highlights-map .jacana-tailor-story-kicker {
    justify-content: center;
    border-left: none;
    padding-left: 0;
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.jacana-highlights-map .jacana-tailor-story-kicker::before,
.jacana-highlights-map .jacana-tailor-story-kicker::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 155, 83, 0.5), transparent);
    max-width: 48px;
}

.jacana-map-heading {
    font-family: "Cormorant Garamond", "Palatino Linotype", serif;
    font-size: clamp(28px, 3vw, 46px);
    line-height: 1.14;
    color: var(--jacana-earth, #2d2416);
    margin: 0 0 0.6em;
}

.jacana-map-intro {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(45, 36, 22, 0.72);
    margin: 0;
}

/* -- Panel + Map Grid -- */
.jacana-highlights-map-grid {
    display: grid;
    grid-template-columns: 2fr 1.05fr;
    gap: 32px;
    align-items: start;
    margin-bottom: 44px;
}

.jacana-map-canvas {
    border-radius: 12px;
    border: 1px solid var(--jacana-line, rgba(45, 36, 22, 0.1));
    position: relative;
    overflow: hidden;
    background: #e8dfd0;
    box-shadow: 0 16px 40px rgba(45, 36, 22, 0.06);
}

.jacana-map-canvas.is-empty {
    min-height: 480px;
    background: linear-gradient(180deg, rgba(157, 203, 223, 0.2), rgba(219, 151, 81, 0.12));
}

.jacana-map-base-image {
    display: block;
    width: 100%;
    height: auto;
}

.jacana-map-canvas::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(45, 36, 22, 0.05), transparent);
    pointer-events: none;
}

/* -- Hotspots Premium Upgrade -- */
.jacana-map-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent !important;
    padding: 0;
    cursor: pointer;
    box-shadow: none;
    border-radius: 50%;
}

.jacana-map-hotspot::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--jacana-dunes, #db9751), #a66a2f);
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(45, 36, 22, 0.25);
    transition: transform 0.3s cubic-bezier(0.22, 0.68, 0.2, 1), border-color 0.3s ease;
    z-index: 2;
}

/* Pulsing outer ring */
.jacana-map-hotspot::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    border: 1px solid var(--jacana-dunes, #db9751);
    opacity: 0;
    pointer-events: none;
    animation: jacanaHotspotPulse 2.8s cubic-bezier(0.25, 0.8, 0.25, 1) infinite;
    z-index: 1;
}

/* Stagger pulse animations based on DOM order */
.jacana-map-hotspot:nth-child(even)::after {
    animation-delay: 1.4s;
}

@keyframes jacanaHotspotPulse {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.jacana-map-hotspot:hover::before,
.jacana-map-hotspot.is-active::before {
    transform: scale(1.3);
    border-color: var(--jacana-sky, #9dcbdf);
}

.jacana-map-hotspot.is-active::after {
    animation: none;
    inset: 6px;
    opacity: 1;
    border: 2px solid var(--jacana-sky, #9dcbdf);
    transform: scale(1);
    background: rgba(157, 203, 223, 0.15);
}

/* -- Hotspot Tooltip Label -- */
.jacana-hotspot-label {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: var(--jacana-earth, #2d2416);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.22, 0.68, 0.2, 1);
    box-shadow: 0 8px 20px rgba(45, 36, 22, 0.25);
    z-index: 10;
}

.jacana-hotspot-label::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: var(--jacana-earth, #2d2416) transparent transparent transparent;
}

.jacana-map-hotspot:hover .jacana-hotspot-label,
.jacana-map-hotspot.is-active .jacana-hotspot-label {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* -- Map Panel -- */
.jacana-map-fallback {
    margin: 0;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(45, 36, 22, 0.6);
    z-index: 1;
    text-align: center;
    padding: 24px;
}

.jacana-map-panel {
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--jacana-line, rgba(45, 36, 22, 0.14));
    background: #fff;
    box-shadow:
        0 8px 18px rgba(45, 36, 22, 0.04),
        0 24px 50px rgba(45, 36, 22, 0.08);
    overflow: hidden;
    height: 100%;
    min-height: 480px;
}

.jacana-map-panel-media {
    position: relative;
    background: #e8dfd0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.jacana-map-panel-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    z-index: 1;
}

.jacana-map-panel-image.is-visible {
    display: block;
}

.jacana-map-panel-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(12, 10, 9, 0.8) 100%);
    display: flex;
    align-items: flex-end;
    padding: 24px 28px;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.jacana-map-panel-media-title {
    font-family: "Cormorant Garamond", "Palatino Linotype", serif;
    font-size: 26px;
    color: #1c140f !important;
    margin: 0;
    line-height: 1.15;
    background: rgba(255, 250, 228, 0.5);
    padding: 8px 14px;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(12, 10, 9, 0.18);
    text-shadow: none;
    max-width: 92%;
}

.jacana-map-panel-video[hidden] {
    display: none;
}

.jacana-map-panel-video {
    position: absolute;
    inset: 0;
    z-index: 3;
}

.jacana-map-panel-video iframe {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    display: block;
}

.jacana-map-panel-body {
    padding: 28px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.jacana-map-panel-teaser {
    font-family: "Cormorant Garamond", "Palatino Linotype", serif;
    font-size: 19px;
    font-style: italic;
    color: var(--jacana-dunes, #db9751);
    margin: 0;
    line-height: 1.4;
}

.jacana-map-panel-description {
    font-size: 15px;
    line-height: 1.65;
    color: rgba(45, 36, 22, 0.72);
    margin: 0;
}

.jacana-map-actions {
    padding: 0 28px 28px;
    margin-top: auto;
}

.jacana-map-actions .button {
    width: 100%;
    justify-content: center;
}

/* -- Places Pill List -- */
.jacana-map-places {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.jacana-map-place-pill {
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--jacana-earth, #2d2416);
    background: rgba(45, 36, 22, 0.04);
    border: 1px solid rgba(45, 36, 22, 0.08);
    cursor: pointer;
    transition: all 0.25s ease;
}

.jacana-map-place-pill:hover,
.jacana-map-place-pill.is-active {
    background: rgba(219, 151, 81, 0.12);
    border-color: var(--jacana-dunes, #db9751);
    color: #a66a2f;
    transform: translateY(-2px);
}

/* -- Export positions utility -- */
.jacana-map-export-row {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.jacana-map-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(45, 36, 22, 0.55);
    background: transparent;
    border: 1px solid rgba(45, 36, 22, 0.15);
    border-radius: 6px;
    padding: 9px 18px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.jacana-map-export-btn:hover {
    color: var(--jacana-earth, #2d2416);
    border-color: rgba(45, 36, 22, 0.35);
    background: rgba(45, 36, 22, 0.04);
}

.jacana-map-export-btn svg {
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .jacana-highlights-map-grid {
        grid-template-columns: 1fr;
    }

    .jacana-map-panel {
        min-height: auto;
    }

    .jacana-map-header {
        margin-bottom: 32px;
    }

    .jacana-map-panel-media-overlay,
    .jacana-map-panel-body,
    .jacana-map-actions {
        padding-left: 18px;
        padding-right: 18px;
    }

    .jacana-map-panel-media-title {
        font-size: 22px;
        max-width: 100%;
    }
}

@media (max-width: 767px) {

    .jacana-map-canvas,
    .jacana-map-panel {
        border-radius: 16px;
    }

    .jacana-map-hotspot {
        width: 40px;
        height: 40px;
    }

    .jacana-map-hotspot::before {
        inset: 9px;
    }

    .jacana-map-places {
        gap: 8px;
    }

    .jacana-map-place-pill {
        width: 100%;
        justify-content: center;
        font-size: 13px;
    }
}