@use "../../../node_modules/@cloudscape-design/design-tokens/index" as awsui;

.chat_container {
  margin-bottom: -40px;
  min-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (min-width: 466px) {
  .chat_container {
    min-height: calc(100vh - 104px);
  }
}

@media (min-width: 689px) {
  .chat_container {
    min-height: calc(100vh - 60px);
  }
}

@media (min-width: 913px) {
  .chat_container {
    min-height: calc(100vh - 68px);
  }
}

.status_container {
  position: relative;
  // max-width: 400px;
  // margin-left: 20px;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 0 10px rgb(190, 190, 190);
  border: none;
  padding: 20px;
  margin-bottom: 60px;
}

.sql_container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 20px;
}

.welcome_text {
  color: awsui.$color-text-body-default;
  font-size: 3rem;
  font-weight: bolder;
  opacity: 0.4;
}

.question {
  display: flex;
  gap: 6px;
  padding: 16px 18px;
  margin: 20px 0 0 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 0 10px rgb(140, 140, 140);
  background: linear-gradient(0.25turn, #2a4b74, #172940);
  font-weight: 300;
  color: white;
  > span {
    padding-top: 5px !important;
  }
}

.text {
  color: gray;
  font-size: small;
  font-weight: lighter;
  margin: 2px;
  text-decoration: underline;
  text-underline: gray;
  text-underline-offset: auto;
}

.input_container {
  position: sticky;
  bottom: 0;
  padding-bottom: awsui.$space-scaled-l;
  container-type: inline-size;
  container-name: input_container;
}

.input_area_container {
  box-shadow: 0 0 10px rgb(190, 190, 190);
  border: none !important;
}

.answer_area_container {
  // margin-bottom: 30px;
  border-radius: 0 0 18px 18px !important;
  box-shadow: 0 0 10px rgb(190, 190, 190);
  border: none !important;
  margin-bottom: 60px;
}

.input_textarea_container {
  display: flex;
  gap: 10px;
  align-items: center;

  .input_textarea {
    flex: 1;
    resize: none;
    border: none;
    background-color: rgb(244, 244, 244);
    box-shadow: 0 0 4px 1px #cdcdcdb3 inset;
    border-radius: 10px;
    padding: 4px 12px;
    min-height: 28px;
    outline: none;
    width: 100%;
    height: 100%;
    font-size: 14px;
    transition: all 0.4s ease-in-out;
    &:focus {
      transition: all 0.8s ease-in-out;
      background-color: rgb(254, 254, 254);
    }
  }

  .input_buttons {
    display: flex;
    align-items: center;
  }
}

// TODO: this css class is NOT used anywhere?? is this a ref??
.input_controls {
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: minmax(300px, 800px) minmax(180px, auto);
  gap: awsui.$space-scaled-xs;
  align-items: center;

  .input_controls_selects_2 {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: awsui.$space-scaled-xs;
  }

  .input_controls_selects_1 {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: awsui.$space-scaled-xs;
  }

  .input_controls_right {
    justify-self: end;
  }
}

.btn_chabot_message_copy {
  float: right;
}

.btn_chabot_metadata_copy {
  float: right;
  margin-top: 1em;
}

.img_chabot_message {
  max-width: 30%;
  border-radius: 8px;
}

.questions_grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-content: stretch;
  grid-gap: 8px 10px;
}

.button {
  border: 1px dotted #ccc !important;
  font-weight: 300 !important;
  border-radius: 10px !important;
  padding: 4px 12px !important;
  background-color: white;
  color: gray !important;
  &:hover {
    background-color: #f4f4f4;
    box-shadow: 0 0 4px 1px #cdcdcdb3 inset;
    transform: scale(0.99);
  }
  &:focus {
    outline: none;
    border-color: transparent;
    background-color: #f6f6f6;
  }
}

@media (max-width: 689px) {
  .input_controls {
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr;
    gap: awsui.$space-scaled-xs;
  }
}

@container (max-width: 689px) {
  .input_controls {
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr;
    gap: awsui.$space-scaled-xs;
  }
}

.codeMarkdown {
  background-color: awsui.$color-charts-line-grid;
  text-overflow: ellipsis;
  overflow: scroll;
  border-radius: 5px;
  padding: 5px;
}

.markdownTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
  border: 1px solid awsui.$color-border-divider-default;
  border-radius: awsui.$border-radius-container;
}

.markdownTable th,
.markdownTable td {
  border: 1px solid awsui.$color-border-divider-default;
  padding: 8px;
  text-align: left;
}

.markdownTable th {
  background-color: awsui.$color-background-container-header;
}

.markdownTable tr:nth-child(even) {
  background-color: awsui.$color-background-container-content;
}

.thumbsContainer {
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.thumbsIcon {
  cursor: pointer;
  margin-right: 10px;
  opacity: 0.5;
}

/* Styles for thumbs up icon. Should be compatible with dark theme */
.thumbsUp {
  color: #539fe5;
}

/* Styles for thumbs down icon. Should be compatible with dark theme */
.thumbsDown {
  color: #539fe5;
}

/* Style for clicked state */
.clicked {
  opacity: 0.5;
  pointer-events: none; /* Disable pointer events for a clicked icon */
}

/* Styles for selected icon */
.thumbsIcon.selected {
  opacity: 1 !important;
  pointer-events: none; /* Disable pointer events for the selected icon */
}
