/* =============================================
   LONDON INTERACTIVE MAP — CSS
   Softrobo Systems | london-map.css
   ============================================= */

/* --- Wrapper --- */
.lim-wrapper {
    position: relative;
    font-family: 'Segoe UI', Arial, sans-serif;
    user-select: none;
}

/* --- Info bar (sits above map) --- */
.lim-infobar {
    background: #1a1a2e;
    color: #e2e8f0;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 6px 6px 0 0;
    letter-spacing: 0.3px;
    min-height: 34px;
    display: flex;
    align-items: center;
}

.lim-infobar strong {
    color: #f97316;
    margin-right: 4px;
}

/* --- SVG Map --- */
#lim-map {
    width: 100%;
    height: auto;
    display: block;
    background: #f0f4ff;
    border-radius: 0 0 8px 8px;
    cursor: default;
}

/* --- Borough paths --- */
#lim-boroughs path {
    fill: #e84118;
    transition: fill 0.18s ease, filter 0.18s ease;
    cursor: default;
}

#lim-boroughs path:hover,
#lim-boroughs path.lim-active-borough {
    fill: #c0392b;
    filter: drop-shadow(0 0 6px rgba(200, 40, 30, 0.6));
}

/* --- Pin markers --- */
.lim-pin {
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(.34,1.56,.64,1);
    transform-origin: center;
}

.lim-pin:hover,
.lim-pin:focus {
    transform: scale(1.35);
    outline: none;
}

.lim-pin:focus .lim-pin-dot {
    stroke: #f97316;
    stroke-width: 3;
}

.lim-pin.lim-pin-active {
    transform: scale(1.5);
}

.lim-pin.lim-pin-active .lim-pin-dot {
    stroke: #f97316;
    stroke-width: 3;
    fill: #fff8f0;
}

/* --- Tooltip --- */
.lim-tooltip {
    position: fixed;
    z-index: 99999;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.12);
    width: 250px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none; /* ALWAYS none by default — JS sets to auto only on click-lock */
    transform: translateY(8px) scale(0.97);
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: 1px solid rgba(0,0,0,0.07);
}

.lim-tooltip.lim-tooltip-visible {
    opacity: 1;
    /* pointer-events intentionally NOT set here — controlled by JS */
    transform: translateY(0) scale(1);
}

/* Close button */
.lim-tooltip-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.15s;
}

.lim-tooltip-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Tooltip image */
.lim-tooltip-img {
    width: 100%;
    height: 155px;
    object-fit: cover;
    display: block;
    background: #e5e7eb;
}

/* Tooltip text body */
.lim-tooltip-body {
    padding: 12px 14px 14px;
}

.lim-tooltip-body p {
    margin: 0 0 4px;
    line-height: 1.4;
}

.lim-tooltip-address {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.lim-tooltip-postcode {
    font-size: 13px;
    color: #e84118;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lim-tooltip-borough {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px !important;
}

/* === MOBILE TOOLTIP (bottom sheet style) === */
@media (max-width: 600px) {
    .lim-tooltip {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        top: auto !important;
        right: 0 !important;
        width: 100% !important;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 30px rgba(0,0,0,0.18);
        transform: translateY(100%);
    }

    .lim-tooltip.lim-tooltip-visible {
        transform: translateY(0);
    }

    .lim-tooltip-img {
        height: 180px;
    }
}

/* === LEGEND (optional) === */
.lim-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    font-size: 12px;
    color: #6b7280;
}

.lim-legend-pin {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    border: 2px solid #c0392b;
    display: inline-block;
}

.lim-legend-borough {
    width: 14px;
    height: 14px;
    background: #e84118;
    border-radius: 3px;
    display: inline-block;
}
