
html, body {
    height: 100%;
    margin: 0;
    background-color: #3663A9;
    display: flex;
    justify-content: center; /* Centers the content horizontally */
    align-items: center;     /* Centers the content vertically */
}

.app-container {
    width: 733px;
    height: 612px;
    overflow: hidden;
    display: flex;           /* Optional, if you want content inside the app-container to be centered too */
    max-width: 100%;
    max-height: 100%;
}

#map {
    width: 100%;
    height: 100%;
}


.open-sans {
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
        "wdth" 100;
}


.maplibregl-popup-content {
    width: 290px;           /* or whatever fixed width you want */
    max-width: 80vw;        /* prevents it from shrinking */
    padding: 0px;             /* optional: clean edges */
    box-sizing: border-box; /* make padding behave predictably */
    border-radius: 4px;
}


.artwork-popup {
    font-family: "Open Sans";
    font-kerning: auto;
    font-optical-sizing: auto;
    padding: 15px 10px 30px;
    overflow: auto;
    
}

.artwork-popup .popup-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}

.artwork-popup .artwork-subtitle {
    display: flex;
    gap: 0.5em;
    font-size: 16px;
    margin-bottom: 4px;
}

.artwork-popup .popup-left-subtitle {
    font-weight: 800;
    font-style: italic;
}

.artwork-popup .popup-right-subtitle {
    margin: 0;
    font-weight: normal;
}

.artwork-popup .popup-strong {
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 14px;
}

.artwork-popup .popup-description {
    font-size: 14px;
}


/* The modal container */
.modal {
    display: none;              /* Keep this for default state */
    justify-content: center;    /* Center horizontally */
    align-items: center;        /* Center vertically */
    
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    
    overflow: auto;
    background-color: rgba(0,0,0,0.85);
}

/* The modal images */
#modalImage {  
    max-width: 80vw;    /* max width = 50% of viewport width */
    max-height: 80vh;   /* max height = 50% of viewport height */
    width: auto;
    height: auto;
    object-fit: contain; /* Ensures image aspect ratio is maintained */
}

/* image counter */
#caption {
    color: #ccc;
    padding: 10px;
    position: absolute;
          
    bottom: 15px; /* Centered at the bottom for better responsiveness */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap; /* Prevents caption from wrapping */
}


/* Modal Controls: Close, Prev, Next */
.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%); /* Vertically centers the arrows */
    color: white;
    font-size: 40px;
    padding: 16px;
    user-select: none;
    transition: 0.3s;
}

.prev {
    left: 1rem;
}

.next {
    right: 1rem;
}


.close:hover, .prev:hover, .next:hover {
    color: #f1f1f1;
    opacity: 0.8
}


/* Media queries for resonsiveness */
/* On smaller tablets and mobile, allow the map container to fill the screen
/*
@media (max-width: 768px) {
    
    .app-container {
        width: 100%;
        height: 100%;
    }
} 
*/ 

@media (max-width: 500px) {
    .visual-distance {
        width: 100%;
        text-align: center;
        margin: 10px ;
    }

    /* Reduce padding and font size of controls on small screens */
    .prev, .next {
        font-size: 32px;
        padding: 8px;
    }

}