/* #### FONTS #### */

@font-face {
    font-family: "Montserrat";
    src: url("Montserrat-Regular.ttf") format("truetype");
    font-display: swap;
}


/* #### OUTER PAGE ELEMENTS #### */

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Montserrat', Arial, sans-serif;
}

/* NOTE: The following classes are assigned to the parent of the map and location 
   detail panel to trigger an appropriate layout for the type of detail view shown

   .with-location-detail-single
   .with-location-detail-closest-pannel
   .with-location-detail-multi

   .with-location-detail-hidden
*/

/* #### LOCATION DETAIL PANNEL (sidebar) #### */

#page-content-container #location-detail-panel-container {
    width: 425px;
    height: 100%;
    left: 0;
    top: 0;
    position: fixed;
    display: block;
    box-shadow: 6px 0 12px -6px rgb(0 0 0 / 15%);
    z-index: 1;
    box-sizing: border-box;
    overflow-y: scroll;
}

#page-content-container.with-location-detail-closest-pannel #location-detail-panel-container,
#page-content-container.with-location-detail-multi #location-detail-panel-container,
#page-content-container.with-location-detail-single #location-detail-panel-container {
    display: block;
}

#page-content-container.with-location-detail-hidden #location-detail-panel-container {
    display: none;
}

/* #page-content-container.with-location-detail-panel #location-detail-panel-container {
    display: block;
} */

@media (max-width: 1024px) {
    #page-content-container #location-detail-panel-container {
        display: none;
    }

    #page-content-container.with-location-detail-multi #location-detail-panel-container,
    #page-content-container.with-location-detail-single #location-detail-panel-container {
        display: block !important;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
        background-color: white;
    }

    /* #page-content-container.with-location-detail-panel #location-detail-panel-container, */
    #page-content-container.with-location-detail-closest-pannel #location-detail-panel-container {
        display: None;
    }
}

/* #### LOCATION DETAILS PANEL HEADER #### */

#location-detail-panel-header-container {
    display: flex;
    flex-direction: column;
    padding: 24px 24px 0 24px;
    width: 100%;
    box-sizing: border-box;
    min-height: 63px;
}

/* #### LOCATION DETAILS PANNEL HEADER TEXT #### */

#location-detail-panel-header {
    display: none;
    flex: 1;
    flex-grow: 1;
}

#page-content-container.with-location-detail-closest-pannel 
        #location-detail-panel-container 
        #location-detail-panel-header-container 
        #location-detail-panel-header,
#page-content-container.with-location-detail-multi
        #location-detail-panel-container 
        #location-detail-panel-header-container 
        #location-detail-panel-header {
    display: block;
}

/* #### LOCATION DETAILS PANNEL CLOSE BUTTON #### */

.location-detail-panel-container-close-btn {
    cursor: pointer;
    display: none;
    text-align: right;
    flex: 1;
    flex-grow: 1;
    min-width: 70px;
}

.location-detail-panel-container-close-btn::after {
    content: 'X';
}

#page-content-container.with-location-detail-single 
        #location-detail-panel-container 
        #location-detail-panel-header-container
        .location-detail-panel-container-close-btn,
#page-content-container.with-location-detail-multi 
        #location-detail-panel-container
        #location-detail-panel-header-container 
        .location-detail-panel-container-close-btn,
#page-content-container.with-location-detail-closest-pannel 
        #location-detail-panel-container
        #location-detail-panel-header-container 
        .location-detail-panel-container-close-btn {
    display: block;
}

#page-content-container.with-location-detail-single 
        #location-detail-panel-container
        #location-detail-panel-header-container
        .location-detail-panel-container-close-btn::after,
#page-content-container.with-location-detail-multi 
        #location-detail-panel-container
        #location-detail-panel-header-container
        .location-detail-panel-container-close-btn::after,
#page-content-container.with-location-detail-closest-pannel 
        #location-detail-panel-container 
        #location-detail-panel-header-container 
        .location-detail-panel-container-close-btn::after {
    content: 'Show all';
}

@media (max-width: 1024px) {
    .location-detail-panel-container-close-btn {
        display: block;
    }

    #page-content-container.with-location-detail-single 
            #location-detail-panel-container 
            #location-detail-panel-header-container 
            .location-detail-panel-container-close-btn::after,
    #page-content-container.with-location-detail-multi 
            #location-detail-panel-container 
            #location-detail-panel-header-container 
            .location-detail-panel-container-close-btn::after,
    #page-content-container.with-location-detail-closest-pannel 
            #location-detail-panel-container 
            #location-detail-panel-header-container 
            .location-detail-panel-container-close-btn::after {
        content: 'X';
    }
}

/* #### LOCATION DETAILS PANNEL CONTENT CONTAINER #### */

#page-content-container #location-detail-panel-container #location-detail-panel-inner-container {
    display: flex;
    flex-direction: column;
}

#page-content-container 
        #location-detail-panel-container 
        #location-detail-panel-inner-container 
        #location-detail-panel-items-list-container:first-child {
    padding-top: 0;
}

/* #### LOCATION DETAIL PANNEL ITEM #### */

.location-detail-item-wrapper {
    border-bottom: 1px solid #e4e4e6;
    padding: 24px;
}

.location-detail-item-wrapper:first-of-type {
    padding-top: 0;
}

.location-detail-item-wrapper .location-detail-item-header {
    font-weight: 600;
    line-height: 1.25;
    color: #002664;
    font-size: 1.25rem;
    margin: .75rem 0;
    cursor: pointer;
}

.location-detail-item-wrapper .location-detail-item-sub-header {
    font-weight: 600;
    line-height: 1.25;
    color: #000;
    margin: .75rem 0;
    display: block;
}

.location-detail-item-wrapper .location-detail-item-highlight {
    font-weight: bold;
    color: #000;
}

.location-detail-item-wrapper .location-detail-item-advice-item-wrapper {
    margin: 10px 0;
}

.location-detail-item-wrapper .location-detail-item-advice-item-wrapper .location-detail-item-advice-item-time-text {
    margin: 1px;
}

.location-detail-item-wrapper .location-detail-item-advice-container:last-child {
    margin-bottom: 0;
}

/* #### MAP #### */

#map-container {
    position: absolute;
    height: 100%;
    left: 425px;
    right: 0;
    box-sizing: border-box;
}

#page-content-container.with-location-detail-closest-pannel #map-container,
#page-content-container.with-location-detail-single #map-container,
#page-content-container.with-location-detail-multi #map-container {
/* #page-content-container.with-location-detail-panel #map-container { */
    left: 425px;
}

#page-content-container.with-location-detail-hidden #map-container {
    left: 0;
}

@media (max-width: 1024px) {
    #map-container {
        left: 0;
    }

    #page-content-container.with-location-detail-closest-pannel #map-container,
    #page-content-container.with-location-detail-single #map-container,
    #page-content-container.with-location-detail-multi #map-container {
    /* #page-content-container.with-location-detail-panel #map-container { */
        left: 0;
    }
}

/* #### POPUP #### */

.popup-container {
    font-family: 'Montserrat', Arial, sans-serif;
    max-width: 392px;
}

.popup-text {
    font-size: 1rem;
    line-height: 1.5;
}

.popup-header {
    line-height: 1.25;
    font-weight: 600;
    font-size: 20px;
}

.popup-sub-header {
    line-height: 1.25;
    font-weight: bold;
    font-size: 1rem;
}

.popup-addr-container {
    line-height: 1.25;
    padding: 0;
}

.popup-addr-item {
    line-height: 1.25;
    padding: 0;
    margin: 0;
}

@media (max-width: 1024px) {
    .mapboxgl-popup {
        display: None;
    }
}