/* =============================================================
   BDP Map — shared styles for finder panel + venue single page.
   Uses CartoDB Voyager tiles (warm, editorial).
   Tokens: --ink #0F0F0E  --bone #F5F1EA  --ember #B5582C
   ============================================================= */

/* ── Container ───────────────────────────────────────────────── */
.bdp-map-panel {
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow: hidden;
    border-left: 1px solid rgba(15,15,14,.1);
    background: #e9e4da;
}
.bdp-map-block {
    height: 440px;
    overflow: hidden;
    position: relative;
    background: #e9e4da;
    border: 1px solid rgba(15,15,14,.1);
}
.bdp-map-panel #bdp-finder-map,
.bdp-map-block  #bdp-venue-map {
    width: 100%;
    height: 100%;
}

/* ── Tile tone ───────────────────────────────────────────────── */
/* CartoDB Voyager already looks warm — just a hint of sepia */
.leaflet-tile-pane {
    filter: sepia(.12) saturate(.88) brightness(1.01);
}

/* ── Leaflet overrides — square, editorial ───────────────────── */
.leaflet-container {
    font-family: var(--mono, 'JetBrains Mono', monospace) !important;
    outline: none;
    background: #e9e4da;
}

/* Attribution */
.leaflet-control-attribution {
    background: rgba(245,241,234,.9) !important;
    font-family: var(--mono, monospace) !important;
    font-size: 9px !important;
    letter-spacing: .04em;
    color: rgba(15,15,14,.4) !important;
    border-radius: 0 !important;
    padding: 3px 8px !important;
    border-top: 1px solid rgba(15,15,14,.07) !important;
}
.leaflet-control-attribution a { color: rgba(15,15,14,.4) !important; }

/* Zoom */
.leaflet-control-zoom {
    border: 1px solid rgba(15,15,14,.15) !important;
    border-radius: 0 !important;
    box-shadow: 0 2px 12px rgba(15,15,14,.1) !important;
    overflow: hidden;
}
.leaflet-control-zoom a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    line-height: 1 !important;
    font-size: 18px !important;
    font-weight: 300 !important;
    color: #0F0F0E !important;
    background: rgba(245,241,234,.96) !important;
    border-bottom: 1px solid rgba(15,15,14,.1) !important;
    border-radius: 0 !important;
    transition: background .18s, color .18s !important;
    text-decoration: none !important;
}
.leaflet-control-zoom a:last-child { border-bottom: 0 !important; }
.leaflet-control-zoom a:hover {
    background: #0F0F0E !important;
    color: #F5F1EA !important;
}

/* ── Price-tag pin ────────────────────────────────────────────── */
.bdp-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    filter: drop-shadow(0 2px 6px rgba(15,15,14,.22));
    transition: filter .2s;
}
.bdp-pin:hover {
    filter: drop-shadow(0 4px 10px rgba(15,15,14,.3));
    z-index: 9999 !important;
}
.bdp-pin__label {
    background: #F5F1EA;
    color: #0F0F0E;
    padding: 5px 9px;
    font-family: var(--mono, monospace);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .04em;
    white-space: nowrap;
    border: 1px solid rgba(15,15,14,.2);
    transition: background .18s, color .18s, border-color .18s, transform .15s;
    transform-origin: bottom center;
    line-height: 1.4;
}
.bdp-pin__stem {
    width: 1px;
    height: 8px;
    background: rgba(15,15,14,.3);
    transition: background .18s;
}
.bdp-pin__dot {
    width: 5px;
    height: 5px;
    background: #B5582C;
    border-radius: 50%;
    margin-top: -1px;
    transition: transform .18s;
}

/* Active / hover state — ember */
.bdp-pin--active .bdp-pin__label,
.bdp-pin:hover    .bdp-pin__label {
    background: #B5582C;
    color: #F5F1EA;
    border-color: #B5582C;
    transform: scale(1.07) translateY(-1px);
}
.bdp-pin--active .bdp-pin__stem,
.bdp-pin:hover    .bdp-pin__stem { background: #B5582C; }
.bdp-pin--active .bdp-pin__dot,
.bdp-pin:hover    .bdp-pin__dot  { transform: scale(1.3); }

/* ── Popup ────────────────────────────────────────────────────── */
.leaflet-popup-pane { z-index: 700; }
.leaflet-popup-content-wrapper {
    border-radius: 0 !important;
    border: 1px solid rgba(15,15,14,.15) !important;
    box-shadow: 0 8px 28px rgba(15,15,14,.14) !important;
    background: #F5F1EA !important;
    padding: 0 !important;
}
.leaflet-popup-tip-container { display: none !important; }
.leaflet-popup-content {
    margin: 0 !important;
    padding: 16px 18px 14px;
    min-width: 170px;
    max-width: 220px;
}
.bdp-popup__name {
    font-family: var(--serif, serif);
    font-size: 14px;
    font-weight: 400;
    color: #0F0F0E;
    line-height: 1.3;
    margin: 0 0 4px;
}
.bdp-popup__price {
    font-family: var(--mono, monospace);
    font-size: 11px;
    color: #807A6F;
    letter-spacing: .06em;
}
.bdp-popup__link {
    display: inline-block;
    margin-top: 10px;
    font-family: var(--mono, monospace);
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #B5582C !important;
    border-bottom: 1px solid #B5582C;
    padding-bottom: 1px;
    line-height: 1;
}
.leaflet-popup-close-button {
    color: rgba(15,15,14,.35) !important;
    top: 8px !important;
    right: 10px !important;
    font-size: 16px !important;
    font-weight: 300 !important;
}
.leaflet-popup-close-button:hover { color: #0F0F0E !important; }

/* ── No-coords placeholder ────────────────────────────────────── */
.bdp-map-no-coords {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9e4da;
    font-family: var(--mono, monospace);
    font-size: 10px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(15,15,14,.32);
}

/* ── Result card highlight ────────────────────────────────────── */
.res--map-highlight {
    outline: 2px solid #B5582C;
    outline-offset: -1px;
    background: rgba(181,88,44,.04);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .bdp-map-panel { display: none; }
}
