.nato-icon.battalion {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="10" y="10" width="80" height="80" fill="none" stroke="white" stroke-width="4"/><path d="M50,10 L50,90" stroke="white" stroke-width="4"/><path d="M10,50 L90,50" stroke="white" stroke-width="4"/></svg>');
}
.nato-icon.battery {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="10" y="20" width="80" height="60" fill="none" stroke="white" stroke-width="4"/><path d="M10,50 L90,50" stroke="white" stroke-width="4"/></svg>');
}
.nato-icon.platoon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="20" y="20" width="60" height="60" fill="none" stroke="white" stroke-width="4"/><circle cx="50" cy="50" r="15" fill="none" stroke="white" stroke-width="4"/></svg>');
}
.nato-icon.element {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="10" y="20" width="80" height="60" fill="none" stroke="white" stroke-width="4"/><path d="M10,50 L90,50" stroke="white" stroke-width="4"/><circle cx="50" cy="30" r="5" fill="white"/><circle cx="50" cy="70" r="5" fill="white"/></svg>');
}
.nato-icon.headquarters {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="white" stroke-width="4"/><path d="M30,50 L70,50 M50,30 L50,70" stroke="white" stroke-width="4"/></svg>');
}
.nato-icon.air_defense {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M20,80 L50,20 L80,80 Z" fill="none" stroke="white" stroke-width="4"/><path d="M35,60 L65,60" stroke="white" stroke-width="4"/></svg>');
}
#offlineMap {
    position: absolute;
    display: none;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: url("../images/offline-map.jpg");
    z-index: 399;
}

#closeSelElement {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
}
#goToDataBtn {
    margin-top: 10px;
}
#goToDataBtn img {
    width: 40px;
    height: 32px;
    margin: -10px 0 0 -13px;
}
.hidden {
    display: none !important;
}
.instructions {
    font-size: 14px;
}
#layerSwitcher {
    position: absolute;
    z-index: 500;
    right: 10px;
    bottom: 10px;
    display: flex;
    font-size: 14px;
}
.leaflet-popup {
    bottom: 10px !important;
    left: 30px !important;
}
.leaf-node .node-name {
    color: white;
}
.leaf-node .node-callsign {
    margin-left: 8px;
}

.leaflet-popup-tip-container {
    display: none !important;
}
.leaflet-popup-content {
    margin: 13px 28px 13px 20px !important;
}
.leaflet-popup-content-wrapper {
    border-radius: 0px !important;
    border: 1px solid var(--text-color);
    background: var(--medium-dark-color);
    color: white;
    outline: 1px solid var(--medium-dark-color);
}
.leaflet-container a.leaflet-popup-close-button {
    color: var(--text-color) !important;
    font-weight: 24px !important;
}
.leaflet-container {
    font-family: Verdana, Geneva, sans-serif !important;
}
.leaflet-control-zoom-in, .leaflet-control-zoom-out {
    color: var(--medium-dark-color) !important;
    background: var(--text-color) !important;
    border-radius: 0px !important;
}

.leaflet-bar {
    border-radius: 0px !important;
}
.leaflet-control-attribution {
    display: none;
}
.leftMenuContainer {
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    align-items: center;
    height: calc(100vh - 60px);
    color: var(--text-color);
    padding: 0 5px;
    overflow: visible;
    position: relative;
    z-index: 10000;
}
.legend {
    margin-top: 20px;
    padding: 12px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.legend h4 {
    margin-top: 0;
    margin-bottom: 8px;
}
.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}
.legend-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.legend-text {
    font-size: 14px;
}
#map {
    min-height: 100%;
    /*width: 100%;*/
    z-index: 110;
}
#mapContainer {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 60px);
    overflow: hidden;
}

.nato-icon {
    display: inline-block;
    height: 24px;
    margin-right: 8px;
    padding-left: 28px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left;
    flex-shrink: 0;
}

.tree-container {
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    width: 100%;
}

.tree-node {
    margin-top: 5px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    flex-direction: column;
}
.tree-node .children-container {
    display: none;
}
.toggle-icon {
    display: inline-block;
    width: 16px;
    text-align: center;
    margin-right: 8px;
}

.node-name {
    font-weight: 500;
}
.node-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 5px;
    color: var(--text-color);
    height: 50px;
    width: 50px;
    font-size: 14px;
    flex-direction: column;
    gap: 2px;
}
.node-content.level0 {
    font-size: 1.5em;
    margin: 8px 0;
    height: 55px;
    width: 70px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.node-content.level1 {
    width: 50px;
    height: 50px;
    padding: 4px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
/* Hide text labels — show icon only, text appears as tooltip */
.node-content.level1 > span:not(.statusIndicator):not(.stateIndicator):not(.node-callsign) {
    display: none;
}
.node-content.level1 > .node-callsign {
    display: none;
}
.level1 .nodeIcons {
    display: block;
    font-size: 1.2em;
}
/* Tooltip — rendered as body-level element via JS */
.sidebar-tooltip {
    position: fixed;
    background: rgba(14, 16, 20, 0.95);
    color: #ddd;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid rgba(53, 177, 205, 0.3);
    font-size: 12px;
    white-space: nowrap;
    z-index: 999999;
    pointer-events: none;
    font-family: 'Big Shoulders', sans-serif;
    letter-spacing: 0.5px;
    transition: opacity 0.1s;
}
.node-content .statusIndicator {
    position: absolute;
    background: green;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    top: 5px;
    right: 5px;
}
.node-content.selectable {
    cursor: pointer;    
    border-radius: 5px;
}
.node-content.selectable:hover {
    background: var(--medium-dark-color-alpha);
    color: var(--medium-light-color);
}
.tree-node.selected > .node-content.selectable {    
    background: var(--medium-dark-color-alpha);
    color: var(--medium-light-color);
}

#selected-element-title {
    position: relative;
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}
/*
#selected-element-title .nato-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="10" y="20" width="80" height="60" fill="none" stroke="black" stroke-width="4"/><path d="M10,50 L90,50" stroke="black" stroke-width="4"/><circle cx="50" cy="30" r="5" fill="black"/><circle cx="50" cy="70" r="5" fill="black"/></svg>');
}
*/
.switchMapLayers {
    color: var(--medium-dark-color);
    background-color: var(--text-color);
    border: 1px solid var(--dark-color);
}
.switchMapLayers.selected {
    background-color: var(--medium-dark-color);
    color: var(--text-color);
    -webkit-box-shadow: inset 1px 1px 10px #333;
    -moz-box-shadow: inset 1px 1px 10px #333;
    box-shadow: inset 1px 1px 10px #333;
}

.element-details {
    font-size: 14px;
    margin-top: 8px;
}
.element-details p {
    margin: 4px 0;
}
.view-map-link {
    margin-left: 12px;
    font-size: 12px;
    color: var(--medium-light-color);
    text-decoration: none;
    padding: 2px 6px;
    border: 1px solid var(--medium-light-color);
    border-radius: 4px;
    display: inline-block;
}
.view-map-link:hover {
    background-color: var(--medium-light-color);
    color: var(--text-color);
}


.custom-container.icon {
    border: 2px solid transparent;
    padding: 2px 8px;
    border-radius: 5px 0 5px 0;
    position: relative;
}
.custom-container.icon.selected {
    border-color: var(--color-red);
}
.custom-container.icon.selected:before, .custom-container.icon.selected:after {
    content: "";
    position: absolute;
    width: 30%;
    height: 30%;
    border: 4px solid var(--color-red);
    border-radius: 4px;
    pointer-events: none;
}

.custom-container.icon.selected:before {
    bottom: -4px;
    left: -4px;
    border-top: none;
    border-right: none;
}
.custom-container.icon.selected:after {
    top: -4px;
    right: -4px;
    border-bottom: none;
    border-left: none;
}

.icon img {
    width: 100% !important;
    height: 100%;
}
#navigationMap {
    position: absolute;
    z-index: 999;
    background-color: var(--medium-dark-color);
    height: 20vh;
    bottom: 0;
    left: 50%;
    padding: 10px 10px 0;
    transition: all .5s;
    aspect-ratio: 16 / 9;
    display: block;
    transform: translateX(-50%);
}
#navigationMap.mapHidden {
    bottom: -20vh;
}
#mapConcealer, #dataProcedure {
    cursor: pointer;
}
#mapConcealer {
    width: 2vw;
    height: 4vh;
    top: -3.5vh;
    right: 0;
    background-color: var(--medium-dark-color);
    position: absolute;
}

#mapConcealer:after
{
    content: "\f070";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    display: block;
    height: 100%;
    width: 100%; 
    text-align: center;
    font-size: 1.5em;
    margin: 0 auto;
    cursor: pointer;
}
#navigationMap.mapHidden #mapConcealer:after {
    content: "\f06e";
}
#procedureFSImg {
    height: 90vh;
    width: 60vw;
    margin-left: 20vw;
    margin-top: 5vh;
}
#popupFullscreen {
    z-index: 999;    
}
#popupFullscreen .popupBackground {
    z-index: 0;
}
#procedureFSImgMap {
    pointer-events: none;
}
#mapImage, #procedureImgMap, #procedureFSImgMap {
    background: url(../images/navigationMap.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    position: relative;
}
.clickableImg {
    position:absolute;
    cursor: pointer;
}
.clickableImg.elemSelected {
    border: 4px solid green;
}
.clickableImg[data-id="ground_station"] {
    width: 26%;
    height: 28%;
    top: 56%;
    left: 22%;
}
.clickableImg[data-id="senseSat_01"] {
    width: 25%;
    height: 27%;
    top: 0;
    left: 34%;
}
.clickableImg[data-id="tdrs"] {
    width: 11%;
    height: 21%;
    top: 0;
    left: 74%;
}
.clickableImg[data-id="er_2"] {
    width: 28%;
    height: 27%;
    top: 17%;
    left: 6%;
}
.clickableImg[data-id="boat"] {
    width: 23%;
    height: 24%;
    top: 30%;
    left: 74%;
}
.clickableImg[data-id="terrestrial"] {
    width: 6%;
    height: 31%;
    top: 55%;
    left: 82%;
}
.clickableImg[data-id="rf_antenna"] {
    width: 9%;
    height: 15%;
    top: 51%;
    left: 44%;
}
.clickableImg[data-id="optical_antenna"] {
    width: 9%;
    height: 15%;
    top: 63%;
    left: 47%;
}
.clickableImg[data-id="soldier"] {
    width: 10%;
    height: 25%;
    top: 71%;
    left: 65%;
}
.clickableImg[data-id="data_center"] {
    width: 22%;
    height: 26%;
    top: 66%;
    left: 2%;
}
.clickableImg[data-id="data_cloud"] {
    width: 15%;
    height: 15%;
    top: 41%;
    left: 4%;
}
.flip-div {
    background-color: transparent;
    height: calc(100vh - 60px);
    color: var(--text-color);
    perspective: 1000px; /* Remove this if you don't want the 3D effect */
}

/* This container is needed to position the front and back side */
.flip-div-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

/* Do an horizontal flip when you move the mouse over the flip box container */
.flip-div.flipDivSelected .flip-div-inner {
    transform: rotateY(180deg);
}

/* Position the front and back side */
.flip-div-front, .flip-div-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
}

.flip-div-front {
    background-color: transparent;
    color: black;
}

/* Style the back side */
.flip-div-back {
    background-color: transparent;
    color: white;
    transform: rotateY(180deg);
}
#subViews {
    position: absolute;
    bottom: 50px;
    left: 10px;
}
.subViewsBtn {
    margin-top: 10px;
}
.mainScene {
    display: none;
}
#sideLoadingPanel {
    min-height: 100vh;
    color: white;
    font-family: 'Big Shoulders';
    font-size: 24px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sideLogo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#sideLoadingPanel .applicationLogo {
    width: 200px;
    margin-top: -150px;
}