:root {
    --menu-font-size: 14px;
    --menu-li-top-padding: 0.5rem;
    --menu-li-bottom-padding: 0.5rem;
    --menu-li-left-padding: 0.5rem;
    --menu-li-right-padding: 0.5rem;
    --menu-li-padding: var(--menu-li-top-padding) var(--menu-li-right-padding) var(--menu-li-bottom-padding) var(--menu-li-left-padding);
    --dialog-background-color: #424242;
    --dialog-font-color: white;
}

ui-menubar {
    display: flex !important;
    list-style-type: none;
    padding: 0 0.5rem;
    margin: 0;
    color: white;
    background-color: #424242;
    font-family: 'Arial', sans-serif;
    cursor: default;
    li {
        position: relative !important;
        font-size: var(--menu-font-size);
        padding: var(--menu-li-padding);
    }
    li:hover {
        background-color: #2c2c2c;
    }
    li > ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: calc(var(--menu-font-size) + var(--menu-li-top-padding) + var(--menu-li-bottom-padding));
        left: 0px;
        list-style-type: none;
        padding: 0;
        margin: 0;
        z-index: 1;
        font-family: 'Arial', sans-serif;

        li {
            padding: 0.5rem 0.5rem;
            background-color: #424242;
            color: white;
            padding-left: 20px;
            cursor: pointer;
        }
        li:hover {
            background-color: #2c2c2c;
        }
        li[separator] {
            border-top: 1px solid white;
            padding: 0;
        }
        li[disabled] {
            color: #aaa;
            cursor: default;
        }
        li[checked]::before {
            content: '✓';
            margin-right: 0.5rem;
        }
    }
}

ui-menubar[open] > li:hover > ul {
    display: flex;
}

ui-panel {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    color: white;
    background-color: #424242;
    font-family: 'Courier New', Courier, monospace;
    font-size: var(--menu-font-size);
    box-sizing: border-box;
    cursor: default;

    h2 {
        text-align: center;
        border-radius: 0.5rem 0.5rem 0 0;
        padding: 0.5rem 0;
        color: white;
        background-color: #2c2c2c;
        font-size: 0.9rem;
        font-weight: bold;
    }
}

ui-panel[hidden] {
    display: none;
}

ui-category {
    display: flex;
    flex-direction: column;
    h3 {
        margin: 0;
        padding: 0.2rem 0;
        font-size: 0.8rem;
        text-align: center;
        background-color: #2c2c2c;
        opacity: 0.6;
    }
}

ui-category[hidden] {
    display: none;
}

ui-horizontal-splitter {
    display: flex;
    flex-direction: column;
    box-sizing: border-box !important;
    width: 100%;
    height: 100%;
    > .splitter {
        background-color: #999;
        height: 8px;
        flex-shrink: 0;
        cursor: row-resize;
    }
    .splitter:hover {
        background-color: #ccc;
    }
}

ui-horizontal-splitter[hidden] > .splitter {
    display: none;
}

ui-vertical-splitter {
    display: flex;
    flex-direction: row;
    box-sizing: border-box !important;
    width: 100%;
    height: 100%;
    > .splitter {
        background-color: #999;
        width: 8px;
        flex-shrink: 0;
        cursor: col-resize;
    }
    .splitter:hover {
        background-color: #ccc;
    }
}
ui-vertical-splitter[hidden] > .splitter {
    display: none;
}

ui-text-field {
    width: 100%;
    padding: 0.2rem 0;
    font-size: 0.8rem;
    div {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        label {
            width: 30%;
            padding-left: 0.5rem;
        }
        input {
            width: 70%;
            margin-right: 0.5rem
        }
    }
}

ui-checkbox-field {
    width: 100%;
    padding: 0.2rem 0;
    font-size: 0.8rem;
    div {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        label {
            width: 30%;
            padding-left: 0.5rem;
        }
        input {
            /* width: 70%; */
            margin-left: 5px;
        }
    }
}

ui-vector3-field {
    width: 100%;
    padding: 0.2rem 0;
    font-size: 0.8rem;
    div {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        height: 100%;
        margin-right: 0.5rem;
        label {
            width: 40%;
            padding-left: 0.5rem;
            margin: 0;
            align-self: flex-end;
        }
        div {
            display: flex;
            flex-direction: column;
            width: 20%;
            padding-left: 0;
            margin: 0;
            label {
                text-align: center;
                align-self: center;
                padding: 0;
                width: 100%;
                font-size: 0.8rem;
                height: 1rem;
                box-sizing: border-box;
            }
            input {
                width: 100%;
                box-sizing: border-box;
            }
        }
    }
}

ui-editor {
    display: flex;
    flex-direction: column;

    > div[view] {
        flex-grow: 1;
        overflow-y: auto;
        .cm-editor {
            height: 100%;
        }
    }
    ::-webkit-scrollbar {
        height: 0.5rem;
        width: 0.5rem;
    }
    ::-webkit-scrollbar-track {
    background-color: transparent;
    border-radius: 0px; /* 9999px; */ /* Arrondi des coins */
    }
    ::-webkit-scrollbar-thumb {
        background-color: #888;
        border-color: rgba(255,255,255,1);
        border-radius: 0px; /* 9999px; */
        border-width: 2px;
    }
    ::-webkit-scrollbar-corner {
        background-color: transparent;
    }
}

ui-terminal {
    display: flex;
    flex-direction: column;
    background-color: black;
    div[terminal-header] {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    h3 {
        flex-grow: 1;
        margin: 0;
        padding: 0.2rem 0;
        font-size: 0.8rem;
        text-align: center;
        background-color: #2c2c2c;
        opacity: 0.6;
        box-sizing: border-box;
    }
    .terminal {
        padding-left: 5px;
    }
    ::-webkit-scrollbar {
    height: 0.5rem;
    width: 0.5rem;
    }
    ::-webkit-scrollbar-track {
    background-color: transparent;
    border-radius: 0px; /* 9999px; */ /* Arrondi des coins */
    }
    ::-webkit-scrollbar-thumb {
        background-color: #888;
        border-color: rgba(255,255,255,1);
        border-radius: 0px; /* 9999px; */
        border-width: 2px;
    }
    ::-webkit-scrollbar-corner {
        background-color: transparent;
    }
}

ui-three-view {
    position: relative !important;
    width: 100%;
    height: 100%;

    canvas {
        position: absolute !important;
        top: 0px;
        left: 0px;
        width: 100%;
        height: 100%;
    }

    .renderer-info {
        position: absolute !important;
        bottom: 10px;
        right: 10px;
        background: gray;
        color: white;
        font-size: 0.8rem;
        font-family: 'Arial', sans-serif;
        padding: 0.5rem;
    }
}

ui-timestamp {
    background: gray;
    color: white;
    font-size: 0.8rem;
    font-family: 'Arial', sans-serif;
    padding: 0.5rem;
}

load-project-dialog {
    > dialog {
        background-color: var(--dialog-background-color);
        color: var(--dialog-font-color);

        h3 {
            font-size: 1.5rem;
            margin: 0;
            padding-bottom: 0.5rem;
        }

        ul {
            list-style-type: none;
            background-color: beige;
            color: black;
            padding: 0;
            margin: 0;
            overflow-y: scroll;
            height: 5rem;
            font-size: 0.9rem;

            li {
                padding: 0.1rem 0.3rem;
                margin: 0;
                cursor: pointer;
            }
            li[selected] {
                background-color: #807a6c;
                color: white;
            }
        }
        div[slot="buttons"] {
            display: flex;
            justify-content: flex-end;
            padding-top: 1rem;
        }
    }
}
