.leaflet-container {  /* all maps */
    width:  100%;
    height: calc(100vh - (var(--top-nav-height) + var(--footer-height)));
}

/* Resize the "display_raw" textbox */
.django-leaflet-raw-textarea {
    width: 100%;
}
.leaflet-control-layers-expanded {
    font-size: 20px;
}

.leaflet-control {
    transition: opacity 0.25s linear;
}

body.fade-controls .leaflet-control {
    opacity: 0.3;
}

#layers {
    z-index: 800;
    position: absolute;
    background-color: #fff;
    top: 300px;
    left: 10px;
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.2);
    background-clip: padding-box;
}

.layers-open {
    height: auto;
    width: var(--layers-width);
    padding: 0.75rem;
    cursor: auto;
    overflow-x: hidden;
    overflow-y: scroll;
}

.layers-open::-webkit-scrollbar,
#detailsContainer::-webkit-scrollbar {
width: 6px;
}

/* Track */
.layers-open::-webkit-scrollbar-track,
#detailsContainer::-webkit-scrollbar-track {
background: #f1f1f1; 
}

#detailsContainer::-webkit-scrollbar-track {
    margin-left: 5px; 
}

/* Handle */
.layers-open::-webkit-scrollbar-thumb,
#detailsContainer::-webkit-scrollbar-thumb {
background: #a3a3a3; 
}

/* Handle on hover */
.layers-open::-webkit-scrollbar-thumb:hover,
#detailsContainer::-webkit-scrollbar-thumb:hover {
background: #888; 
}

.layers-closed {
    padding: 0.5rem;
    height: 50px;
    width: fit-content;
    cursor: pointer;
}

#layerTreeDiv label {
    padding-left: 0.25rem;
    cursor: pointer;
    display: inline;
    font-size: 13px;
    font-weight: 400;
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
    color: #444;
    margin-bottom: 0;
}

#layerTreeDiv label::after {
    content: "";
}

#layerTreeDiv input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
    padding: 0.25rem;
}

.marginStart-0 {
    margin-top: 0.75rem !important;
}

.marginStart-1 {
    margin-left: 1rem !important;
}

.marginStart-2 {
    margin-left: 2rem !important;
}

.marginStart-3 {
    margin-left: 3rem !important;
}

.marginStart-4 {
    margin-left: 4rem !important;
}

.marginStart-5 {
    margin-left: 5rem !important;
}

/*#pin {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    height: 30px;
    width: 30px;
    background-position: center;
    background-size: cover;
    cursor: pointer;
}*/

#pin {
    position: relative;
    float: right;
    height: 30px;
    width: 30px;
    background-position: center;
    background-size: cover;
    cursor: pointer;
}

.pinIcon {
    background-image: url('/img/pin.svg');
}

.pinSlashIcon {
    background-image: url('/img/pin-remove.svg');
}

#detailsPanel {
    width: 375px;
    min-height: 100px;
    max-height: 250px;
    background-color: #fff;
    z-index: 800;
    position: absolute;
    bottom: 68px;
    right: 10px;
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.2);
    background-clip: padding-box;
    padding: 0.75rem;
}

#details p {
    margin: 0;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

#details p.details-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    margin-bottom: 1rem;
}

#detailsContainer {
    width: 100%;
    max-height: 170px;
    overflow-x: hidden;
    overflow-y: auto;
}

#detailsCloseBtn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    height: 25px;
    width: 25px;
    background-position: center;
    background-size: cover;
    cursor: pointer;
    background-image: url('/img/close-sm.svg');
}


.layer-divider {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin: 0.5rem auto;
    width: 100%;
}

.divider::after {
    margin-left: 0;
}

.divider::before {
    display: none;
    margin-right: 0;
}

#infoPanel p {
    font-size: 0.75rem;
    margin: 0;
}

.layer-divider::after, .layer-divider::before {
    content: "";
    flex-basis: 0;
    flex-grow: 1;
    max-width: 100%;
    border-bottom: 1px solid #c7c7c7;
}

.layerLoading {
    display: inline-block;
    width: 13px;
    height: 13px;
    background-image: url('/img/loading.svg');
    background-size: cover;

    -webkit-animation-name: spin;
    -webkit-animation-duration: 4000ms;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-timing-function: linear;

    -moz-animation-name: spin;
    -moz-animation-duration: 4000ms;
    -moz-animation-iteration-count: infinite;
    -moz-animation-timing-function: linear;

    -ms-animation-name: spin;
    -ms-animation-duration: 4000ms;
    -ms-animation-iteration-count: infinite;
    -ms-animation-timing-function: linear;
    
    animation-name: spin;
    animation-duration: 4000ms;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

@-ms-keyframes spin {
    from { -ms-transform: rotate(0deg); }
    to { -ms-transform: rotate(360deg); }
}

@-moz-keyframes spin {
    from { -moz-transform: rotate(0deg); }
    to { -moz-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
    from { -webkit-transform: rotate(0deg); }
    to { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
    from {
        transform:rotate(0deg);
    }
    to {
        transform:rotate(360deg);
    }
}

#layerSearch {
    background-image: url('/img/searchicon.png');
    background-position: 95% center;
    background-repeat: no-repeat;
    font-size: 16px;
    padding: 8px 40px 8px 8px;
    border: 1px solid #ddd;
    margin-bottom: 12px;
    width: 100%;
}

#layerSearch:not(:placeholder-shown) {
    background-image: none;
    padding-right: 8px;
}

#layerTreeDiv label.titleLabel {
    font-weight: 600;
    font-size: 1.25rem;
}

div:has(> label.titleLabel) {
    margin-bottom: 1rem;
}

#loadingLayers{
    display: flex;
}

#retryLoading{
    display: contents;
}

#reloadButton{
    margin-left: auto;
    display: inline;
}

#reload{
    background-image: url('/img/reload.svg');
    background-size: cover;
    display: inline-flex;
    height: 10px;
    width: 10px;
    margin-left: 0.5rem;
}

#loadingLayers .loadingLabel {
    font-size: 0.875rem;
    font-weight: 400;
}