html {

    /* --unit-size: 32px; */
    --unit-size: 32;
    --font-size: 14px;
    --font-weight: 400;
    --control-border-radius: 4px;

    height: 100%;
    min-height: 100%;
    box-sizing: border-box;
    font-family: Roboto;
    font-size: var(--font-size);
    line-height: 1.25;
    font-weight: var(--font-weight);
}

body {
    height: 100%;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
    touch-action: pan-x pan-y;
}

* {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/*
    Basic inputs controls
*/

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="url"],
input[type="email"],
textarea,
select {
    display: flex;
    flex-direction: row;
    align-items: center;
    border: 0;
    outline: 0 !important;
    color: inherit;
    height: 1.5em;
    padding: 0;
    padding-left: 0.5em;
    padding-right: 0.5em;
    width: 100%;
}

textarea {
    height: auto;
}

::placeholder {
    font-style: oblique;
    color: inherit;
    opacity: 0.5;
    font-size: 0.85em;
}

/*
    Input text
*/

input[type="text"],
input[type="password"] {
    box-sizing: border-box;
}

input[type="text"].right,
input[type="password"].right {
    text-align: right;
}

/*
    Input number
*/

input[type="number"] {
    box-sizing: border-box;
    text-align: right;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

/*
    Input range
*/

input[type="range"] {
    appearance: none;
	-webkit-appearance: none;
    overflow: hidden;
    display: block;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    border: 0;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    border: 0;
    height: 4px;
    width: 8px;
    border-radius: 0;
    cursor: pointer;
    box-shadow: -80px 0 0 80px;
}


input[type=range] {
	height: 4px;
}

input[type=range]::-moz-range-track {
	height: 4px;
	background-color: #041c33;
}

input[type=range]::-moz-range-progress{
	height: 4px;
	background-color: #0a62d4;
}

input[type=range]::-moz-range-thumb {
	background-color: #fff;
	height: 4px;
	border-radius: 0;
	border: 0;
	cursor: pointer;
}


/*
    Input color
*/

input[type="color"] {
    appearance: none;
	-webkit-appearance: none;
	border: none;
	width: 0.8em;
	height: 0.8em;
    padding: 0;
    box-sizing: border-box;
    cursor: pointer;
    border-radius: 0.15em;
    overflow: hidden;
}

input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 0;
}

input[type="color"]::-webkit-color-swatch {
	border: none;
}

/*
    Checkbox
*/

input[type=checkbox] {
    width: 0.8em;
	height: 0.8em;
    cursor: pointer;
    padding: 0;
    border-radius: 0.15em;
    overflow: hidden;
}

/*
    Select
*/

select {
    font-size: 0.8em;
    background: inherit;
    color: inherit;
    box-sizing: border-box;
}

/*
    Button
*/

button {
    border: 0;
    color: inherit;
    height: 2rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0;
    padding-bottom: 0;
    border-radius: var(--control-border-radius);
    display: flex;
    flex-flow: row;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-sizing: border-box;
    min-width: 10rem;
    user-select: none;
}

button:focus {
    outline: 0;
}

button[disabled], button.is-disabled {
    cursor: default;
    opacity: 0.5;
}

button.plain {
    background-color: transparent;
    color: inherit;
    min-width: auto;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

button > .title {
    width: 100%;
    text-align: center;
}

button > .icon {
    font-size: 1.25rem;
}

button.pure {
    height: 1rem;
    padding-left: 0;
    padding-right: 0;
}


/*
    Buttons list
*/

.buttons {
    margin-top: 1rem;
    display: flex;
    flex-flow: row;
    justify-content: center;
}

.buttons > * + * {
    margin-left: 0.5rem;
}


/*
    Form
*/

form > .message {
    padding: 0.25rem 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid currentColor;
    border-radius: var(--control-border-radius);
}

form > label {
    display: block;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

form > label > .title {
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

form > label > input[type="text"],
form > label > input[type="password"],
form > label > input[type="number"],
form > label > input[type="date"],
form > label > input[type="time"],
form > label > input[type="datetime-local"],
form > label > input[type="url"],
form > label > input[type="email"],
form > label > select {
    border-radius: var(--control-border-radius);
    height: 2rem;
}


/*
    Scrollbars
*/

html {
    --scrollbar-size: 9px;
}

.firefox, .firefox body {
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
}


/*
    Activity
*/

.activity {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    display: flex;
    flex-flow: column;
    align-items: center;
}

.activity.is-loading {
    align-items: center;
    justify-content: center;
}

.activity > .title {
    text-align: center;
    font-weight: 100;
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.75;
}


/*
    Preloader
*/

.preloader {
    display: none;
}

.is-loading > * {
    display: none;
}

.is-loading > .preloader {
    display: flex;
    width: 100%;
    height: 100%;
    min-width: 3rem;
    min-height: 3rem;
    font-size: 2rem;
    flex-flow: column;
    align-items: center;
    justify-content: center;
}

/*
    Tree
*/

.tree .node {
    display: flex;
    flex-flow: column;
    align-items: start;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
        width: 100%;
        box-sizing: border-box;
}

.tree .node > .title {
    display: flex;
    flex-flow: row;
    cursor: pointer;
    align-items: center;
    border-radius: var(--control-border-radius);
    /* margin-bottom: 0.1em; */
    padding-right: 0.25em;
    min-height: var(--component-parameters-tree-min-title-height);
    padding-left: 0.5em;
    padding-right: 0.5em;
        box-sizing: border-box;
}

.tree.cut-titles .node > .title {
    width: 100%;
}

.tree .node > .content > .property {
    border-radius: var(--control-border-radius);
}

.tree.cut-titles .node > .title .description {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.tree .is-selected {
    outline: 3px solid transparent;
}

.tree .node > .title > .icon,
.tree .node > .content > .property > .icon,
.tree .node > .content > .hint-property > .icon {
    font-size: 1.25em;
    width: 1.5em;
    /* height: 1.5em; */
    min-width: 1.5em;
    /* min-height: 1.5em; */
    max-width: 1.5em;
    /* max-height: 1.5em; */
    margin-right: 0.5em;
    align-items: center;
    justify-content: center;
    display: inline-flex;
}

.tree .node > .title > .name,
.tree .node > .content > .property > .name,
.tree .node > .content > .hint-property > .name {
    /*max-width: calc(100% - 1.5rem - 2 * 0.25rem);
    text-overflow: ellipsis;*/
    overflow: hidden;
    /* white-space: nowrap; */
    display: inline-flex;
    flex-flow: row;
    align-items: center;
}

.tree .node > .content > .property > .name .description,
.tree .node > .content > .hint-property > .name .description {
    display: inline-block;
}

.tree .node .id, .tree .node .prefix {
    display: inline-block;
    margin-right: 0.5em;
    border-radius: var(--control-border-radius);
    padding-left: 0.5em;
    padding-right: 0.5em;
}

.tree .node .id::before {
    content: '#';
    display: inline;
    /* opacity: 0.5; */
}

.tree .node.is-opened > .title > .icon > .is-opened {
    display: block;
}

.tree .node.is-opened > .title > .icon > .is-closed {
    display: none;
}

.tree .node.is-closed > .title > .icon > .is-opened {
    display: none;
}

.tree .node.is-closed > .title > .icon > .is-closed {
    display: block;
}

.tree .node.is-root.hide-root > .content,
.tree .node.is-opened > .content {
    display: block;
        width: 100%;
        box-sizing: border-box;
}

.tree .node.is-closed > .content {
    display: none;
}

.tree .node >.content {
    padding-left: 1.5em;
}

.tree .node > .content > .property,
.tree .node > .content > .hint-property {
    display: flex;
    flex-flow: row;
    margin-bottom: 0.1em;
    padding-left: 0.5em;
    padding-right: 0.5em;
}

.tree .node > .content > .property .value,
.tree .node > .content > .hint-property .hint-name,
.tree .node > .content > .hint-property .hint-value {
    display: inline-block;
    margin-left: 0.5em;
    border-radius: var(--control-border-radius);
    padding-left: 0.5em;
    padding-right: 0.5em;
}

.tree .node > .content > .hint-property .hint-name {
    margin-left: 0;
}

.tree .node > .content > .hint-property .hint-value {
    margin-left: 0;
}

.tree .is-unavailable {
    opacity: 0.5;
}

.tree .node.is-root.hide-root > .title {
    display: none;
}

.tree .node.is-root.hide-root > .content {
    padding-left: 0;
}

/*
    List
*/

.list {
    /* margin-top: 4rem; */
    width: 100%;
    max-width: 24rem;
    box-shadow: 0 0 4rem rgba(0,0,0,0.1);
    display: flex;
    flex-flow: column;
    align-items: stretch;
    justify-content: stretch;
    border-radius: var(--control-border-radius);
    overflow: hidden;
    max-height: 20rem;
    overflow-y: auto;
}

.list > .item {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid;
    cursor: pointer;
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    align-items: center;
}

.list > .item.is-unavailable,
.list > .item.is-unavailable:hover {
    background-color: transparent;
    cursor: default;
}

/*
    Sidebar
*/

.sidebar {
    width: 20rem;
    height: 100%;
    min-height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 101000;
    box-sizing: border-box;
    visibility: hidden;
}

.sidebar.is-shown {
    visibility: visible;
}

.sidebar > .content {
    overflow-x: hidden;
    overflow-y: scroll;
    height: 100%;
    min-height: 100%;
    box-sizing: border-box;
    padding: 1rem;
}

.sidebar .subdivision {
    margin-bottom: 1rem;
    padding-bottom: 1px;
}

.sidebar .subdivision > .subdivision {
    margin: 0.5rem;
    padding-bottom: 1px;
    border: 1px solid;
}

.sidebar .subdivision > .title {
    padding: 0.25rem 0.5rem;
    text-transform: uppercase;
    font-weight: 300;
    font-size: 0.6rem;
    letter-spacing: 0.05rem;
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    align-items: center;
}

.sidebar label {
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 0 0.5rem;
    align-items: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.sidebar label > .title {
    width: 50%;
    box-sizing: border-box;
    font-size: 0.8rem;
    padding-right: 0.5rem;
    user-select: none;
}

.sidebar label input[type="text"],
.sidebar label input[type="password"],
.sidebar label input[type="number"],
.sidebar label input[type="date"],
.sidebar label input[type="time"],
.sidebar label input[type="datetime-local"],
.sidebar label input[type="url"],
.sidebar label input[type="email"],
.sidebar label select {
    width: 50%;
    margin-right: 1px;
}

.sidebar label .number-range {
    width: 50%;
}

.sidebar label .color-input {
    display: flex;
    flex-flow: row;
    align-items: center;
    justify-content: end;
}

.sidebar label .color-input input[type=text] {
    text-align: right;
    width: calc(100% - 1.75rem);
    padding-right: 1.75rem;
    margin-right: -1.25rem;
}

.sidebar label .number-range input {
    width: 100%;
    position: relative;
}

.sidebar label input[type="number"] {
    padding-right: 0;
}

.sidebar label input[type=url],
.sidebar label select {
    width: auto;
    max-width: 50%;
}

.sidebar button {
    font-size: 0.8rem;
    min-width: 8rem;
}

.sidebar label button {
    height: 1.5rem;
}

.sidebar .subdivision {
    display: none;
}

.sidebar .subdivision.is-shown {
    display: block;
}

.sidebar label.align-center {
    display: flex;
    flex-flow: column;
    align-items: center;
}

.sidebar label .input-button {
    width: 50%;
}

.sidebar label .input-button input {
    width: calc(100% - 1.5rem);
}

.sidebar label .parameter-pickers {
    display: flex;
}

.sidebar label .parameter-pickers > .pickParameter.andSetRecursive {
    margin-left: 0.5rem;
    width: 2rem;
    min-width: 2rem;
    max-width: 2rem;
    padding-left: 0;
    padding-right: 0;
}

/*
    Input with button
*/

.input-button {
    display: flex;
    flex-flow: row;
}

.input-button input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-button button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    min-width: auto;
    width: 1.5rem;
    padding-left: 0;
    padding-right: 0;
    font-size: 1.25rem;
}

/*
    Hint
*/

.hint {
    font-weight: 100;
    font-size: 0.8rem;
    opacity: 0.5;
}

/*
    Utilities
*/

.spin {
    animation-name: spin;
    animation-iteration-count: infinite;
    animation-duration: 0.25s;
    animation-timing-function: linear;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(359deg);
    }
}

.is-hidden {
    display: none !important;
}
