/* =============================================================================
   Horticulture Map for Elementor — hort-map.css  v3.0.0
   ============================================================================= */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400&display=swap');

.hort-map-wrap { width: 100%; box-sizing: border-box; }

.hort-map-header { text-align: center; margin-bottom: 1.5rem; }

.hort-map-title {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-size: clamp(1.75rem, 4vw, 3rem) !important;
    font-weight: 400 !important;
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

.hort-map-subtitle {
    margin: 0.5rem 0 0 !important;
    font-size: 0.9rem;
}

/* =============================================================================
   MAP CANVAS
   Fixed pixel height (set inline from PHP) — a real map, not an image, so it
   isn't sized by aspect-ratio. flex-shrink:0 guards against the same
   Elementor-flex-container height-collapse bug found in the previous version
   of this widget.
   ============================================================================= */
.hort-map-canvas {
    position: relative;
    width: 100%;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f4f7f0;
}

.hort-map-error {
    margin: 0;
    padding: 2rem;
    text-align: center;
    color: #666;
}

/* =============================================================================
   PINS — custom MapLibre marker elements
   ============================================================================= */
.hort-map-pin {
    /* No position rule here — MapLibre sets position:absolute on this
       element itself (via its own .maplibregl-marker class) to place it by
       lat/lng. Overriding that (e.g. with position:relative) breaks marker
       placement: the pin falls into normal document flow instead, stacking
       under the previous one rather than sitting at its real coordinate. */
    aspect-ratio: 847 / 2000;
    pointer-events: none;
}

.hort-map-pin__img,
.hort-map-pin__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    display: block;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.hort-map-pin__img {
    transition: opacity 0.15s ease;
}

.hort-map-pin__video {
    opacity: 0;
}

.hort-map-pin.is-playing .hort-map-pin__img {
    opacity: 0;
}

.hort-map-pin.is-playing .hort-map-pin__video {
    opacity: 1;
}

.hort-map-pin__hitzone {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: auto;
    cursor: pointer;
}

/* =============================================================================
   POPUP — content is built in JS; this styles MapLibre's own wrapper elements
   plus our inner content classes
   ============================================================================= */
.maplibregl-popup-content {
    padding: 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.hort-popup-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2em;
}

.hort-popup-name {
    white-space: nowrap;
}

.hort-popup-meta {
    font-size: 0.8em;
    opacity: 0.7;
    font-weight: 400 !important;
    white-space: nowrap;
}

.hort-popup-btn {
    display: inline-block;
    margin-top: 0.3em;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
