@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/web/Inter-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/web/Inter-Bold.woff2') format('woff2');
  font-weight: bold;
  font-style: normal;
}

:root {
  --font-main: 'Inter';
  --font-secondary: 'Inter';
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  font-family: var(--font-main), Arial, sans-serif;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-secondary);
}

p {
  font-family: var(--font-main);
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-color: #f8f8f8;
  padding: 20px;
}

.chat-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
  align-content: center;
  justify-content: center;

  h3{
    font-size: 1.4em;
  }

  .question-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    button {
      background-color:  #005550;
      color: white;
      border: none;
      padding: 10px;
      cursor: pointer;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
      width: 100%;
      max-width: 150px;
      font-size: 1.01em;
      display: flex;         
      align-items: center;   
      justify-content: center; 
      text-align: center;   

      &:hover {
        background-color: #008275;
        color: white;
      }
    }
    &.hidden {
      display: none;
    }
  }
}

.chat-head * {
  text-align: center;
}

.chat-head p {
  font-family: var(--font-main);
}

.chat-container {
  padding: 10px;
  margin-bottom: 10px;
  overflow-y: scroll;
  flex-grow: 1;
  gap: 10px;
  display: flex;
  flex-direction: column;
  width: 100%;

  &.hidden {
    display: none;
  }
}

.message-block {
  background-color: #fff;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;

  .message-head {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: end;

    .message-timestamp {
      font-size: 0.8em;
      color: #888;
    }

    .message-source {
      font-weight: bold;
      margin-right: 10px;
      text-transform: capitalize;
    }
  }

  .message-content {
    font-size: 1em;
  }
}

.message-user {
  background-color: #c9e2de;

  .message-component {
    align-self: flex-end;
  }
}

.chat-form {
  display: flex;
  gap: 10px;
  width: 100%;
  position: sticky;

  .send-button {
    background-color: #005550;
    color: white;
    border: none;
    font-family: var(--font-secondary);
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 150px;
    height: 45px;
    align-self: flex-end;
    display: flex;
    align-items: center; 
    justify-content: center;

    &:hover {
      background-color: #008275;
      color: white;
    }

    &:disabled {
      background-color: #ccc;
      color: #888;
      cursor: not-allowed;
    } 
  } 
  .send-button img {
       max-height: 80%;
       max-width: 80%;
       height: 70%;;
       width: auto;
       display: block;
  }
}

.message-input {
  border: 1px solid #ccc;
  flex-grow: 1;
  font-family: var(--font-main);
  font-size: 16px;
  padding: 10px;
  width: 100%;
  height:  45px;
  outline: 2px solid transparent;
  overflow: hidden;
  outline-offset: 2px;
  resize: none;
  max-height: 100px;  

  &:focus-within {
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  &:focus-within::placeholder {
    color: transparent;
  }
}

@media (max-width: 640px) {
  .chat-container {
    padding: 0 0 2px 0;

    .message-block {
      box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
    }
  }

  .chat-form {
    flex-direction: column;

    .send-button {
      width: 100%;
      max-width: none;
    }
  }
}

.message-component ul {
  padding-left:  10px;
  margin-left: 0;
  list-style-position: inside;
}
.message-content p {
    margin-bottom: 1em;
}

.message-content li {
    margin-bottom: 0.5em;
}

