* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html,
body {
    width: 100%;
    height: 100%;
}


body {
    font-family: "Inter", sans-serif;

    background: white;
    color: #111;

    overflow: hidden;
}


/* Main layout */

.exhibition-layout {
    display: grid;

    grid-template-columns: 1fr 2fr;

    width: 100%;
    height: 100vh;
}


/* -------------------------
   LEFT COLUMN
------------------------- */

.exhibition-info {
    position: relative;

    height: 100vh;

    padding: 32px;

    background: white;

    border-right: 1px solid rgba(0, 0, 0, .15);
}


/* Main text */

.exhibition-text {
    max-width: 390px;

    font-size: .9rem;
    font-weight: 300;
    line-height: 1.55;
}

.exhibition-text p {
    margin-bottom: 1.2rem;
}

.exhibition-meta {
    margin-bottom: 2.2rem !important;

    font-size: .75rem;
    font-weight: 400;
    line-height: 1.5;

    letter-spacing: .05em;
}

.participation-text {
    margin-top: 2rem;

    font-weight: 400;
}


/* -------------------------
   BOTTOM-LEFT IDENTITY
------------------------- */

.exhibition-identity {
    position: absolute;

    left: 32px;
    bottom: 40px;

    display: flex;
    align-items: center;

    gap: 14px;

    max-width: calc(100% - 64px);

    color: #111;
    text-decoration: none;
}


.site-logo {
    display: block;

    width: 50px;
    height: auto;

    flex-shrink: 0;
}


.identity-text {
    display: flex;
    flex-direction: column;

    gap: 3px;
}


.identity-title {
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.1;
}


.identity-subtitle {
    font-size: .75rem;
    font-weight: 300;
    line-height: 1.2;
}


.exhibition-identity:hover .identity-title {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}


/* -------------------------
   MAP
------------------------- */

.map-section {
    position: relative;

    width: 100%;
    height: 100vh;

    background: #ddd;
}


#exhibition-map {
    width: 100%;
    height: 100%;
}

.leaflet-tile-pane {
    filter:
        grayscale(80%)
        contrast(85%)
        brightness(108%);

    opacity: .9;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: none !important;
}

.leaflet-control-zoom a {
    background: white !important;
    color: #111 !important;

    border: 1px solid #111 !important;

    font-family: "Inter", sans-serif;
    font-weight: 300;
}

.leaflet-control-attribution {
    background: rgba(255,255,255,.8) !important;

    font-family: "Inter", sans-serif;
    font-size: 9px;
}

/* Make Leaflet typography fit site */

.leaflet-container {
    font-family: "Inter", sans-serif;
}


/* -------------------------
   MOBILE
------------------------- */

@media (max-width: 800px) {

    body {
        overflow-y: auto;
    }

    .exhibition-layout {
        display: block;

        height: auto;
    }

    @media (max-width: 800px) {

    .photo-popup {
        width: 78vw;
    }

    .photo-popup img {
        max-height: 65vh;
    }

}

    .exhibition-info {
        min-height: 60vh;
        height: auto;

        padding: 24px;

        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, .15);
    }


    .exhibition-text {
        max-width: none;

        padding-bottom: 120px;
    }


    .exhibition-identity {
        left: 24px;
        bottom: 24px;

        max-width: calc(100% - 48px);
    }


    .site-logo {
        width: 44px;
    }


    .identity-title {
        font-size: 1rem;
    }


    .map-section {
        width: 100%;
        height: 65vh;
    }

}

/* -------------------------
   CONTRIBUTION POPUP
------------------------- */

.contribution-popup .leaflet-popup-content-wrapper {
    border-radius: 0;

    box-shadow: none;

    border: 1px solid #111;

    background: white;
}

.contribution-popup .leaflet-popup-tip {
    background: white;
    box-shadow: none;
}

.contribution-popup .leaflet-popup-content {
    margin: 18px;

    font-family: "Inter", sans-serif;
}


.contribution-form {
    width: 220px;
}

.contribution-heading {
    margin-bottom: 6px;

    font-size: 1rem;
    font-weight: 400;
}

.contribution-location {
    margin-bottom: 18px;

    font-size: .65rem;
    font-weight: 300;

    color: #777;
}


.contribution-form label {
    display: block;

    margin-top: 12px;
    margin-bottom: 4px;

    font-size: .7rem;
    font-weight: 400;
}


.contribution-form input[type="text"],
.contribution-form input[type="date"] {
    width: 100%;

    padding: 7px;

    border: 1px solid #aaa;
    border-radius: 0;

    background: white;

    font-family: "Inter", sans-serif;
    font-size: .75rem;
}


.contribution-form input[type="file"] {
    width: 100%;

    font-family: "Inter", sans-serif;
    font-size: .7rem;
}


.contribution-form input[type="file"]::file-selector-button {
    padding: 7px 10px;

    margin-right: 8px;

    border: 1px solid #111;
    border-radius: 0;

    background: white;
    color: #111;

    font-family: "Inter", sans-serif;

    cursor: pointer;
}


#contribution-submit {
    width: 100%;

    margin-top: 18px;
    padding: 9px;

    border: 1px solid #111;
    border-radius: 0;

    background: #111;
    color: white;

    font-family: "Inter", sans-serif;
    font-size: .75rem;

    cursor: pointer;
}


#contribution-submit:hover {
    background: white;
    color: #111;
}


.contribution-error {
    margin-top: 8px;

    font-size: .7rem;

    color: red;
}


/* -------------------------
   PHOTO MARKERS
------------------------- */

.photo-marker {
    background: none;
    border: none;
}

.photo-marker img {
    width: 52px;
    height: 52px;

    display: block;

    object-fit: cover;

    border: 2px solid white;

    box-shadow: 0 0 0 1px #111;
}

.photo-marker,
.photo-marker img {
    cursor: none !important;
}

.map-cursor.over-photo .map-cursor-label {
    display: none;
}

/* -------------------------
   PHOTO POPUP
------------------------- */
/* Large photograph popup */

.photo-viewer-popup .leaflet-popup-content-wrapper {
    border-radius: 0;
    box-shadow: none;

    background: white;

    padding: 0;
}

.photo-viewer-popup .leaflet-popup-content {
    margin: 0;

    width: auto !important;
}

.photo-viewer-popup .leaflet-popup-tip {
    background: white;
    box-shadow: none;
}

.photo-popup {
    width: min(45vw, 850px);
    
    padding: 14px;

    box-sizing: border-box;
}

.photo-popup img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;

    background: white;
}

.photo-caption {
    padding: 12px 14px 14px;
}

.photo-name {
    font-size: .8rem;
    font-weight: 400;
}

.photo-date {
    margin-top: 2px;

    font-size: .7rem;
    font-weight: 300;

    color: #666;
}

/* -------------------------
   CUSTOM MAP CURSOR
------------------------- */

#exhibition-map {
    cursor: none;
}

.map-cursor {
    position: fixed;

    left: 0;
    top: 0;

    z-index: 9999;

    display: flex;
    align-items: center;

    gap: 8px;

    pointer-events: none;

    opacity: 0;

    transform: translate(-9px, -9px);

    transition: opacity .15s ease;
}

.map-cursor.visible {
    opacity: 1;
}

.map-cursor-dot {
    width: 9px;
    height: 9px;

    flex-shrink: 0;

    border-radius: 50%;

    background: red;
}

.map-cursor-label {
    padding: 5px 7px;

    background: white;
    color: #111;

    border: 1px solid #111;

    font-family: "Inter", sans-serif;
    font-size: .65rem;
    font-weight: 400;

    white-space: nowrap;
}


/* Keep normal cursor over map controls and popups */

.leaflet-control,
.leaflet-popup {
    cursor: auto;
}


/* No custom cursor on touch devices */

@media (hover: none) {

    #exhibition-map {
        cursor: auto;
    }

    .map-cursor {
        display: none;
    }
}
