Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

2.2 KB
Raw Blame
.container {
  display: flex;
  width: 100%;
  height: 100%;

  &[data-layout="sidebar"] {
    flex-direction: row;

    .question {
      flex: 1;
      height: 100%;
    }

    .chat {
      width: 100%;
      height: 100%;
      max-width: 18.75rem;
      border-left: 1px solid var(--mb-color-border-neutral);
    }

    /**
      We already have disclaimer in the sidebar, so we don't
      need to repeat it in the empty state.
    */
    .stackedOverflowButton,
    .emptyStateDisclaimerText {
      display: none;
    }
  }

  &[data-layout="stacked"] {
    flex-direction: column;

    .question {
      flex: 0 0 60%;
      height: 60%;
      overflow: hidden;
    }

    .chat {
      flex: 0 0 40%;
      height: 40%;
      width: 100%;
      max-width: none;
      border-left: none;
    }

    .sidebarHeader {
      display: none;
    }

    /* Overflow menu is only visible in stacked layout. */
    .stackedOverflowButton,
    .chatButton {
      display: flex;
      padding: 0.25rem;
      border-radius: 4px;
      transition: background-color 0.2s ease;

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

    .stopGenerationButton {
      width: 1.3rem;
      height: 1.3rem;
    }

    /** Only show the top border when there are messages. */
    .chatHistory:not(:empty) {
      border-top: 1px solid var(--mb-color-border-neutral);
    }
  }
}

.longChatNotice {
  margin-top: 0.5rem;
}

/* Prompt suggestions */
.promptSuggestionsContainer {
  flex-shrink: 0;
  max-width: 22.5rem;
}

.promptSuggestionButton {
  display: block;
  height: auto;
  text-align: left;
  line-height: 1.4;
  padding: 0.5rem 0.75rem;
  width: fit-content;
  border-radius: var(--mantine-radius-sm);
  background-color: var(--mb-color-background_surface-brand-subtle);
  color: var(--mb-color-icon-primary);
  font-size: 0.875rem;
}

.promptSuggestionButton span {
  text-wrap-mode: wrap;
  justify-content: flex-start;
}

/* Chat input */
.chatInput {
  border: none;
  border-radius: 0;
  background-color: transparent !important;

  &:focus {
    outline: none;
    border-color: transparent;
  }
}

/* Remove the default padding to align the scrollbars */
.question :global(.sdk-question-main) {
  padding: 0 !important;
}