body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

@font-face {
    src: url('/fonts/Unica77MonoLowLLWeb-Regular.woff2') format('woff2');
    font-family: 'Unica-77-Mono';
    font-weight: normal;
    font-style: normal;
}

@font-face {
    src: url('/fonts/Unica77LLWeb-Bold.woff2') format('woff2');
    font-family: 'Unica-77';
    font-weight: 600;
    font-style: normal;
}

#map {
    position: relative;
    width: 100%;
    height: 100vh;
    font-size: 14px;
}

/* Hide default Mapbox attribution but keep custom ones */
.mapboxgl-ctrl-bottom-right {
    display: flex;
    flex-direction: column;
}

.mil-interactive-heading {
    font-weight: 600;
    line-height: 125%;
    font-size: 18px;
    font-family: Unica-77, sans-serif;
}

.mil-interactive-text {
    font-weight: 200;
    line-height: 140%;
}

#sidebar {
    position: absolute;
    bottom: 16px;
    right: 0;
    height: auto;
    max-height: 50%;
    background-color: #f9f9f9;
    width: 45%;
    max-width: none;
    box-sizing: border-box;
    font-size: 14px;
    overflow: scroll;
    overflow-x: hidden;
    border-radius: 8px;
    padding: 16px;
    margin: 16px;
    color: #333;
    box-shadow: 0px 2px 12px rgba(51, 51, 51, 0.2);
    font-family: Unica-77-Mono, sans-serif;
    z-index: 5;
    display: none !important;
}

#legend-card {
    position: absolute;
    top: 0;
    right: 0;
    height: auto;
    background-color: #f9f9f9;
    width: 30%;
    box-sizing: border-box;
    font-size: 14px;
    border-radius: 8px;
    padding: 16px;
    margin: 16px;
    color: #333;
    box-shadow: 0px 2px 12px rgba(51, 51, 51, 0.2);
    font-family: Unica-77-Mono, sans-serif;
    z-index: 5;
}

#sidebar.active {
    display: block !important;
}

#sidebar.active #info-wrapper {
    display: block !important;
}

#info-wrapper {
    display: none;
    margin-top: 0;
    font-size: 14px;
    padding-top: 0;
    font-size: 12px;
}

#loc {
    color: #777;
    font-weight: 400;
    font-size: 14px;
    margin-bottom: 8px;
}

#details {
    color: #777;
    font-weight: 200;
    font-size: 12px;
    margin-bottom: 0;
}

#civprod, #employees, #militaryprod, #greenprod, #ownership {
    display: grid;
    grid-template-columns: 9rem 1fr;
    grid-gap: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

#employees {
    display: grid !important;
}

#militaryprod {
    display: grid !important;
}

#civprod {
    display: block !important;
    border-bottom: none;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    grid-template-columns: none;
    grid-gap: 0;
}

#ownership {
    border-bottom: none;
    margin-top: 0 !important;
    display: none !important;
}

#greenprod {
    display: none !important;
}

#intro {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 16px;
    margin: 16px;
    color: #333;
    box-shadow: 0px 2px 12px rgba(51, 51, 51, 0.2);
    max-width: 25%;
}

#close-button {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 28px;
    line-height: 1;
    color: #777;
    cursor: pointer;
    display: none;
}

#close-button:hover {
    color: #9CA4FC;
}

#sidebar.active #close-button {
    display: block !important;
}

#legend {
    width: 100%;
    box-sizing: border-box;
    margin-top: 14px;
    margin-left: 0;
    margin-right: 0;
    font-size: 14px;
    padding-top: 14px;
    padding-bottom: 8px;
    border-top: 1px solid #BEBEBE;
    font-weight: 200;
    flex-shrink: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 4px;
}

.legend-color {
    display: inline-block;
    flex: 0 0 12px;
    margin-right: 8px;
    border-radius: 50%;
    border: 1px solid #333333;
}

.mapboxgl-popup-content {
    font-size: 12px;
    color: #333;
    border-radius: 4px;
    padding: 6px 8px;
    min-width: 40px;
    box-shadow: 0px 2px 12px rgba(51, 51, 51, 0.2);
    z-index: 500;
}

@media only screen and (max-width: 768px) {
    html {
        height: 100vh;
        overflow: hidden;
    }

    #map-sec {
        height: 100vh;
        overflow: hidden;
        position: static;
    }

    body {
        height: 100vh;
        overflow: hidden;
        margin: 0;
        padding: 0;
    }

    .is-map {
        height: 100vh;
        position: static;
        display: block;
        margin: 0;
        padding: 0;
    }

    #map {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    #legend-card {
        position: fixed;
        top: 16px;
        left: auto;
        right: 16px;
        width: 280px;
        min-width: 280px;
        margin: 0 !important;
        border-radius: 8px;
        box-shadow: 0px 2px 12px rgba(51, 51, 51, 0.2);
        padding: 16px;
        background-color: #f9f9f9;
        box-sizing: border-box;
        z-index: 200;
        height: auto;
        overflow: hidden;
    }

    #sidebar {
        position: fixed;
        bottom: 16px !important;
        left: 16px !important;
        right: 16px !important;
        top: auto !important;
        width: calc(100% - 32px) !important;
        max-height: 35vh;
        margin: 0;
        border-radius: 8px;
        box-shadow: 0px 2px 12px rgba(51, 51, 51, 0.2);
        padding: 16px;
        background-color: #f9f9f9;
        box-sizing: border-box;
        overflow-y: auto;
        z-index: 100;
        display: none !important;
    }

    #sidebar.active {
        display: block !important;
    }

    /* Hide info-wrapper by default on mobile */
    #info-wrapper {
        display: none;
    }

    /* Show info-wrapper when sidebar is active */
    #sidebar.active #info-wrapper {
        display: block;
    }

    #return-button {
        position: static;
        margin-top: 16px;
    }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background-color: #f9f9f9;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 8px;
    border: 2px solid #f9f9f9;
}
