html {
    background-color: rgb(10, 12, 12);
    min-height: 100%; /* make sure it is at least as tall as the viewport */
    position: relative;
}

::-moz-selection { /* Code for Firefox */
    color: whitesmoke;
    background: rgba(255, 255, 255, 0.25);
}

::selection {
    color: whitesmoke;
    background: rgba(255, 255, 255, 0.25);
}

button.round {
    --base-color: black;
    --top-color: var(--base-color);
    height: 30px;
    width: 30%;
    min-width: 110px;
    font-family: Nunito;
    font-weight: bold;
    font-size: 14px;
    color: whitesmoke;
    background: linear-gradient(to top, var(--base-color), var(--top-color));
    border-style: none;
    border-radius: 9999px;
    cursor: pointer;
    user-select: none;
}

    button.round:enabled:hover {
        transform: scale(1.05);
    }

    button.round:enabled:active {
        background: rgb(50, 50, 50);
        transform: scale(0.95);
    }

    button.round:disabled {
        background: rgb(50, 50, 50);
        font-weight: normal;
        color: black;
        cursor: default;
    }

#pop-up {
    z-index: 999;
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(1px);
    display: none
}

#confirmation-window {
    height: 200px;
    width: 250px;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    margin: auto;
    z-index: 1000;
    background: rgb(25, 25, 25);
    border-radius: 15px;
    filter: drop-shadow(rgba(100, 100, 100, 0.85) 0px 0px 3px);
}

#confirm-title {
    position: absolute;
    right: 0;
    left: 0;
    top: 12.5%;
    margin: auto;
    text-align: center;
    font-family: Rubik;
    font-weight: 600;
    font-size: 25px;
    color: whitesmoke;
}

.confirmation-warning {
    position: absolute;
    right: 0;
    left: 0;
    top: 30%;
    margin: auto;
    padding: 15px;
    text-align: center;
    font-family: Nunito;
    font-weight: normal;
    font-size: 12.5px;
    color: whitesmoke;
}

#confirmation-buttons {
    position: absolute;
    width: 100%;
    height: 30%;
    bottom: 0;
    margin: auto;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}

.button.round.cancel {
    background: gray;
}

.button.round.proceed {
    background: red;
}


.main-container {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    position: fixed; /* So that it stays fixed while scrolling */
    top: 0;
    left: 0;
    justify-content: flex-start;
    align-items: flex-start;
}

.left-panel {
    height: 100%;
    width: 25%;
    min-width: 300px;
    max-width: 40%;
    position: relative;
    top: 0;
    left: 0;
    background-color: rgb(25, 25, 25);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-shrink: 0;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
    z-index: 1;
    overflow: scroll;
    resize: horizontal;
}

.right-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    flex-grow: 1;
    position: relative;
    top: 0;
    left: 0;
    text-align: center;
}

.header-container {
    position: relative;
    top: 0;
    width: 100%;
    height: 60px;
    min-height: 60px;
    background-color: rgb(25, 25, 25);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 100;
}

.right-content {
    position: relative;
    width: 100%;
    height: 92%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

@media (max-width: 800px) {

    .header {
        display: none;
    }
}

.header {
    width: 100%;
    position: absolute;
    text-align: center;
    color: whitesmoke;
    font-family: Rubik;
    font-weight: 600;
    font-size: 30px;
    z-index: 101;
    user-select: none;
}

.footer {
    position: relative;
    color: dimgrey;
    font-family: Nunito;
    font-size: 9px;
    margin-top: 30px;
}

#corner-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 10px;
    height: 60px;
}

.corner-button {
    position: relative;
    background: none;
    padding: 0;
    cursor: pointer;
    height: 50%;
    margin: 9px;
    z-index: 200;
    border: none;
}

    .corner-button img {
        height: 100%;
        width: auto;
        display: block;
    }

    .corner-button:hover img {
        transform: scale(1.05);
        filter: brightness(0.75);
    }

    .corner-button:active img {
        transform: scale(0.95);
        filter: brightness(0.50);
    }

#report-icon {
    height: 90%;
}

#update-prompt {
    position: absolute;
    margin-top: 5px;
    width: 175px;
    height: 35px;
    background: rgba(100, 100, 100, 0.5);
    cursor: default;
    pointer-events: none;
    border-radius: 10px;
    margin-left: -50px;
    right: -15px;
    top: 120%;
    display: none;
}

    #update-prompt::after {
        content: '';
        position: absolute;
        width: 0px;
        height: 0px;
        border-bottom: 10px solid rgba(100, 100, 100, 0.5);
        border-top: 10px solid transparent;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        margin-left: -10px;
        bottom: 100%;
        right: 20px;
    }

    #update-prompt h3 {
        position: absolute;
        right: 0;
        left: 0;
        top: 0;
        bottom: 0;
        margin: auto;
        font-family: Rubik;
        font-weight: 500;
        color: whitesmoke;
        font-size: 14px;
        text-align: center;
        height: fit-content;
    }

#settings {
    height: 60%;
    background: url("resources/settings_icon.png") no-repeat center;
    background-size: contain;
}

    #settings:hover {
        transform: scale(1.05);
        filter: brightness(0.75);
    }

    #settings:active {
        transform: scale(0.95);
        filter: brightness(0.50);
    }

.setup-container {
    position: relative;
    min-height: 0;
    flex-grow: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    display: none; /* Hiden while loading*/
    z-index: 0;
}

#point-container
{
    position: relative;
    max-width: 100%;
    min-width: 200px;
    width: auto;
    max-height: calc(42vw);
    height: auto;
    min-height:200px;
    aspect-ratio: 1;
    flex-shrink: 1; /* Allow shrinking */
    flex-grow: 1; /* Allow growing */
    overflow: hidden;
    background-color: rgb(25, 25, 25);
    border-radius: 5%;
    z-index: -2;
}

#point-grid {
    position: relative;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    background-color: transparent;
    z-index: -1;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.2) 1px, transparent 1px), /* Top edge */
        linear-gradient(to bottom, rgba(255, 255, 255, 0.2) 1px, transparent 1px), /* Left edge */
        linear-gradient(to left, rgba(255, 255, 255, 0.2) 1px, transparent 1px), /* Bottom edge */
        linear-gradient(to top, rgba(255, 255, 255, 0.2) 1px, transparent 1px); /* Right edge */

    left: -1px;
    top: -1px;
    background-repeat: space;
}

#grid-axis-x {
    position: absolute;
    width: 100%;
    height: 1.5px;
    background: darkgrey;
    border: none;

    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    margin: auto;
    z-index: 0;
}

#grid-axis-y {
    position: absolute;
    width: 2px;
    height: 100%;
    background: darkgray;
    border: none;

    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    margin: auto;
    z-index: 0;
}

#point-scale {
    position: absolute;
    right: 20px;
    bottom: 0px;
    width: fit-content;
    height: auto;

    text-align: right;
    color: darkgray;
    font-family: Nunito;
    font-weight: bold;
    font-size: 13px;

    user-select: none;
}

.axis-label {
    position: absolute;
    margin: auto;
    width: fit-content;
    height: 30px;
    line-height: 27.5px;
    text-align: center;
    vertical-align: middle;
    padding-right: 7px;
    padding-left: 7px;

    color: darkgray;
    background: rgb(25, 25, 25);
    font-family: Nunito;
    font-weight: bold;
    font-size: 20px;
    user-select: none;
}

#posX
{
    right: 20px;
    bottom: 0;
    top: 0;
}

#negX {
    left: 20px;
    bottom: 0;
    top: 0;
}

#posY {
    left: 0;
    right: 0;
    top: 20px;
}

#negY {
    left: 0;
    right: 0;
    bottom: 20px;
}

.point {
    position: absolute;
    object-fit: fill;
    bottom: 50%;
    left: 50%;
    margin: auto;
    width: 6%;
    min-width: 20px;
    aspect-ratio: 1;
    filter: brightness(0.4);
    display: none;

    transform-origin: center;

    user-select: none;
    pointer-events: auto;
    cursor: pointer;
}

    .point.connected {
        /*filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));*/
        filter: brightness(0.9);
    }

#yaw-slider {
    -webkit-appearance: none;
    background: rgb(50, 50, 50);
    outline: none;
    border-radius: 9999px;
    margin-top: 15px;
    width: 100%;
    max-width: calc(30vw);
    height: calc(0.5vw);
    display: none;
}

    #yaw-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        height: calc(1vw);
        width: calc(1vw);
        border-radius: 9999px;
        background: whitesmoke;
        cursor: pointer;
    }

    #yaw-slider::-webkit-slider-thumb:hover {
        background: grey;
        transform: scale(1.15);
    }

lottie-player {
    display: block;
    position: relative;
    min-height: 1px;
    min-width: 1px;
    flex-grow: 1;
}

.setup-header {
    position: relative;
    width: 50%;
    min-width: 200px;
    word-wrap: break-word;
    text-align: center;
    color: whitesmoke;
    font-family: Nunito;
    font-weight: bold;
    font-size: 22px;
}

.setup-details {
    text-overflow: ellipsis;
    word-break: keep-all;
    width: 50%;
    height: fit-content;
    min-width: 200px;
    margin-top: 15px;
    text-align: center;
    line-height: 20px;
    color: whitesmoke;
    font-family: Nunito;
    font-weight: normal;
    font-size: 13px;
    display: block;
}

.setup-details a:link{
    color:lightgrey;
}

.setup-details a:visited{
    color:dimgrey;
}

button.round.calibrate {
    background: whitesmoke;
    color: black;
    font-size: 15px;
    position: relative;
    width: 90px;
    min-height: 30px;
    border: none;
    box-shadow: 0 0px 20px rgb(141, 58, 172);
    margin-top: 20px;
}

    #calibration-button:active {
        box-shadow: none;
    }

.loading-wheel {
    height: 35px;
    aspect-ratio: 1;
    user-select: none;
}

.calibration-config {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 25px;
    max-width: 100%;
    width: 40%;
    min-width: 200px;
    column-gap: 20px;
}

.calibration-config-right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 50%;
    max-width: 175px;
    column-gap: 10px;
}

button.round.uncalibrate:enabled {
    background: red;
    flex-shrink: 1;
    min-width: fit-content;
    max-width: 150px;
}

button.round.refine {
    background: whitesmoke;
    color: black;
    flex-shrink: 1;
    flex-grow: 1;
    min-width: fit-content;
    max-width: 150px;
}

    button.round.refine:disabled {
        background: rgb(50, 50, 50);
    }

button.round.center {
    background: whitesmoke;
    color: black;
    flex-shrink: 1;
    flex-grow: 1;
    min-width: fit-content;
    max-width: 110px;
}

    button.round.center:disabled {
        background: rgb(50, 50, 50);
    }

    button.round.center.confirm {
        margin-top: 25px;
        flex-shrink: unset;
        flex-grow: unset;
        width: 110px;
    }

#connect {
    height: 60px;
    width: 100%;
    background: whitesmoke;
    font-family: Rubik;
    font-weight: 600;
    font-size: 25px;
    color: black;
    border-style: none;
    cursor: pointer;
    flex-shrink: 0;
    flex-grow: 0;
    position: sticky; /* Make the element sticky */
    top: 0; /* Stick to the top of the page */
    z-index: 100; /* Optional: ensure it stays above other elements */
    user-select: none;
}

    #connect:hover {
        filter: brightness(0.75);
        font-size: 25.5px;
    }

    #connect:active {
        filter: brightness(0.5);
        font-size: 24.5px;
    }

#status {
    position: relative;
    margin: 0;
    margin-top: 15px;
    font-family: Nunito;
    font-weight: normal;
    font-size: 16px;
    color: darkgrey;
    user-select: none;
}

    #status.success{
        color: whitesmoke;
        font-weight: bold;
    }

#serial {
    position: relative;
    margin-top: 5px;
    margin-bottom: 0;
    font-family: Nunito;
    font-weight: normal;
    font-size: 8px;
    color: darkgrey;
}

#firmware {
    position: relative;
    margin-top: 0;
    margin-bottom: 15px;
    font-family: Nunito;
    font-weight: normal;
    font-size: 9px;
    color: darkgrey;
}

#control-panel {
    display: none;
}

#channel-container {
    position: relative;
    width: 50%;
    margin: auto;
    height: 30px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 20px;
    align-items: center;
}

#channel-label {
    position: relative;
    font-family: Nunito;
    font-weight: normal;
    font-size: 15px;
    color: whitesmoke;
    user-select: none;
    width: fit-content;
}

#channel-input {
    position: relative;
    color: whitesmoke;
    font-family: Nunito;
    text-align: center;
    background: rgb(50, 50, 50);
    border: none;
    border-radius: 5px;
    width: 30px;
    height: 20px;
    margin: 10px;
}

    #channel-input:disabled {
        color: darkgrey;
        background: rgb(50, 50, 50);
        pointer-events: none;
        user-select: none;
    }

#channel-button {
    background: dodgerblue;
    height: 25px;
    width: 15%;
    min-width: 50px;
    margin: 0;
}

    #channel-button:active {
        background: rgb(50, 50, 50);
    }

    #channel-button:disabled {
        background: rgb(50, 50, 50);
    }

.button-container {
    position: relative;
    width: 100%;
    height: fit-content;
    margin-top: 15px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
}

    button.round.pair {
        background: #32263d;
        content: 'Pairing Off';
    }

    button.round.pair.on {
        background: blueviolet;
        font-size: 0;
    }
        button.round.pair.on::after {
            content: 'Pairing On';
            font-size: 14px;
        }


    button.round.clear:enabled {
        background: red;
    }

#node-container {
    position: relative;
    left: 0;
    right: 0;
    bottom: 25px;
    top: 10px;
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /*border: 1px red solid;*/
}

.node {
    position: relative;
    height: 120px;
    width: auto;
    left: 0;
    right: 0;
    background: rgb(40, 40, 40);
    border: none;
    border-radius: 15px;
    margin: 10px;
    margin-left: 25px;
    margin-right: 25px;
    /*pointer-events: none;*/
    order: 0;
}

    .node.connected {
        background: rgb(50, 50, 50);
        /*pointer-events: all;*/
        order: -1;
    }

    .node.connected.tracker{
        order: -2;
    }

    .node.highlight {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    }

.node-img {
    position: absolute;
    height: 85%;
    width: auto;
    object-fit: fill;
    top: 0;
    bottom: 0;
    left: 13px;
    margin: auto;
    user-select: none;
    filter: contrast(0.9) brightness(0.7);
}

.node.connected .node-img {
    filter: none;
}

.product-line {
    position: absolute;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    /*border: solid red 1px;*/
    top: 0;
    right: 15px;
    height: 35px;
    margin: auto;
}

.battery-img {
    object-fit: contain;
    height: 20px;
    aspect-ratio: 1;
    /*border: solid blue 1px;*/
    flex-grow: 0;
    margin-right: 10px;
    display: none;
    cursor: pointer;
    user-select: none;
}

.node.connected .battery-img {
    display: inline-block;
}

.node-title {
    position: relative;
    text-align: right;
    font-family: Rubik;
    font-weight: 400;
    font-size: 15px;
    color: #bebebe;
    user-select: none;
}

.node.connected .node-title {
    color: whitesmoke;
}

.node-serialnumber {
    position: absolute;
    text-align: right;
    font-family: Nunito;
    font-weight: normal;
    font-size: 7.5px;
    color: dimgrey;
    margin: auto;
    right: 15px;
    top: 29px;
    height: 20px;
    width: 150px;
}

.node.connected > .node-serialnumber {
    color: darkgrey;
}

.node-firmwareversion {
    position: absolute;
    text-align: right;
    font-family: Nunito;
    font-weight: normal;
    font-size: 7.5px;
    color: dimgrey;
    margin: auto;
    right: 15px;
    top: 40px;
    height: 20px;
    width: 150px;
    display: none;
}

.node.connected > .node-firmwareversion {
    color: darkgrey;
    display: block
}

.node-status {
    position: absolute;
    text-align: right;
    font-family: Nunito;
    font-weight: normal;
    font-size: 12px;
    color: darkgray;
    right: 15px;
    top: 55px;
    height: 20px;
    width: 150px;
    margin: auto;
    user-select: none;
}

.node.connected > .node-status {
    font-weight: bold;
    color: lawngreen;
    font-size: 0;
}
    .node.connected > .node-status::before {
        content: "Connected";
        font-size: 12px;
    }

.node.error > .node-status {
    font-weight: bold;
    color: orange;
    font-size: 0;
}
    .node.error > .node-status::before {
        content: "Error";
        font-size: 12px;
    }

.node-type {
    position: absolute;
    height: 25%;
    aspect-ratio: 1;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-color: transparent;
    border: none;
    bottom: 10px;
    right: 15px;
    cursor: pointer;
}

    .node-type:hover:enabled {
        transform: scale(1.05);
        filter: brightness(0.75);
    }

    .node-type:active:enabled {
        transform: scale(0.95);
        filter: brightness(0.5);
    }

    .node-type:disabled {
        filter: brightness(0.5);
        cursor: default;
        pointer-events: none;
    }

.node-expand {
    position: absolute;
    width: 25px;
    height: 15px;
    aspect-ratio: 1;
    background: url("resources/arrow_icon.png") no-repeat center;
    filter: brightness(0.5);
    background-size: contain;
    border: none;
    top: 0;
    bottom: 0;
    right: -25px;
    margin: auto;
    cursor: pointer;
    display: block;
}

@keyframes slide-out
{
    from { transform: translate(-100%, 0); }
    to {transform: translate(0, 0); }
}


.node-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    height: 120px;
    width: fit-content;
    background: rgb(30, 30, 30);
    border-radius: 15px;
    z-index: -1;

    flex-direction: row;
    justify-content: center;
    align-items: center;
    justify-content: space-evenly;

    transform: translate(-100%, 0);

    transition: all 150ms 150ms;
    display: none;
}

    .node-panel.open {
        transform: translate(0, 0);
    }

.node.connected > .node-panel {
    background: rgb(40, 40, 40);
}

#adjust-pos {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    width: 75px;
    height: 80%;
    margin: auto;
    margin-left: 65px;
}

.adjust-axis {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 25px;
    margin: auto;
}

.adjust-label {
    position: relative;
    color: whitesmoke;
    font-family: Nunito;
    font-style: normal;
    font-size: 12px;
    margin-right: 7px;
    text-align: center;
    user-select: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.adjust-input {
    position: relative;
    color: darkgrey;
    font-family: Nunito;
    font-style: normal;
    text-align: center;
    background: rgb(20, 20, 20);
    border: none;
    border-radius: 5px;
    width: 60%;
}

    .adjust-input:read-only {
        color: rgb(70, 70, 70);
    }

.imu-calib {
    display: none; /*flex*/
    flex-direction: column;
    justify-content: space-evenly;
    width: fit-content;
    height: 90%;
    margin: auto;
    margin-left: 15px;
    margin-right: 10px;
    user-select: none;
}

.imu-component {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

.imu-component-icon {
    width: 18px;
    margin-right: 10px;
}

.imu-component-status{
    width: 18px;
}

.panel-buttons {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    width: fit-content;
    height: 100%;
    margin: auto;
    margin-left: 20px;
    margin-right: 20px;
    user-select: none;
}

.imu-reset {
    display: none;
    background: url("resources/erase_icon.png") no-repeat center;
    height: 25%;
}

.node-delete {
    background: url("resources/trash_icon.png") no-repeat center;
    height: 20%;
}

.panel-button {
    aspect-ratio: 1;
    background-size: contain;
    border: none;
    cursor: pointer;
}

    .panel-button:hover {
        transform: scale(1.05);
        filter: brightness(0.75);
    }

    .panel-button:active {
        transform: scale(0.95);
        filter: brightness(0.5);
    }
