@import "general-gui/main";
@import "app-components/tabs";
@import "app-components/card";

#root {
  max-width: 1280px;
  margin: 0 auto;
}

.top-layout {
  display: flex;
  flex-direction: row;
  width: 100%;

  & > .session-list {
    flex-grow: 0;
  }

  & > .session-tab {
    padding: $panel-body-padding;
    flex-grow: 1;
    min-width: 0;
  }
}

.session-editor {
  display: flex;
  flex-direction: column;
}

.prompt-header {
  cursor: pointer;
}

.response-settings {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid $hr-border-color;
  margin-bottom: 0.5rem;
}

.response-message {
  display: flex;
  gap: $component-padding-horizontal;

  &:not(:last-child) {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid $hr-border-color;
    margin-bottom: 0.5rem;
  }

  & > .response-message-gutter {
    color: $headings-color;
    width: 2rem;
    flex: 0 0 auto;
  }

  & > .response-message-text {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
  }

  & > .response-message-text > P {
    margin-top: 0px;
    margin-bottom: 0px;
  }
}

.response-message-controls {
  float: right;
}

.hidden {
  display: none;
}

.uploaded-image {
  position: relative;
  display: inline-block;

  cursor: pointer;
  & > IMG {
      max-width: 200px;
      max-height: 200px;
      object-fit: cover; /* or contain */
  }
  & > BUTTON {
    position: absolute;
    top: 0px;
    right: 0px;
  }
}

.file-preview {
  position: fixed;
  top: 0px;
  bottom: 0px;
  left: 0px;
  right: 0px;
  background-color: change-color($background-color, $alpha: alpha($background-color) - 0.2);
  cursor: pointer;

  & > IMG {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: 90%;
    max-height: 90%;
    transform: translate(-50%, -50%);
  }
}