/* Voting and lightbox */

.vote-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.vote-row button {
    padding: 0.2rem 0.55rem;
}
.vote-row button.is-active {
    background: var(--accent-dark);
    box-shadow: 0 0 0 3px rgba(165, 72, 28, 0.18);
}
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr) 4rem;
    grid-template-areas: "previous stage next";
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: rgba(20, 15, 10, 0.88);
}
.lightbox[hidden] {
    display: none;
}
.lightbox.is-fullscreen {
    padding: 0;
    gap: 0;
    background: #050505;
    grid-template-columns: 1fr;
    grid-template-areas: "stage";
}
.lightbox.is-mobile-fullscreen {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    gap: 0;
    background: #050505;
    grid-template-columns: 1fr;
    grid-template-areas: "stage";
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    touch-action: none;
    overscroll-behavior: contain;
}

.lightbox.is-fullscreen figure,
.lightbox.is-mobile-fullscreen figure {
    width: 100%;
    height: 100%;
}

.lightbox.is-fullscreen img,
.lightbox.is-mobile-fullscreen img {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    border-radius: 0;
}

.lightbox.is-fullscreen .lightbox-meta,
.lightbox.is-mobile-fullscreen .lightbox-meta {
    position: absolute;
    inset: auto 1rem 0.7rem;
    max-width: min(58rem, calc(100% - 2rem));
    padding: 0.38rem 0.5rem;
    background: rgba(10, 10, 10, 0.36);
    border-radius: var(--radius, 16px);
    backdrop-filter: blur(8px);
}

.lightbox.is-fullscreen:not(.is-mobile-fullscreen) .lightbox-toolbar > .lightbox-fullscreen-link,
.lightbox.is-fullscreen:not(.is-mobile-fullscreen) .lightbox-toolbar > .lightbox-map-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 2.25rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid #fffdf8;
    border-radius: var(--radius, 16px);
    background: rgba(255, 253, 248, 0.12);
    color: #fffdf8;
    font: inherit;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen) .lightbox-toolbar > .lightbox-map-button[hidden] {
    display: none !important;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen) .lightbox-meta {
    max-width: min(42rem, calc(100% - 2rem));
    padding: 0.32rem 0.48rem;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen) .lightbox-toolbar {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
}

.lightbox.is-fullscreen:not(.is-mobile-fullscreen) .lightbox-toolbar > .lightbox-fullscreen-link,
.lightbox.is-fullscreen:not(.is-mobile-fullscreen) .lightbox-toolbar > .lightbox-map-button {
    width: auto;
    min-width: 0;
    padding: 0.25rem 0.55rem;
    font-size: 0.9rem;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen) .lightbox-toolbar > .lightbox-vote-panel {
    min-height: 1.65rem;
}
.lightbox-fullscreen-button {
    position: absolute;
    top: 1rem;
    left: 1rem;
    min-width: 2.6rem;
}
.lightbox-mobile-fullscreen-button {
    display: none;
    place-items: center;
    position: absolute;
    top: max(1rem, env(safe-area-inset-top));
    left: max(1rem, env(safe-area-inset-left));
    min-width: 3rem;
    min-height: 3rem;
    border-radius: 999px;
    font-size: 1.35rem;
    line-height: 1;
    vertical-align: middle;
}
.lightbox.is-mobile-device .lightbox-fullscreen-button {
    display: none;
}
.lightbox.is-mobile-device .lightbox-mobile-fullscreen-button {
    display: inline-grid;
}
.lightbox figure {
    grid-area: stage;
    display: grid;
    justify-items: center;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
}
.lightbox img {
    display: block;
    margin: 0 auto;
    max-width: min(100%, calc(100vw - 8rem));
    max-height: 78vh;
    object-fit: contain;
    border-radius: var(--radius, 16px);
}
.lightbox-meta {
    display: grid;
    gap: 0.3rem;
    justify-items: center;
    max-width: min(58rem, 100%);
}
.lightbox-meta h2,
.lightbox-description {
    margin: 0;
}
.lightbox-meta h2[hidden],
.lightbox-description[hidden] {
    display: none !important;
}
.lightbox figure {
    margin: 0;
    color: #fffdf8;
    text-align: center;
}
.lightbox-stage-link {
    position: relative;
    display: grid;
    place-items: center;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: zoom-in;
}

.lightbox-stage-link:hover,
.lightbox-stage-link:focus,
.lightbox-stage-link:focus-visible,
.lightbox-stage-link:active {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}
.lightbox-stage-link::-moz-focus-inner {
    border: 0 !important;
}

.lightbox.is-fullscreen .lightbox-stage-link,
.lightbox.is-mobile-fullscreen .lightbox-stage-link {
    width: 100%;
    height: 100%;
    cursor: zoom-out;
}
.lightbox-stage-link > img {
    grid-area: 1 / 1;
}
.lightbox:not(.is-fullscreen):not(.is-mobile-fullscreen) .lightbox-stage-link {
    width: var(--lightbox-stage-width, auto);
    height: var(--lightbox-stage-height, auto);
}
.lightbox:not(.is-fullscreen):not(.is-mobile-fullscreen) .lightbox-stage-link > img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
}
.lightbox-transition-image {
    opacity: 0;
    pointer-events: none;
    transition: opacity 80ms ease;
}
.lightbox-transition-image.is-visible {
    opacity: 1;
}
.lightbox button {
    border-color: #fffdf8;
}
.lightbox-vote {
    justify-content: center;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
}
.lightbox-vote-label {
    min-width: auto;
    color: inherit;
    font-weight: 700;
}
.lightbox-vote-panel {
    display: inline-flex;
    align-items: center;
    align-self: center;
    width: auto;
    transform: none;
    max-width: 100%;
    height: 1.65rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fffdf8;
    border-radius: 0;
    box-shadow: none;
    line-height: 1;
    vertical-align: middle;
}
.lightbox-vote-panel .lightbox-vote {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    height: 1.65rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    line-height: 1;
}
.lightbox-vote-panel .vote-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.16rem;
    min-width: auto;
    height: 1.65rem;
    padding: 0 0.42rem;
    border: 1px solid rgba(255, 253, 248, 0.32);
    background: rgba(255, 253, 248, 0.12);
    color: #fffdf8;
    border-radius: 999px;
    box-shadow: none;
    font-weight: 700;
    font-size: 0.78rem;
}
.lightbox-vote-panel .vote-score-badge strong {
    color: currentColor;
    font-size: 0.82rem;
    line-height: 1;
}
.lightbox-vote-panel .vote-action-group {
    display: inline-flex;
    align-items: center;
    max-width: none;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
    transform: none;
}
.lightbox-vote-panel[hidden] {
    display: none !important;
}
.lightbox-vote-panel .image-vote-overlay {
    position: static;
    left: auto;
    bottom: auto;
    z-index: auto;
    margin: 0;
    transform: none;
}
.lightbox-vote-panel .image-vote-overlay .vote-action-group {
    max-width: none;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
    transform: none;
}
.lightbox-score-badge {
    display: inline-flex;
    align-items: center;
    align-self: center;
    justify-content: center;
    gap: 0.22rem;
    min-width: auto;
    height: 1.65rem;
    padding: 0 0.42rem;
    border: 1px solid rgba(255, 253, 248, 0.32);
    background: rgba(255, 253, 248, 0.12);
    color: #fffdf8;
    border-radius: 999px;
    box-shadow: none;
    font-weight: 700;
    font-size: 0.78rem;
}
.lightbox-score-icon {
    color: currentColor;
    font-size: 0.68rem;
    line-height: 1;
}
.lightbox-score-badge strong {
    color: currentColor;
    font-size: 0.82rem;
    line-height: 1;
}
.lightbox-vote-panel .vote-row {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    height: 1.65rem;
    margin: 0;
    line-height: 1;
}
.lightbox-vote-panel .vote-row span {
    min-width: auto;
}
.lightbox-vote-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    min-width: 1.65rem;
    height: 1.65rem;
    min-height: 1.65rem;
    padding: 0;
    border: 1px solid rgba(255, 253, 248, 0.32);
    background: rgba(255, 253, 248, 0.12);
    color: #fffdf8;
    border-radius: 999px;
    box-shadow: none;
    font-size: 0;
    line-height: 1;
    vertical-align: middle;
}
.lightbox-vote-panel button::before {
    content: "\25B2";
    display: block;
    font-size: 0.72rem;
    line-height: 1;
    transform: translateY(-1px);
}
.lightbox-vote-panel button.is-active {
    border-color: rgba(255, 253, 248, 0.85);
    background: var(--accent);
    color: #fffdf8;
    box-shadow: none;
}
.lightbox-vote-indicator {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.lightbox-vote-indicator.is-up {
    border-color: transparent;
    color: inherit;
}
.lightbox-nav {
    min-width: 3rem;
    min-height: 3rem;
    border-radius: var(--radius, 16px);
    font-size: 1.5rem;
    justify-self: center;
}
.lightbox-previous {
    grid-area: previous;
}
.lightbox-next {
    grid-area: next;
}
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}
.lightbox.is-mobile-device .lightbox-close {
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
}

.lightbox-hud,
.lightbox-meta {
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.lightbox.is-fullscreen .lightbox-hud,
.lightbox.is-fullscreen .lightbox-meta,
.lightbox.is-mobile-fullscreen .lightbox-hud,
.lightbox.is-mobile-fullscreen .lightbox-meta {
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.35rem);
}

.lightbox.is-fullscreen.is-ui-visible .lightbox-hud,
.lightbox.is-fullscreen.is-ui-visible .lightbox-meta,
.lightbox.is-mobile-fullscreen.is-ui-visible .lightbox-hud,
.lightbox.is-mobile-fullscreen.is-ui-visible .lightbox-meta {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen).is-map-split figure {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(560px, 38vw);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen).is-map-split .lightbox-stage-link {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    align-self: stretch;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen).is-map-split .lightbox-stage-link img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen).is-map-split .lightbox-meta {
    position: static;
    inset: auto;
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    justify-self: center;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen).is-map-split .lightbox-map-split {
    position: relative;
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border-left: 1px solid rgba(255, 253, 248, 0.18);
    background: transparent;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen).is-map-split .lightbox-map-split[hidden] {
    display: none !important;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen).is-map-split .lightbox-map-split-title {
    display: none !important;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen).is-map-split .lightbox-map-split-canvas {
    grid-row: 1;
    min-height: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen).is-map-split .lightbox-map-split-canvas .leaflet-container {
    width: 100%;
    height: 100%;
}

.lightbox.is-fullscreen:not(.is-mobile-fullscreen).is-map-split .lightbox-map-split-canvas .leaflet-container img,
.lightbox.is-fullscreen:not(.is-mobile-fullscreen).is-map-split .lightbox-map-split-canvas .leaflet-container .leaflet-tile {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    filter: none;
    max-height: none;
    max-width: none;
    object-fit: initial;
    opacity: 1;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen).is-map-split .lightbox-map-split-canvas .leaflet-tile-loaded {
    opacity: 1 !important;
}
.lightbox.is-fullscreen:not(.is-mobile-fullscreen).is-map-split .lightbox-map-split-close {
    position: absolute;
    z-index: 2;
    top: 0.75rem;
    right: 0.75rem;
    justify-self: end;
    margin: 0;
}

.lightbox.is-fullscreen .lightbox-nav,
.lightbox.is-mobile-fullscreen .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox.is-fullscreen .lightbox-previous,
.lightbox.is-mobile-fullscreen .lightbox-previous {
    left: 1rem;
}

.lightbox.is-fullscreen .lightbox-next,
.lightbox.is-mobile-fullscreen .lightbox-next {
    right: 1rem;
}

.lightbox.is-fullscreen figure a,
.lightbox.is-mobile-fullscreen figure a {
    width: 100%;
    height: 100%;
}
body.has-mobile-lightbox {
    overflow: hidden;
}
.has-lightbox {
    overflow: hidden;
}

