/* fill the viewport instead of scrolling: header, back link, then the globe */
html,
body {
    height: 100%;
    overflow: hidden;
}

.container {
    max-width: 1400px;
    height: 100vh;
    height: 100dvh;
}

.content,
.post,
.post-content,
.post-content > div {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.post {
    margin: 0;
    padding: 0;
}

/* plain header: no orange bar, just the logo text */
.header__logo::after {
    background: none;
}

.logo {
    padding: 5px 0;
    color: var(--accent);
    font-weight: bold;
    background: none;
}

.map-return {
    font-size: 0.9em;
}

/* keep just the logo, the back link and the globe */
.header .menu,
.menu-trigger,
.post-title,
.post-meta,
.post-content h2,
.footer,
.content ~ div {
    display: none;
}

#globe {
    flex: 1;
    /* don't let the canvas' initial (window-sized) size stretch the box */
    min-height: 0;
    overflow: hidden;
    cursor: grab;
    /* fade the edges so a zoomed-in globe doesn't show as a box */
    -webkit-mask-image: radial-gradient(closest-side, #000 80%, transparent);
    mask-image: radial-gradient(closest-side, #000 80%, transparent);
}

#globe:active {
    cursor: grabbing;
}

/* zero-size anchor sitting exactly on the photo's location */
.globe-pin {
    width: 0;
    height: 0;
}

.globe-pin:hover,
.globe-pin:has(.expanded) {
    /* the renderer sets z-index inline to sort by depth */
    z-index: 100000 !important;
}

/* stem down to the location */
.globe-pin::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 1px;
    height: 10px;
    background: var(--accent);
}

.globe-pin__body {
    position: absolute;
    bottom: 10px;
    left: 0;
    display: grid;
    grid-template-columns: repeat(var(--cols, 1), 40px);
    gap: 2px;
    padding: 2px;
    background: var(--background);
    border: 1px solid var(--accent);
    transform: translateX(-50%);
    transform-origin: bottom center;
    transition: transform 0.15s ease-out;
    pointer-events: auto;
}

.globe-pin__body:not(.expanded):hover {
    transform: translateX(-50%) scale(2.2);
}

.globe-pin__body a {
    display: block;
    text-decoration: none;
}

.globe-pin__body img {
    display: block;
    width: 40px;
    height: 40px;
    max-width: none;
    margin: 0;
    object-fit: cover;
}

/* number of photos in a cluster */
.globe-pin__body[data-count]::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    color: var(--background);
    background: var(--accent);
}
