/* Live Breathe Scotland - interactive Scotland map (scotland-map/index.php, js/scotland-map.js) */

.lbsmap-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 0.9rem;
}

.lbsmap-search {
    flex: 1 1 280px;
    max-width: 420px;
    position: relative;
}

.lbsmap-search input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 1rem 0.7rem 2.6rem;
    font: inherit;
    font-size: 1rem;
    color: var(--peat, #2c2825);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 0.9rem center / 18px;
    border: 1px solid #d5d9df;
    border-radius: 999px;
}

.lbsmap-search input:focus {
    outline: none;
    border-color: var(--scottish-blue, #1a3a5c);
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.15);
}

.lbsmap-count {
    margin: 0;
    color: var(--stone-grey, #6b7280);
    font-size: 0.95rem;
}

.lbsmap-reset {
    font: inherit;
    font-size: 0.9rem;
    color: var(--scottish-blue, #1a3a5c);
    background: none;
    border: 0;
    padding: 0;
    text-decoration: underline;
    cursor: pointer;
}

.lbsmap-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.lbsmap-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font: inherit;
    font-size: 0.9rem;
    color: var(--peat, #2c2825);
    background: #fff;
    border: 1px solid #d5d9df;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.lbsmap-chip:hover {
    border-color: var(--scottish-blue, #1a3a5c);
}

.lbsmap-chip[aria-pressed="true"] {
    color: #fff;
    background: var(--scottish-blue, #1a3a5c);
    border-color: var(--scottish-blue, #1a3a5c);
}

.lbsmap-chip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
    box-shadow: 0 0 0 2px #fff;
}

.lbsmap-chip-count {
    color: var(--stone-grey, #6b7280);
    font-size: 0.8rem;
}

.lbsmap-chip[aria-pressed="true"] .lbsmap-chip-count {
    color: rgba(255, 255, 255, 0.75);
}

.lbsmap {
    height: 72vh;
    min-height: 460px;
    max-height: 820px;
    border-radius: 12px;
    overflow: hidden;
    background: #dfe7ee;
    z-index: 0;
}

/* Pins and clusters */

.lbsmap-pin {
    background: none;
    border: 0;
}

.lbsmap-pin svg {
    width: 26px;
    height: 36px;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.lbsmap-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--scottish-blue, #1a3a5c);
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* Popups */

.lbsmap .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
}

.lbsmap .leaflet-popup-content {
    margin: 0;
    width: 260px !important;
}

.lbsmap-popup-img img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.lbsmap-popup-body {
    padding: 0.8rem 1rem 1rem;
}

.lbsmap-popup-region {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--heather, #8b7eb8);
    margin-bottom: 0.2rem;
}

.lbsmap-popup h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    line-height: 1.2;
    margin: 0 0 0.4rem;
}

.lbsmap-popup h3 a {
    color: var(--scottish-blue-deep, #0f2540);
    text-decoration: none;
}

.lbsmap-popup p {
    margin: 0 0 0.6rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--stone-grey, #6b7280);
}

.lbsmap-popup-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--scottish-blue, #1a3a5c);
}

@media (max-width: 768px) {
    .lbsmap {
        height: 65vh;
        min-height: 380px;
        border-radius: 0;
    }

    .lbsmap-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    .lbsmap-chip {
        flex: none;
    }
}
