.root {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.split {
    width: 1px;
    height: 14px;
    margin: 0px 8px;
    background-color: rgba(128, 128, 128, 0.45);
}

.titleBar {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 2px 4px;

    .left {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-self: center;

        .appIcon {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-self: center;
            border-radius: 6px;
            padding: 4px 6px;
            margin: 2px;
            cursor: default;

            .icon {
                width: 24px;
                height: 24px;
                padding: 2px;
            }

            span {
                font-size: 12px;
                font-weight: 700;
                text-wrap: nowrap;
            }
        }
    }

    .center {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin: auto;
        flex: 0 1 auto;
        overflow: auto;

        .views {
            display: flex;
            flex-direction: row;
            align-items: center;
            border-radius: 8px;
            padding: 2px 0px;
            overflow: hidden;

            .tab {
                display: flex;
                flex-direction: row;
                align-items: center;
                border-radius: 6px;
                height: 26px;
                background-color: var(--title-background);
                padding: 2px;
                width: 220px;
                overflow: hidden;
                margin: 0px 2px;
                cursor: default;
                transition: width 0.2s ease-out;

                &:hover {
                    background-color: var(--hover-background-color);
                }

                .name {
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    margin-right: auto;
                    margin-left: 8px;
                    text-wrap: nowrap;
                    user-select: none;
                    text-decoration: dashed;
                    overflow: hidden;

                    .split {
                        padding: 0px 4px;
                    }

                    span {
                        font-size: 12px;
                    }
                }

                .close {
                    width: 12px;
                    height: 12px;
                    margin: 4px;
                    padding: 6px;
                    border-radius: 6px;
                    flex-shrink: 0;

                    &:hover {
                        background-color: var(--hover-background-color);
                    }
                }
            }

            .active {
                width: 260px;
                background-color: var(--title-checked);
            }
        }

        .new {
            width: 16px;
            height: 16px;
            margin-left: 2px;
            padding: 6px;
            border-radius: 6px;

            &:hover {
                background-color: var(--hover-background-color);
            }
        }
    }

    .right {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin: 2px 8px;
        flex: 0 0 auto;

        .icon {
            width: 24px;
            height: 24px;
            padding: 4px;
            border-radius: 4px;

            &:hover {
                background-color: var(--hover-background-color);
            }
        }
    }
}

.ribbonTitlePanel {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 0px 4px;
    flex: 0 0 auto;

    .home {
        width: 14px;
        height: 14px;
        padding: 6px;
        border-radius: 4px;
        margin: 0px 4px;

        &:hover {
            background-color: var(--hover-background-color);
        }
    }

    & .quickCommands {
        display: flex;
        flex-direction: row;

        svg {
            width: 14px;
            height: 14px;
            padding: 6px;
            border-radius: 4px;
            margin: 0px 6px;

            &:hover {
                background-color: var(--hover-background-color);
            }
        }
    }

    .tabHeader {
        color: var(--titlebar-forground-color);
        padding: 5px 15px;

        &:hover {
            -webkit-text-stroke: 0.65px var(--foreground-color);
            background-color: var(--hover-background-color);
        }
    }

    .activedTab {
        position: relative;

        &::after {
            content: "";
            position: absolute;
            bottom: -2px;
            left: 8px;
            right: 8px;
            height: 3px;
            background-color: var(--primary-color);
        }
    }
}

.tabContentPanel {
    display: flex;
    flex-direction: row;
    background-color: var(--panel-background-color);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;

    &::-webkit-scrollbar {
        height: 6px;
    }

    &::-webkit-scrollbar-thumb {
        background: var(--foreground-muted-color);
        border-radius: 5px;
    }

    & .groupPanel {
        display: flex;
        flex-direction: row;
    }
}

.commandContextPanel {
    display: flex;
    flex-direction: row;
    justify-content: stretch;
    flex: 1 1 auto;
    height: 32px;
    background-color: var(--panel-background-color);
    border-bottom: 1px solid var(--border-color);
}

.ribbonGroup {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    justify-items: center;
    flex-shrink: 0;

    .header {
        color: var(--foreground-color);
        font-size: 12px;
    }

    .content {
        height: 72px;
        flex-shrink: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-items: center;
        overflow: hidden;
    }
}

.ribbonGroup::after {
    content: "";
    position: absolute;
    display: grid;
    right: 0px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background-color: var(--border-color);
}
