:root {
  --border-style: 2px solid grey;
}

body,
#container {
  height: 100vh;
  margin: 0;
  overflow: clip;
  font-family: sans-serif;
}

#chat, #memberList>li:hover {
  overflow-wrap: break-word;
}

#container {
  display: grid;
  grid-template-columns: 1fr 200px;
  grid-template-rows: 2em 1fr 30px;
}

.header-flex {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75em;
}

header {
  grid-row: 1/2;
  grid-column: 1 / -1;
  box-shadow: 0 1px 5px rgb(197, 197, 197);
  justify-content: space-between;
  box-sizing: border-box;
  padding: 0.5em;
  font-weight: 500;
  border-bottom: var(--border-style);
}

#settingsButton {
  width: 20px;
  height: 20px;
  background-color: transparent;
  background-image: url('/assets/settings.svg');
  background-size: cover;
  border: none;
  cursor: pointer;
}

#chat {
  margin: 0;
  padding-left: 0;
  list-style: none;
  overflow-y: scroll;
  border-bottom: var(--border-style);
}

#chat li {
  padding: 4px;
}

#chat li:nth-child(even) {
  background-color: lightgray;
}

#chat li.systemMessage {
  color: grey;
  font-style: italic;
}

#memberContainer {
  overflow-x: clip;
  overflow-y: scroll;
  grid-row: 2/4;
  grid-column: 2/3;
  border-left: var(--border-style);
}

#input {
  border: none;
}

.center-children {
  display: grid;
  place-items: center;
}

#roomlist-container {
  border: var(--border-style);
  padding: 1.5em;
  max-width: 50vw;
}

 /* The Modal (background) */
 .modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
  place-items: center;
}

/* Modal Content/Box */
.modal-content {
  background-color: #fefefe;
  padding: 20px;
  border: 1px solid #888;
  max-width: 80%;
}

#settings {
  display: grid;
  grid-template-columns: auto 150px;
  gap: 1em;
  align-items: start;
  justify-items: start;
}

label {
  font-weight: 700;
}

/* The Close Button */
#closeButton {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

#closeButton:hover,
#closeButton:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
} 

@media (max-width: 600px) {
  #container {
    grid-template-columns: 1fr !important;
  }
  #memberContainer {
    display: none;
  }
}
