/* Create a CSS layout for a main element and a footer element. The footer element should be sticky at the bottom. */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    margin-bottom: 7rem; /* adjust this value to match the height of your footer */
    z-index: 1;
    display: grid;
    grid-template-columns: 4fr 1fr;
}

footer {
    color: #fff;
    padding-bottom: 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 6rem; /* adjust this value to match the height of your footer */
    z-index: 0;
}

aside {
    position: fixed;
    top: 0;
    right: 0;
    width: 20%;
    height: 100%;
}

.history {
    margin: 10px;
}

#history {
    /* make this div scrollable */
    overflow-y: auto;
    height: 400px;
    width: 100%;
}

.new-message {
    position: relative;
    max-width: 500px;
    /* add a light grey border */
    border: 1px solid #ccc;
    /* a subtle drop shadow */
    box-shadow: 0 0 8px rgba(0, 0, 0, .3);
    padding: 5px;
    border-radius: 10px;
    margin: auto;
    box-sizing: border-box;
}

#newMessage {
    margin: auto;
    /* dont allow resize */
    resize: none;
    /* full width */
    width: 100%;
    /* no border */
    border: none;
    box-sizing: border-box;
    /* center the element */
    display: block;
}

#newMessage:focus {
    outline: none;
}

.message {
    padding: 1rem 1rem 1rem 3rem;
    /* bottom border dark grey */
    border-bottom: 1px solid #ccc;
    /* center the text in the div vertically */
    display: flex;
    align-items: center;
}

.message.assistant {
    /* background color of light blue */
    background-color: #e6e6e6;
}

/* Button used to open the contact form - fixed at the bottom of the page */
.open-button {
  background-color: #555;
  color: white;
  padding: 16px 20px;
  border: none;
  cursor: pointer;
  opacity: 0.8;
  /* position: fixed; */
  /* bottom: 23px; */
  /* right: 28px; */
  width: 300px;
}

/* The popup form - hidden by default */
.form-popup {
  display: none;
  /* position: fixed; */
  /* bottom: 0;
  right: 15px; */
  border: 3px solid #f1f1f1;
  /* z-index: 9; */
  max-width: 300px;
}

/* Add styles to the form container */
.form-container {
  max-width: 300px;
  padding: 10px;
  background-color: white;
}

/* Full-width input fields */
.form-container input[type=text],
.form-container input[type=password],
.form-container select,
.form-container input[type=number] {
  width: 90%;
  padding: 4%;
  margin: 1% 0 1% 0;
  border: none;
  background: #f1f1f1;
}

/* When the inputs get focus, do something */
.form-container input[type=text]:focus,
.form-container input[type=password]:focus,
.form-container select:focus,
.form-container input[type=number]:focus {
  background-color: #ddd;
  outline: none;
}

/* Set a style for the submit/login button */
.btn {
  background-color: #04AA6D;
  color: white;
  padding: 4%;
  border: none;
  cursor: pointer;
  width: 98%;
  margin-bottom: 10px;
  opacity: 0.8;
}

/* Add a red background color to the cancel button */
.cancel {
  background-color: red;
}

/* Add some hover effects to buttons */
.btn:hover,
.open-button:hover {
  opacity: 1;
}
.red-text {
  color: red;
}
#loginForm, #loginMessage {
  /* center this element */
  margin: 0 auto;
}
