.photo-single-leaflet-popup .leaflet-popup-content {
    margin: 4px 5px 7px;
}

.photo-single-centered-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1100;
    margin: 0;
    transform: translate(-50%, -50%);
}

.photo-single-centered-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(21, 31, 21, 0.28);
}

.photo-single-leaflet-popup .leaflet-popup-tip-container {
    display: none;
}

.leaflet-container .photo-single-leaflet-popup a.leaflet-popup-close-button,
.photo-single-centered-popup .leaflet-popup-close-button {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 12;
    display: grid;
    width: 28px;
    height: 28px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(20, 31, 20, 0.18);
    border-radius: 7px;
    background: #ffffff;
    color: transparent;
    font-size: 0;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(21, 31, 21, 0.24);
    cursor: pointer;
}

.leaflet-container .photo-single-leaflet-popup a.leaflet-popup-close-button::before,
.leaflet-container .photo-single-leaflet-popup a.leaflet-popup-close-button::after,
.photo-single-centered-popup .leaflet-popup-close-button::before,
.photo-single-centered-popup .leaflet-popup-close-button::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 2px;
    border-radius: 999px;
    background: #162016;
}

.leaflet-container .photo-single-leaflet-popup a.leaflet-popup-close-button::before,
.photo-single-centered-popup .leaflet-popup-close-button::before {
    transform: rotate(45deg);
}

.leaflet-container .photo-single-leaflet-popup a.leaflet-popup-close-button::after,
.photo-single-centered-popup .leaflet-popup-close-button::after {
    transform: rotate(-45deg);
}

.leaflet-container .photo-single-leaflet-popup a.leaflet-popup-close-button:hover,
.leaflet-container .photo-single-leaflet-popup a.leaflet-popup-close-button:focus-visible,
.photo-single-centered-popup .leaflet-popup-close-button:hover,
.photo-single-centered-popup .leaflet-popup-close-button:focus-visible {
    background: #f6fbf7;
    color: transparent;
    outline: 2px solid rgba(45, 127, 249, 0.58);
    outline-offset: 2px;
}

.photo-map-popup {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: min(264px, calc(100vw - 96px));
    max-width: min(264px, calc(100vw - 96px));
    color: #162016;
    font-size: 12px;
}

.photo-map-popup-date-row {
    align-items: stretch;
}

.photo-map-date-badge {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid rgba(37, 111, 84, 0.22);
    border-radius: 8px;
    background: linear-gradient(180deg, #f5fbf7 0%, #e7f4ed 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 18px rgba(37, 111, 84, 0.12);
    color: #173b2d;
    line-height: 1.15;
}

.photo-map-date-main,
.photo-map-date-weekday {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-map-date-main {
    font-size: 13px;
    font-weight: 850;
}

.photo-map-date-weekday {
    color: #256f54;
    font-size: 11px;
    font-weight: 760;
    text-transform: uppercase;
}

.photo-map-thumb {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-self: stretch;
    overflow: hidden;
    appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
    cursor: zoom-in;
}

.photo-map-thumb img {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    object-fit: cover;
    background: #dfe7dd;
}

.photo-map-popup > * {
    min-width: 0;
    max-width: 100%;
}

.photo-map-popup-row {
    display: flex;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.photo-map-popup-public-row {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    overflow: visible;
}

.photo-public-control {
    display: flex;
    width: auto;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.photo-public-control [hidden] {
    display: none;
}

.photo-public-button,
.photo-private-button,
.photo-public-badge,
.photo-gallery-public-button,
.photo-gallery-public-badge {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    max-width: 100%;
    padding: 0 8px;
    border: 1px solid rgba(20, 31, 20, 0.14);
    border-radius: 8px;
    background: #ffffff;
    color: #162016;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.photo-public-button,
.photo-private-button,
.photo-public-badge,
.photo-gallery-public-button,
.photo-gallery-public-badge {
    cursor: pointer;
}

.photo-public-button:hover,
.photo-public-button:focus-visible,
.photo-private-button:hover,
.photo-private-button:focus-visible,
.photo-public-badge:hover,
.photo-public-badge:focus-visible,
.photo-gallery-public-button:hover,
.photo-gallery-public-button:focus-visible,
.photo-gallery-public-badge:hover,
.photo-gallery-public-badge:focus-visible {
    background: #f6fbf7;
    outline: 2px solid rgba(33, 104, 58, 0.3);
    outline-offset: 2px;
}

.photo-public-button:disabled,
.photo-private-button:disabled,
.photo-gallery-public-button:disabled {
    cursor: wait;
    opacity: 0.82;
}

.photo-public-badge,
.photo-gallery-public-badge {
    border-color: rgba(20, 31, 20, 0.14);
    background: #ffffff;
    color: #256f54;
}

.photo-map-popup-public-row .photo-public-button,
.photo-map-popup-public-row .photo-private-button,
.photo-map-popup-public-row .photo-public-badge {
    width: auto;
    min-width: 58px;
    max-width: 112px;
}

.photo-map-popup-public-row .photo-public-button,
.photo-map-popup-public-row .photo-private-button {
    font-size: 11px;
}

.photo-map-popup-public-row .photo-public-control .photo-public-badge,
.photo-map-popup-public-row .photo-public-control .photo-private-button {
    flex: 0 0 auto;
}

.photo-map-popup-public-row .photo-private-button {
    max-width: 118px;
}

.photo-map-popup .photo-share-button,
.photo-map-popup .photo-copy-button,
.photo-map-popup-public-row > .photo-public-button,
.photo-map-popup-public-row > .photo-private-button,
.photo-map-popup-public-row > .photo-public-badge,
.photo-map-popup-public-row > .photo-public-control {
    transform: translateX(50%);
}

.photo-map-popup-coordinates,
.photo-map-popup-views {
    color: #465247;
}

.photo-map-popup-views {
    justify-content: flex-start;
    gap: 8px;
}

.photo-map-popup-coordinates span,
.photo-map-popup-views span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-map-popup-coordinates span {
    flex: 0 0 auto;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.photo-gallery-link-button {
    box-sizing: border-box;
    display: grid;
    width: 34px;
    min-width: 34px;
    height: 26px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(2, 94, 84, 0.28);
    border-radius: 7px;
    background: linear-gradient(180deg, #55f3df 0%, #12bfae 58%, #079889 100%);
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(5, 90, 86, 0.24), inset 0 2px 4px rgba(255, 255, 255, 0.36), inset 0 -3px 5px rgba(4, 104, 98, 0.18);
    text-decoration: none;
}

.photo-gallery-link-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.photo-gallery-link-button:hover,
.photo-gallery-link-button:focus-visible {
    box-shadow: 0 8px 18px rgba(5, 90, 86, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.42), inset 0 -3px 5px rgba(4, 104, 98, 0.2);
    outline: 2px solid rgba(18, 191, 174, 0.32);
    outline-offset: 2px;
}

.photo-share-button,
.photo-copy-button {
    display: grid;
    width: 58px;
    min-width: 58px;
    height: 30px;
    padding: 0 8px;
    place-items: center;
    border: 1px solid rgba(20, 31, 20, 0.14);
    border-radius: 8px;
    background: #ffffff;
    color: #162016;
    box-shadow: 0 10px 24px rgba(21, 31, 21, 0.24), 0 2px 6px rgba(21, 31, 21, 0.16);
    font: inherit;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

.photo-share-button[data-default-label="↗"],
.photo-map-popup-public-row .photo-public-button,
.photo-map-popup-public-row .photo-private-button,
.photo-map-popup-public-row .photo-public-badge {
    box-shadow: 0 10px 24px rgba(21, 31, 21, 0.24), 0 2px 6px rgba(21, 31, 21, 0.16);
}

.photo-map-popup .photo-share-button:hover,
.photo-map-popup .photo-share-button:focus-visible,
.photo-map-popup .photo-copy-button:hover,
.photo-map-popup .photo-copy-button:focus-visible,
.photo-map-popup-public-row .photo-public-button:hover,
.photo-map-popup-public-row .photo-public-button:focus-visible,
.photo-map-popup-public-row .photo-private-button:hover,
.photo-map-popup-public-row .photo-private-button:focus-visible,
.photo-map-popup-public-row .photo-public-badge:hover,
.photo-map-popup-public-row .photo-public-badge:focus-visible {
    box-shadow: 0 14px 30px rgba(21, 31, 21, 0.28), 0 3px 8px rgba(21, 31, 21, 0.18);
}

.photo-map-popup-date-row .photo-share-button {
    align-self: center;
}

.photo-share-button[data-default-label="↗"],
.photo-copy-button[data-default-label="🌐"] {
    font-size: 17px;
}

.photo-map-share-status {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 6;
    max-width: calc(100% - 16px);
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(22, 32, 22, 0.92);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(21, 31, 21, 0.22);
    pointer-events: none;
}

.photo-map-share-status[hidden] {
    display: none;
}

.photo-share-button:disabled,
.photo-copy-button:disabled {
    cursor: wait;
    opacity: 0.9;
}

.photo-map-popup--compact {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas:
        "thumb date"
        "thumb coords"
        "thumb views"
        "public public";
    gap: 7px 10px;
    width: min(318px, calc(100vw - 76px));
    max-width: min(318px, calc(100vw - 76px));
    padding: 2px;
}

.photo-map-popup--compact .photo-map-thumb {
    grid-area: thumb;
    align-self: stretch;
}

.photo-map-popup--compact .photo-map-thumb img {
    width: 96px;
    height: 124px;
    aspect-ratio: auto;
    border-radius: 8px;
}

.photo-map-popup--compact .photo-map-popup-date-row {
    grid-area: date;
    gap: 6px;
}

.photo-map-popup--compact .photo-map-date-badge {
    padding: 6px 7px;
    border-radius: 7px;
}

.photo-map-popup--compact .photo-map-date-main {
    font-size: 11px;
}

.photo-map-popup--compact .photo-map-date-weekday {
    font-size: 9px;
}

.photo-map-popup--compact .photo-map-popup-coordinates {
    grid-area: coords;
    gap: 6px;
}

.photo-map-popup--compact .photo-map-popup-views {
    grid-area: views;
}

.photo-map-popup--compact .photo-map-popup-public-row {
    grid-area: public;
    padding-top: 1px;
}

.photo-map-popup--compact .photo-share-button,
.photo-map-popup--compact .photo-copy-button {
    width: 40px;
    min-width: 40px;
    height: 28px;
}

.photo-map-popup--compact .photo-share-button,
.photo-map-popup--compact .photo-copy-button,
.photo-map-popup--compact .photo-map-popup-public-row > .photo-public-button,
.photo-map-popup--compact .photo-map-popup-public-row > .photo-private-button,
.photo-map-popup--compact .photo-map-popup-public-row > .photo-public-badge,
.photo-map-popup--compact .photo-map-popup-public-row > .photo-public-control {
    transform: none;
}

.photo-map-popup--compact .photo-map-popup-coordinates span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-map-popup--spotlight {
    gap: 0;
    width: min(304px, calc(100vw - 76px));
    max-width: min(304px, calc(100vw - 76px));
    overflow: hidden;
    border-radius: 12px;
    background: #18211d;
    color: #eef7f0;
}

.photo-map-popup--spotlight > *:not(.photo-map-thumb) {
    margin-right: 12px;
    margin-left: 12px;
}

.photo-map-popup--spotlight .photo-map-thumb {
    margin: 0;
}

.photo-map-popup--spotlight .photo-map-thumb img {
    aspect-ratio: 16 / 11;
    border-radius: 0;
    background: #0f1714;
}

.photo-map-popup--spotlight .photo-map-popup-date-row {
    margin-top: 12px;
}

.photo-map-popup--spotlight .photo-map-date-badge {
    border-color: rgba(139, 213, 188, 0.24);
    background: rgba(238, 247, 240, 0.08);
    box-shadow: none;
    color: #f8fff9;
}

.photo-map-popup--spotlight .photo-map-date-weekday {
    color: #8bd5bc;
}

.photo-map-popup--spotlight .photo-map-popup-coordinates,
.photo-map-popup--spotlight .photo-map-popup-views {
    color: #c8d6ce;
}

.photo-map-popup--spotlight .photo-map-popup-public-row {
    padding-top: 10px;
    padding-bottom: 12px;
}

.photo-map-popup--spotlight .photo-share-button,
.photo-map-popup--spotlight .photo-copy-button,
.photo-map-popup--spotlight .photo-public-button,
.photo-map-popup--spotlight .photo-private-button,
.photo-map-popup--spotlight .photo-public-badge {
    border-color: rgba(238, 247, 240, 0.18);
    background: #eef7f0;
    color: #18211d;
}

.photo-map-popup--spotlight .photo-gallery-link-button {
    border-color: rgba(139, 213, 188, 0.38);
    background: linear-gradient(180deg, #8bd5bc 0%, #30a98a 100%);
}

.photo-map-popup--spotlight .photo-map-share-status {
    background: rgba(238, 247, 240, 0.94);
    color: #18211d;
}

.photo-map-popup--1 {
    gap: 10px;
    width: min(340px, 90vw);
    max-width: min(340px, 90vw);
    padding: 2px;
}

.photo-map-popup--1 .photo-map-thumb img {
    width: 100%;
    height: auto;
    max-height: min(430px, 58vh);
    aspect-ratio: auto;
    object-fit: contain;
    border-radius: 8px;
    background: #eef2ed;
}

.photo-map-popup--1 .photo-map-date-badge {
    padding: 9px 11px;
    border-radius: 9px;
}

.photo-map-popup--1 .photo-map-date-subline {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.photo-map-popup--1 .photo-map-views-inline {
    flex: 0 0 auto;
    color: #465247;
    font-size: 11px;
    font-weight: 760;
    line-height: 1.15;
    white-space: nowrap;
}

.photo-map-popup--1 .photo-map-popup-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 4px 4px;
}

.photo-map-popup--1 .photo-map-popup-action-button,
.photo-map-popup--1 .photo-gallery-link-button {
    flex: 0 0 36px;
    width: 36px;
    min-width: 36px;
    height: 34px;
    border-radius: 8px;
}

.photo-map-popup--1 .photo-map-popup-link-button {
    font-size: 17px;
}

.photo-map-popup--1 .photo-gallery-link-button svg {
    width: 19px;
    height: 19px;
}

.photo-map-popup--1 .photo-map-popup-public-action {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
}

.photo-map-popup--1 .photo-public-control {
    justify-content: flex-end;
}

.photo-map-popup--1 .photo-public-button,
.photo-map-popup--1 .photo-private-button,
.photo-map-popup--1 .photo-public-badge {
    min-height: 34px;
    max-width: 128px;
}

.photo-map-popup--1 .photo-share-button,
.photo-map-popup--1 .photo-copy-button,
.photo-map-popup--1 .photo-map-popup-public-row > .photo-public-button,
.photo-map-popup--1 .photo-map-popup-public-row > .photo-private-button,
.photo-map-popup--1 .photo-map-popup-public-row > .photo-public-badge,
.photo-map-popup--1 .photo-map-popup-public-row > .photo-public-control {
    transform: none;
}

@media (max-width: 360px) {
    .photo-map-popup--1 .photo-map-popup-actions {
        gap: 6px;
    }

    .photo-map-popup--1 .photo-map-popup-action-button,
    .photo-map-popup--1 .photo-gallery-link-button {
        flex-basis: 32px;
        width: 32px;
        min-width: 32px;
        height: 32px;
    }

    .photo-map-popup--1 .photo-public-button,
    .photo-map-popup--1 .photo-private-button,
    .photo-map-popup--1 .photo-public-badge {
        padding: 0 7px;
        font-size: 11px;
    }
}
