html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #363636;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #FFFFFF;
    gap: 1rem;
    -webkit-tap-highlight-color: transparent;
}

input {
    color:white;
    background: transparent;
    border-radius: 10px;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.6rem 0;
    width:100%
}

textarea {
    color:white;
    background: transparent;
    border-radius: 10px;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
    width:100%;
    overflow: y;
    scrollbar-width: none;
}

button {
    background: #3C3C3C;
    border-radius: 20px;
    color: #FFFFFF;
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
    border: none;
    cursor: pointer;
    width:100%;
    -webkit-tap-highlight-color: transparent;
}

.app {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap:1rem;
    width: 96%;
    height:100%;
}

.topbar {
    margin-top: 5vh;
    height: 5vh;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}
.topbar button {
    background: none;
}

.topbar-left {
    justify-self: start;
    align-items: center;
}

.topbar-mid {
    justify-self: center;
    align-items: center;
}

.topbar-right {
    justify-self: end;
    align-items: center;
}

.main {
    flex: 1;
    width:100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}
#messages {
    display: flex;
    flex-direction: column;
    align-items: flex-start;   
    gap: 0.5rem;
}

.chat {
    padding: 12px;
    border-bottom: 1px solid #3a3a3a;
    cursor: pointer;
}
.chat:hover {
    background: #3a3a3a;
}
.chat-title {
    font-weight: bold;
    margin-bottom: 0.4rem;
}
.chat-last {
    color: var(--muted);
    font-size: 0.7rem;
    opacity: 70%;
}

.bottom {
    /* position: absolute;
    bottom: 5px; */
    width:100%;
    height: 10vh;
    width:100%;
    display: flex;
    align-items:flex-start;
    padding:0;
}
.bottom textarea {
    flex: 1;
    resize: none;
}
#send_message {
    flex: none;
    width: 25%;
    height: 100%;
    padding: 0;
}
.my_msg {
    align-self: flex-end;
    background: #426d4d;
    color: white;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.foreign_msg {
    align-self: flex-start;
    background: #3C3C3C;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.search {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: none;
    border-radius: 5px;
    background: #3C3C3C;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.dropdown-item {
    padding: 0.5rem;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #444444;
}

.members-container {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width:100%;
}
.card {
    background: transparent;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    width:100%;
    justify-content: space-between;
}
.card div {
    flex-grow: 1;
}
.card button {
    flex-shrink: 0;
    background: #3C3C3C;
    border: none;
    cursor: pointer;
    font-weight: bold;
    align-self: flex-end;
    flex: 0 0 auto;
    width: 4rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #3C3C3C;
  transition: .2s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px; width: 20px;
  left: 2px; bottom: 2px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #444444;
}

input:checked + .slider:before {
  transform: translateX(26px);
}