/*
 * Copyright (c) Saga Inc.
 * Distributed under the terms of the GNU Affero General Public License v3.0 License.
 */

.code-block-container {
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 10px 0;

  background-color: var(--chat-background-color);
  border-radius: 4px;
  border: 1px solid var(--grey-300);
  overflow: hidden;
}

.code-content {
  width: 100%;
  overflow-x: auto;
}

.code-block-toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: end;

  width: 100%;
  background-color: var(--chat-user-message-background-color);
  border-bottom: 1px solid var(--grey-300);
  font-size: 0.8em;
}

.code-location {
  flex-grow: 1;
  margin-left: 5px;
  color: var(--chat-user-message-font-color);
}

.code-block-toolbar button {
  background-color: var(--chat-user-message-background-color);
  border: none;
  border-left: 1px solid var(--grey-300);
  border-radius: 0px;

  font-size: 0.8em;
  color: var(--chat-user-message-font-color);
}

.code-block-toolbar button:hover {
  background-color: var(--chat-background-color);
  color: var(--chat-assistant-message-font-color);
}

.active-cell-code-block {
  opacity: 0.7;
}

.active-cell-code-block:hover {
  opacity: 1;
  transition: 0.3s;
}

.code-block-expand-button {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0;
  width: 100%;
  background-color: var(--chat-background-color);
  transition: background-color 0.2s;
  cursor: pointer;
}

.code-block-expand-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.code-block-expand-button svg {
  display: block;
  margin: 0;
}

.code-block-expand-button .icon-button {
  background-color: transparent;
}



