/* Styles for the markers and popups atlasMap.js builds. Versioned with the script. */
.atlas-map-shell {
    height: 60vh;
    min-height: 22rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .12);
}

.atlas-popup {
    min-width: 11rem;
    font-size: .85rem;
}

.atlas-popup-title {
    font-weight: 700;
    margin-bottom: .15rem;
}

.atlas-popup-sub {
    color: #555;
    margin-bottom: .45rem;
}

.atlas-popup-link {
    font-weight: 600;
}

.atlas-cell {
    transition: fill-opacity .15s ease;
    cursor: pointer;
}

.atlas-cell:hover {
    fill-opacity: .8;
}

/* Hover label on a density square — the counts a popup used to carry. */
.atlas-tooltip .atlas-tip {
    font-size: .8rem;
    line-height: 1.35;
}

.atlas-tip-hint {
    display: block;
    color: #666;
    font-size: .72rem;
}

/* Thumbnail strip inside an event pin's popup. */
.atlas-popup-thumbs {
    display: flex;
    gap: .25rem;
    margin: .1rem 0 .5rem;
}

.atlas-popup-thumb {
    width: 3.4rem;
    height: 3.4rem;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
}

/* Route lines. Keeping the hit area wider than the stroke makes a 2px line tappable. */
.atlas-track {
    cursor: pointer;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.atlas-track:hover {
    stroke-width: 4;
}

/* Photo gallery for a selected square. */
.atlas-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: .5rem;
}

.atlas-gallery-item {
    position: relative;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1;
}

.atlas-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #eee;
    transition: transform .18s ease;
}

.atlas-gallery-item:hover img {
    transform: scale(1.04);
}

/* Event name over the thumbnail: the one piece of context a photo needs here. */
.atlas-gallery-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: .9rem .4rem .3rem;
    font-size: .7rem;
    color: #fff;
    text-align: left;
    background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Lightbox. Shaped after the event feed's, so the two read the same way. */
.atlas-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, .88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.atlas-lightbox:focus {
    outline: none;
}

.atlas-lightbox-inner {
    max-width: min(96vw, 1100px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.atlas-lightbox-image {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 6px;
}

.atlas-lightbox-caption {
    color: #fff;
    margin: 0;
    font-size: .95rem;
}

.atlas-lightbox-meta {
    display: flex;
    gap: .9rem;
    flex-wrap: wrap;
    align-items: center;
    color: #d7d7d7;
    font-size: .8rem;
}

.atlas-lightbox-meta a {
    color: #fff;
    font-weight: 600;
}

.atlas-lightbox-close,
.atlas-lightbox-nav {
    position: absolute;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 2.6rem;
    height: 2.6rem;
    font-size: 1.3rem;
    cursor: pointer;
}

.atlas-lightbox-close {
    top: 1rem;
    right: 1rem;
}

.atlas-lightbox-nav.prev {
    left: 1rem;
    top: 50%;
}

.atlas-lightbox-nav.next {
    right: 1rem;
    top: 50%;
}

.atlas-lightbox-close:hover,
.atlas-lightbox-nav:hover {
    background: rgba(0, 0, 0, .75);
}

/* Density legend under the map. */
.atlas-legend {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: .6rem;
    font-size: .8rem;
    color: var(--bc-ink-muted, #666);
}

.atlas-legend-scale {
    display: flex;
    align-items: center;
    gap: .3rem;
}

.atlas-legend-swatch {
    display: inline-block;
    width: 1.1rem;
    height: .7rem;
    border-radius: 2px;
}
