html, body, urdf-viewer {
    padding: 0;
    margin: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    font-family: "Roboto", helvetica, arial, sans-serif;
    animation: fade 3s ease;
    color: white;
    user-select: none;
}

select {
    font-family: "Roboto", helvetica, arial, sans-serif;
    background: rgba(255,255,255,0.25);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 300;
    outline: none;
    float: right;
}

option {
    color: #888;
}

input[type="number"] {
    color: white;
    border: none;
    font-weight: 300;
    background: rgba(255,255,255,0.25);
    padding: 1px 2px;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

input[type=range] {
    -webkit-appearance: none;
    border: none;
    outline: none;
    width: 100%;
    flex: 1;
    height: 16px;
    background-color: transparent;
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 1px;
    background: white;
    border: none;
    border-radius: 5px;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    border: none;
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: white;
    margin-top: -5px;
}
input[type=range]:focus {
    outline: none;
}
input[type=range]:focus::-webkit-slider-runnable-track {
    background: white;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 1px;
    background: white;
    border: none;
    border-radius: 5px;
}
input[type=range]::-moz-range-thumb {
    border: none;
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: white;
}

input[type=range]:-moz-focusring{
    outline: 1px solid white;
    outline-offset: -1px;
}

input[type=range]::-ms-track {
    width: 100%;
    height: 1px;
    background: white;
    border-radius: 10px;
    color: transparent;
    border: none;
    outline: none;
}
input[type=range]::-ms-thumb {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: white;
    border: none;
    outline: none;
    margin-top: 2px;
}

input:focus {
    outline: none;
    opacity: 1;
}

#info {
  position: absolute;
  text-align: center;
  top: 0px; width: 100%;
  padding: 15px;
}


#up-select {
    width: 70px;
    margin: 0 20px;
}

#menu {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    margin: 20px;
}

#urdf-options li {
    cursor: pointer;
    opacity: 0.5;
    font-size: 10px;
    font-weight: 100;
}

#urdf-options li:hover {
    opacity: 0.75;
}

#controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 15px 0;
    transition: 0.5s opacity ease;
    overflow: hidden;
}

#controls > * {
    margin: 5px 0;
}

#controls #toggle-controls {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: right;
    transition: 0.1s opacity linear;
    border-top: 1px solid white;
}

#controls #toggle-controls:hover {
    text-decoration: underline;
    cursor: pointer;
}

#controls #toggle-controls:before {
    content: "hide controls";
    font-size: 12px;
    font-weight: normal;
}

/* hidden state */
#controls.hidden #toggle-controls:before {
    content: "show controls";
}


#controls.hidden > *:not(#toggle-controls) {
    display: none;
}

#controls.hidden #toggle-controls {
    opacity: 0.5;
}

/* list of joint sliders */
#controls ul {
    flex: 1;
    overflow-y: auto;
}

#controls li {
    font-size: 12px;
    display: flex;
    align-items: center;
    padding: 1px 0;

    width: 100%;
    user-select: text;

    transition: background 0.25s ease;
}

#controls li[robot-hovered] {
    background: rgba(255,255,255,0.35);
}

#controls li span {

    padding: 0 5px;
    max-width: 125px;
    text-overflow: ellipsis;
    overflow: hidden;

}

#controls li input[type="number"] {
    width: 50px;
    overflow: hidden;
}

/* toggle controls */
.toggle {
    padding-left: 25px;
    position: relative;

    cursor: pointer;
}

.toggle:before {
    content: "";
    position: absolute;
    left: 0;
    width: 15px;
    height: 15px;

    border-radius: 10px;
    border: 2px solid white;

    margin-right: 5px;
}

.toggle:after {
    content: "";
    width: 9px;
    height: 9px;

    position: absolute;
    left: 5px;
    top: 5px;
    background: white;
    border-radius: 10px;
    opacity: 0;
}

.toggle:not(.checked):hover:after {
    opacity: 0.25;
}

.toggle.checked:after {
    opacity: 1;
}

@keyframes fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 700px) {
    #controls {
        display: none;
    }
}
