/* Split layout container */
.split-container {
    display: flex;
    height: 100%;
    gap: 0;
    /*background-color: white;*/

    .sidebar {
        width: 33.333%;
        min-width: 140px;
        max-width: 200px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: #fafafa;
        border-radius: 0 0 0 var(--window-radius);

        .sidebar-list {
            flex: 1;
            overflow-y: auto;
            padding: 8px;
            min-height: 0;

            .sidebar-item {
                display: flex;
                align-items: center;
                gap: 12px;
                padding: 10px 12px;
                border-radius: 6px;
                cursor: pointer;
                transition: background 0.2s;
                user-select: none;

                &:hover {
                    background: rgba(0, 0, 0, 0.05);
                }

                &:active {
                    background: rgba(0, 0, 0, 0.1);
                }

                .sidebar-item-icon {
                    font-size: 24px;
                    flex-shrink: 0;
                }

                .sidebar-item-name {
                    font-size: 14px;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                    color: #333;
                }

            }
        }
    }

    .split-separator {
        width: 1px;
        background: rgba(224, 224, 224, 1);
        flex-shrink: 0;
    }
    .main-panel {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-width: 0;
        background-color: white;
        border-radius: 0 0 var(--window-radius) 0;

        .toolbar {
            display: flex;
            gap: 8px;
            padding: 12px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            background: #f8f8f8;
            flex-shrink: 0;
            overflow-x: auto;
            overflow-y: hidden;

            .toolbar-button {
                padding: 6px 12px;
                border: 1px solid rgba(0, 0, 0, 0.15);
                border-radius: 6px;
                background: white;
                cursor: pointer;
                font-size: 13px;
                transition: all 0.2s;
                user-select: none;
                white-space: nowrap;
                flex-shrink: 0;

                &:hover {
                    background: rgba(0, 0, 0, 0.05);
                    border-color: rgba(0, 0, 0, 0.25);
                }

                &:active {
                    transform: scale(0.98);
                    background: rgba(0, 0, 0, 0.1);
                }
            }
        }

        .grid-container {
            display: grid;
            gap: 12px;
            overflow-y: auto;
            flex: 1;
            padding: 12px;
            min-height: 0; /* Allow flex child to shrink below content size */

            .grid-item {
                display: flex;
                flex-direction: column;
                align-items: center;
                padding: 12px;
                background: #f5f5f5;
                border-radius: 8px;
                cursor: pointer;
                transition: background 0.2s, transform 0.1s;
                user-select: none;

                &:hover {
                    background: #e8e8e8;
                    transform: translateY(-2px);
                }

                &:active {
                    transform: translateY(0);
                }

                .grid-item-icon {
                    font-size: 48px;
                    margin-bottom: 8px;
                }

                .grid-item-name {
                    font-size: 12px;
                    text-align: center;
                    color: #333;
                    word-break: break-word;
                }

            }
        }
    }
}
