/* Customization in openwisp-network-topology */
#content .djnjg-overlay *,
body.frontend * {
    outline: none;
    box-sizing: border-box;
}
#content .djnjg-overlay,
body.frontend {
    overflow: hidden;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    font-family: sans-serif;
    font-size: 14px;
}

body {
    margin: 0;
}
.djnjg-overlay h3 {
    display: block;
    font-size: 1.17em;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
}

.djnjg-overlay p {
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
}
/* Customization end */

.njg-relativePosition {
    position: relative;
    left: 0;
    right: 0;
}

#graphChartContainer {
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    overflow-y: auto;
}

#loadingContainer {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    z-index: 100;
}

.loadingElement {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    text-align: center;
}

.loadingSprite {
    margin: 0 auto;
    width: 40px;
    height: 40px;
    background: url("./loading.gif") center no-repeat;
    background-size: contain;
}

.loadingTip {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.leaflet-control-zoom {
    top: 5px;
    border: 0 !important;
}

.leaflet-control-zoom-in {
    border-top-left-radius: 5px !important;
    border-top-right-radius: 5px !important;
}

.leaflet-control-zoom-out {
    border-bottom-left-radius: 5px !important;
    border-bottom-right-radius: 5px !important;
}

.leaflet-control-layers {
    border: none !important;
    right: 3px !important;
}

.leaflet-control-layers-toggle {
    height: 35px !important;
    width: 35px !important;
    background-size: 20px 20px !important;
}

#njg-indoorImgInput {
    position: absolute;
    right: 70px;
    top: 20px;
    width: 150px;
    z-index: 1;
}

.switch-wrap {
    position: absolute;
    right: 40px;
    bottom: 30px;
    z-index: 1;
}

.switch-wrap input[type="checkbox"] {
    height: 25px;
    width: 60px;
    opacity: 0;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 5em;
    top: 0;
    z-index: 1;
    cursor: pointer;
}

.switch-wrap label {
    display: inline-block;
    width: 60px;
    height: 25px;
    outline: none;
    border-radius: 16px;
    box-sizing: border-box;
    cursor: pointer;
    transition:
        border-color 0.3s,
        background-color 0.3s;
    vertical-align: middle;
    position: relative;
    margin: 0 5px;
}

.switch-wrap label::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 2px;
    transition: transform 0.3s;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.switch-wrap input[type="checkbox"]:checked+label:before {
    transform: translateX(34px);
}

.njg-date {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 1;
}

.njg-selectIcon {
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 5px;
    border: 0;
}

.njg-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    right: 10px;
    top: 20px;
    z-index: 999;
    background-color: inherit;
}

.njg-searchInput {
    width: 250px;
    height: 20px;
}

.njg-searchBtn {
    padding: 5px 10px;
    margin-left: 10px;
}

.njg-searchContainer {
    position: absolute;
    top: 10px;
    z-index: 1;
}

.njg-sideBar {
    position: absolute;
    left: 0;
    top: 0;
    width: 350px;
    height: 100%;
    z-index: 1000;
    transition: left 0.4s;
    display: flex;
    flex-direction: column;
    user-select: text;
    overflow-y: auto;
}

.hidden {
    left: -100%;
}

.sideBarHandle {
    position: fixed;
    top: 15px;
    left: 370px;
    border: 0;
    border-radius: 5px;
    outline: none;
    font-size: 24px;
    width: 45px;
    height: 45px;
    cursor: pointer;
    padding: 0;
    transition: all 0.4s;
    transform: rotateY(180deg);
}

.sideBarHandle::before {
    content: "\27A4";
}

.hidden .sideBarHandle {
    left: 15px;
    transform: rotateY(0deg);
}

.njg-metaInfoContainer,
.njg-nodeLinkInfoContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0px;
}

.njg-metaData,
.njg-infoContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    margin-top: 20px;
}

.njg-keyLabel {
    font-size: 14px;
    font-weight: 600;
    flex: 1 1 50%;
    word-break: break-word;
}

.njg-valueLabel {
    flex: 1 1 50%;
    word-break: break-word;
}

.njg-metaDataItems,
.njg-infoItems {
    display: flex;
    align-items: center;
    width: 100%;
    text-transform: capitalize;
    padding: 5px 0;
}

.njg-tooltip {
    user-select: text !important;
}

.njg-tooltip #closeButton {
    display: none;
}

.njg-tooltip-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1px 0;
    flex-wrap: wrap;
}

.njg-tooltip-key {
    display: inline-flex;
    flex-basis: 40%;
    flex-wrap: wrap;
    text-transform: capitalize;
    font-weight: 600;
}

.njg-tooltip-value {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    flex-basis: 60%;
}

.njg-headerContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: capitalize;
    width: 100%;
    padding: 0 15px;
    position: relative;
}

#closeButton {
    position: absolute;
    right: 20px;
    cursor: pointer;
    font-size: 18px;
}

@media only screen and (max-width: 850px) {
    .njg-sideBar {
        top: 0;
        z-index: 1001;
        width: 100%;
    }

    .njg-tooltip #closeButton {
        display: block;
        width: 100%;
        text-align: end;
        font-size: 16px;
    }

    .sideBarHandle {
        display: none;
    }
}
