/* Base font-size (mobile first) */
html {
    font-size: 75%; /* 14.4px */
}

#showInfo {
    display: block;
}

 #hideInfo{
    display: none;
}

@media (min-width: 668px) {
    html {
        font-size: 80%; /* 14.4px */
    }
}


@media (min-width: 768px) {
    html {
        font-size: 100%; /* 16px */
    }
}

@media (min-width: 1024px) {
    html {
        font-size: 120%; /* 17.6px */
    }


}
/* shared colors */
:root {
    --main-bg-color: black;
    --text-color: white;
    --text-hover-color: #ddd;
}
/* overall styling */
body {
    padding: 0px;
    margin: 0px;
    min-height: 480px;
    min-width: 480px;
    background-color: var(--main-bg-color);
    font-family: "Lato", sans-serif;
    position: relative;
    overflow: hidden;
}
p {
    font-family: "Lato", sans-serif;
    font-size: 0.7rem;
    padding: 0px 0.2rem;
    margin: 0px;
    color: var(--text-color);
}

/* for main tooltips */
td, th {
    white-space: nowrap;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 0.5px solid #A0A0A0;
    padding: 3px;
}

th {
    background-color: #D0D0D0;
}
td {
    text-align: center;
}

span {
    font-family: "Lato", sans-serif;
    font-size: 0.7em;
}

input[type="radio"] {
    padding: 0px;
    margin-top: 0.05rem;
    margin-left: 0.25rem;
    margin-right: 0.2rem;
}
label {
    display: flex;}

#dataRadio{
    display: flex;
    padding: 0;
    margin: 0;
    width: 20rem;
    font-size: 0.7rem;
    height: 0.8rem;
}

#parameterRadio{
    display: flex;
    padding: 0;
    margin: -0.8rem 0 0 0; /* Pulls it up by 1rem */
    width: 18rem;
    font-size: 0.7rem;
    height: 0.8rem;
    justify-content: flex-end; /* Align content to the right */
    align-items: flex-start; /* Align content to the top */
}

#directionToggle{
    display: flex;
    padding: 0;
    margin: auto;
    width: 100%;
    font-size: 0.6rem;
    height: 0.7rem;
}

.tooltipExtra{
    position: absolute;
    visibility: hidden;
    width: auto;
    max-width: 8rem;
    height: auto;
    padding: 0.1rem;
    font-size: 0.8rem;
    pointer-events:auto;
    background-color: white;
    border-radius: 0.1rem;
    border: 0.05rem solid black;
    color: #404040;
    z-index: 1800;
}

.tooltip{
    position: absolute;
    visibility: hidden;
    width: 22rem;
    height: auto;
    max-height: 10rem;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    padding: 0px;
    background-color: black;
    color: white;
    border: 0.075rem solid white;
    z-index: 1500;
    pointer-events:all;
}
/* parameter selection */
select {
    font-family: "Montserrat", sans-serif;
    padding: 0.25rem 1rem;
    margin: 0.25rem;
    border: 0.1rem solid var(--text-color);
    background-color: var(--main-bg-color);
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.7rem;
}

/* search box and its contents */
#search-container,#shortestPathEndSearch {
    width: 13.5rem;
    height: 1.9rem;
    margin: 0.1rem;
    position: relative;

}
#search-container{
    top: 0.25rem;
    z-index: 160;
}
#shortestPathEndSearch{
    z-index: 70;
}
#search-input,#search-input-sp-end {
    border-radius: 0.1rem;
    font-family: "Lato", sans-serif;
    padding: 0.25rem;
    width: 13rem;
    border: 0.075rem solid var(--text-color);
    background-color: var(--main-bg-color);
    color: var(--text-color);
    font-size: 0.9rem;
}
#shortestPathEndSearch{
    display: none;
}

#search-input-sp-end{
    position: absolute;
    top: 0.1rem;
}
#suggestions-container, #suggestions-container-sp-end {
    width: 13.5rem;
    font-size: 0.7rem;
    border: 0;
    background-color: var(--text-color);
    color: var(--main-bg-color);
    display: none;
    max-height: 8rem;
    overflow-y: auto;
    position: relative;
    z-index: 500;
}

#suggestions-container-sp-end{
    top: 1.8rem;
}
.suggestion {
    padding: 0.5rem;
    cursor: pointer;
}

.suggestion:hover {
    background-color: var(--text-hover-color);
}

/* tabbed container */
#search-tab-container {
    position: absolute;
    right: 1rem;
    top: 1.2rem;
    background-color: var(--main-bg-color);
    color: var(--text-color);
    border: 0.075rem solid var(--text-color);
    padding: 0.5rem;
    width: 18rem;
    height: 2.7rem;
    max-height: calc(100vh - 3rem);
    z-index: 10;
}

/* tabbed component */
#collapsibleMenuContainer {
    display: none;
    position: relative;
    background-color: transparent;
    border: 0px ;
    padding: 0px;
    width: 18rem;
    height: calc(100vh - 12rem);
    z-index: 90;
}
/* chart component */
#collapsibleMenuDiv {
    position: relative;
    margin-top: 5.2rem;
    width: 100%;
    max-height: calc(100vh - 12rem);
    height: auto;
    overflow-y: auto;
}
/* nearly new only elements */
#nnDegreeDiv{
    position: absolute;
    top: 3.8rem;
    left: 0.6rem;
    align-items: center;
    display: none;

}

input[type="range"] {
    font-size: 0.7rem;
    width: 6rem;
    height: 0.7rem;
    border-radius: 0.35rem;
    margin-top: -1.8rem;
    margin-left: 2.7rem;
    margin-right: 0px;
    vertical-align: middle;
}
#nnDegreeLabel {
    font-size: 0.7rem;
    margin: 0px;
    padding: 0px;
    vertical-align: middle; /* Ensures the label is aligned with the slider */
    line-height: 1
}

#nnDegreeValue1 {
    top: 1rem;
    left: 2.5rem;
    position: absolute;
    margin-left: 0.25rem; /* Adds space between the slider and the value display */
    font-weight: bold; /* Optional, to highlight the value */
    font-size: 0.7rem;
}
#nnDegreeValue2 {
    top: 1rem;
    left: 5.25rem;
    position: absolute;
    margin-left: 0.25rem; /* Adds space between the slider and the value display */
    font-weight: bold; /* Optional, to highlight the value */
    font-size: 0.7rem;
}

#nnDegreeValue3 {
    top: 1rem;
    left: 8rem;
    position: absolute;
    margin-left: 0.25rem; /* Adds space between the slider and the value display */
    font-weight: bold; /* Optional, to highlight the value */
    font-size: 0.7rem;
}
#refreshNN{
    position: absolute;
    left: 9.8rem;
    top: -0.8rem;
    padding:  0.6rem 0px 0px 0.3rem;
    cursor: pointer;
    font-size: 1rem;
    z-index: 500;
}

/* reset button (default view only) */
#resetButton{
    display: none;
    position: absolute;
    top: 6.2rem;
    left: 5rem;
    cursor: pointer;
    font-size: 0.7rem;
}

/* reset button (default view only) */
#expandSegments{
    position: absolute;
    top: 3.7rem;
    right: 0.6rem;
    cursor: pointer;
    font-size: 0.7rem;
}

/* zoom button menu and elements */
#zoom-button-component {
    position: relative;
    border: 0px solid transparent;
    background-color: var(--main-bg-color);
    z-index: 400;
}

#zoom-in {
    left: 0.2rem;
}

#zoom-out {
    left: 1.7rem;
}

#zoom-to-fit {
    left: 3.2rem;
}

.zoom-button {
    position: absolute;
    top: calc(100vh - 1.5rem);
    width: 1.3rem;
    height: 1.3rem;
    border: 0.05rem solid white;
    background-color: transparent;
    color: white;
    font-size: 0.7rem;
    border-radius: 0.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 350;
}
/* toolbar buttons (ie show arrows) + drop down menu for layouts */
.toolbar-button {
    width: 1.7rem;
    height: 1.7rem;
    border: 0.075rem solid white;
    background-color: transparent;
    color: white;
    font-size: 0.9rem;
    border-radius: 0.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 350;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 3.5rem;
    right: 0;
    background: #333;
    border: 0.075rem solid white;
    border-radius: 3px;
    padding: 0.15rem;
    box-shadow: 0px 0.1rem 0.25rem rgba(0, 0, 0, 0.2);
    z-index: 600;
}

.CTA {
    display: none;
    position: fixed;
    top: 4.8rem;
    right: 1.5rem;
    text-align: right;
    padding-top: 0.2rem;
    color: white;
    font-size: 0.6rem;
}

.dropdown-span{
    margin-left: 0.4rem;
    font-size: 0.7rem;
}
.dropdown-item {
    display: flex;
    align-items: center;
    background: transparent;
    color: white;
    border: none;
    padding: 0.5rem 0.5rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.dropdown-item i {
    margin-right: 1rem;
}
.dropdown-item:hover {
    color: #A0A0A0;
    background-color: #484848;
}
.toolbar-container:hover .dropdown-menu {
    display: block;
}
.toolbar-container {
    position: relative;
    display: inline-block;
}

#layout-button {
    display: none;
    position: absolute;
    top: 1.65rem;
    right: 0.5rem;
}
#show-arrows-button {
    position: absolute;
    top: 1.65rem;
    right: 2.4rem;
}
#hide-single-button {
    position: absolute;
    top: 1.65rem;
    right: 2.4rem;
}

.toolbar-button:hover, .zoom-button:hover {
    background-color: #484848;
}
.toolbar-button i {
    pointer-events: none;
    color: white;
    font-size: 4rem;
}
/* search input, buttons etc. */
#parameter-menu {
    display: block;
}

/* Link to show tabbed component */
#collapseExpandButton {
    display: none;
    position: absolute;
    top: -2rem;
    padding: 0.6rem 0px 0px 0.3rem;
    cursor: pointer;
    font-size: 0.7rem;
}

#collapseExpandButton {
    right: 0rem;
}

#collapsibleMenuToggle{
    display: none;
}
/* show hide information panel toggle */
#showInfo, #hideInfo {
    position: absolute;
    top: 3.1rem;
    right: 0.5rem;
    padding: 0.6rem 0px 0px 0.3rem;
    cursor: pointer;
    font-size: 0.7rem;
}

#unselectAll{
    top: -1rem;
    right: 0.5rem;
    position: absolute;
    font-size: 0.7rem;
    cursor: pointer;
}
.hidden {
    display: none;
}

/* downloadImage and helpInfo buttons */
#helpInfo{
    left: 0.25rem;
}

#downloadImage {
    left: 1.45rem;
}


#downloadNNData {
    cursor: pointer;
    position: absolute;
    left: 1rem;
    top: 0.1rem;
    display: none;
    font-size: 0.7rem;
}


#helpInfo, #downloadImage{
    position: absolute;
    top: 1.6rem;
    padding:  0.6rem 0px 0px 0.3rem;
    cursor: pointer;
    font-size: 1rem;
}

/* reset SP */
#refreshSP{
    position: absolute;
    left: 12.1rem;
    top: 0.3rem;
    padding:  0rem 0px 0px 0.3rem;
    cursor: pointer;
    font-size: 1rem;
    z-index: 500;
}

/* loading animation - from Claude.ai */
.animation-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 20px;
    min-height: 100vh;
    box-sizing: border-box;
}

.loading-animation {
    color: white;
    text-align: center;
}

.nodes-pulse {
    width: 250px;
    height: 200px;
    position: relative;
}

.nodes-pulse .node {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    z-index: 10;
    animation: pulse 1.5s infinite ease-in-out;
}

.nodes-pulse .link {
    position: absolute;
    height: 0.75px;
    z-index: 5;
    transform-origin: left;
}

.link{
    background-color: #A0A0A0;
}

.nodes-pulse .node:nth-child(1) {
    background-color:  #418BFC;
    top: 20px;
    left: 70px;
    animation-delay: 0s;
}
.nodes-pulse .node:nth-child(2) {
    background-color:  #46BCC8;
    top: 70px;
    left: 40px;
    animation-delay: 0.3s;
}
.nodes-pulse .node:nth-child(3) {
    background-color: #D6AB1B;
    top: 50px;
    right: 50px;
    animation-delay: 0.6s;
}
.nodes-pulse .node:nth-child(4) {
    background-color: #EB5E68;
    bottom: 30px;
    left: 100px;
    animation-delay: 0.9s;
}
.nodes-pulse .node:nth-child(5) {
    background-color: #B6BE1C;
    bottom: 60px;
    right: 70px;
    animation-delay: 1.2s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1);  }
    50% { transform: scale(1.2);  }
}

/* info message, tooltipCount and help info panel */
#infoMessage{
    background-color: transparent;
    color: white;
    z-index: 200;
    width: 100%;
    padding: 0.15rem;
    font-size: 0.7rem;
    position: fixed;
    text-align: center;
    color: gold;
    left: 0.5rem;
    top: 0px;
    visibility: hidden;
}

#tooltipCount{
    background-color: transparent;
    color: white;
    z-index: 200;
    padding: 0.25rem;
    font-size: 0.6rem;
    position: fixed;
    text-align: center;
    color: white;
    left: 1.6rem;
    top: 0px;

}

#helpInformationPanel {
    background-color: black;
    color: white;
    z-index: 3000;
    width: 60vw;
    height: 20vh;
    padding: 1rem;
    position: fixed;
    top: 50%;
    left: 50%;
    font-size: 1rem;
    transform: translate(-50%, -50%);
    border: 0.075rem solid white;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
    overflow-y: auto;
}

#helpInformationPanel.active {
    visibility: visible;
    opacity: 1;
}

/* Optional: backdrop overlay */
#helpModalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 2500;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#helpModalOverlay.active {
    visibility: visible;
    opacity: 1;
}
.infoButtonContainer {
    visibility: hidden;
    position: fixed;
    top: calc(50% - 10vh); /* 50% down minus half the modal height */
    left: calc(50% + 30vw - 2rem); /* 50% across + half modal width - offset */
    z-index: 3001; /* Must be above the modal */
}
.infoButtonContainer.active {
    visibility: visible;
    opacity: 1;
}
.infoCloseButton {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.5rem;
}

#infoCloseButton:hover {
    color: #a0a0a0;
}

.slider-row {
    display: flex;
    flex-wrap: wrap;          /* allow wrapping if container is too narrow */
    gap: 10px;                /* space between groups */
}

.slider-group {
    font-size: 0.8rem;
    display: flex;
    align-items: center;      /* vertically align label, slider, value */
    gap: 5px;
    white-space: nowrap;      /* prevent labels from wrapping */
}

.switch {
    font-size: 0.8rem;
}

.slider-group label,
.slider-group .value-display {
    line-height: 1;           /* ensure text height aligns nicely */
}

.slider-group input[type="range"] {
    width: 80px;
    vertical-align: middle;   /* aligns slider vertically with text */
    margin-top: 0;            /* remove any extra top margin */
    margin-bottom: 0;
}

@keyframes pulseNN {
    0% {
        stroke-width: 0;
    }
    50% {
        stroke-width: 10px;
    }
    100% {
        stroke-width: 0;
    }
}

.pulseNN {
    animation: pulseNN 1s ease-in-out infinite;
}
