body {
  background-color: var(--col-bg-light);
  max-width: 100vw;
}

section.main {
  position: relative;
  background-image: url(../assets/backgrounds/bg-about-1.svg);
  background-repeat: repeat;
  width: 100%;
  /* border: 1px solid black; */
  height: calc(100vh - 64px);
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

/* @media screen (width < 600px) {
  
} */

section.left {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  background: transparent;
  height: 100%;
}

.for-you-point {
  color: gray;
  padding: 0.5rem 0 0.2rem 0.3rem;
}

.desc-list {
  display: flex;
  justify-content: start;
  flex-direction: column;
  margin-top: 10px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  outline: none;
  border-radius: 1rem;
  overflow-y: scroll;
  scroll-behavior: smooth;

  &::-webkit-scrollbar {
    width: 5px;
  }

  &::-webkit-scrollbar-thumb {
    background: #6a5f97;
    border-radius: 20px;
  }
}

.desc {
  padding: 0.5rem;
  display: flex;
  align-items: center;
  cursor: pointer;

  & .chatroom-point {
    font-size: 1.3rem;
    color: #2b1c69;
    line-height: 1;
    pointer-events: none;
  }

  & .point-desc {
    width: 100%;
    display: inline-block;
    text-overflow: ellipsis;
    word-break: break-all;
    border: none;
    color: #777777;
    line-height: 1;
    pointer-events: none;
  }

  &:hover {
    background-color: rgba(0, 0, 0, 0.1);
  }
}

.selected {
  background-color: rgba(0, 0, 0, 0.1);
}

hr {
  border-width: 1px;
  border-color: rgba(0, 0, 0, 0.1);
}

section.right {
  position: relative;
  flex: 2;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.8);
  overflow: hidden;
  height: 100%;
}

.wrapper-btn {
  min-height: 60px;
}

.wrapper-chat {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: start;
  padding: 0.5rem 0.5rem 0.2rem 0.5rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  text-align: left;
  & h3 {
    color: #2b1c69;
    font-size: 1.3rem;
    font-weight: normal;
    line-height: 1;
  }
  & p {
    color: #777777;
  }
}

.wrapper-btn h1 {
  font-size: 2rem;
}

.wrapper-btn button {
  font-size: 1rem;
}

.popup-section {
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  visibility: hidden;
  z-index: 3;
}

.preloader {
  top: 0;
  height: 100%;
  width: 100vw;
  display: none;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
}

.loader {
  animation: rotate 1.2s infinite;
  height: 50px;
  width: 50px;
  scale: 2;
}

.loader:before,
.loader:after {
  border-radius: 50%;
  content: "";
  display: block;
  height: 20px;
  width: 20px;
}
.loader:before {
  animation: ball1 1.2s infinite;
  background-color: #fff;
  box-shadow: 30px 0 0 var(--col-accent-pink);
  margin-bottom: 15px;
}
.loader:after {
  animation: ball2 1.2s infinite;
  background-color: var(--col-accent-pink);
  box-shadow: 30px 0 0 #fff;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg) scale(0.8);
  }
  50% {
    transform: rotate(360deg) scale(1.2);
  }
  100% {
    transform: rotate(720deg) scale(0.8);
  }
}

@keyframes ball1 {
  0% {
    box-shadow: 30px 0 0 var(--col-accent-pink);
  }
  50% {
    box-shadow: 0 0 0 var(--col-accent-pink);
    margin-bottom: 0;
    transform: translate(15px, 15px);
  }
  100% {
    box-shadow: 30px 0 0 var(--col-accent-pink);
    margin-bottom: 15px;
  }
}

@keyframes ball2 {
  0% {
    box-shadow: 30px 0 0 #fff;
  }
  50% {
    box-shadow: 0 0 0 #fff;
    margin-top: -20px;
    transform: translate(15px, 15px);
  }
  100% {
    box-shadow: 30px 0 0 #fff;
    margin-top: 0;
  }
}

.rules-popup {
  position: absolute;
  background-color: #fefaf6;
  width: max(50%, 320px);
  border-radius: 1rem;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  transition: all 0.25s;
  transform-origin: 50% 50%;
}

.create-chat-popup {
  width: max(30%, 320px);
  background-color: white;
  padding: 1rem;
  box-shadow: rgba(17, 17, 26, 0.1) 0px 1px 0px,
    rgba(17, 17, 26, 0.1) 0px 8px 24px, rgba(17, 17, 26, 0.1) 0px 16px 48px;
  border-radius: 20px;
  transition: all 0.25s;
  transform-origin: 50% 50%;
  /* z-index: 2; */
  display: none;

  & form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    & h3 {
      align-self: start;
      font-size: 1.25rem;
      text-align: left;
      font-weight: 400;
      color: #2b1c69;
    }

    & input {
      outline: none;
      width: 100%;
      height: 42px;
      padding: 0 0.5rem;
      font-size: 1rem;
      border: 2px solid rgba(0, 0, 0, 0.1);
      border-radius: 10px;
    }

    & .buttons-wrapper {
      padding: 0.5rem 0 0 0;
    }

    & button {
      font-size: 1.1rem;
    }

    & .submit-button {
      margin-right: 5px;
    }
  }
}

.login-popup {
  background-color: var(--col-bg-light);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 2rem;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 2rem;
  gap: 0.2rem;
  border: 2px solid var(--col-accent-pink);
  z-index: 3;

  & p {
    font-size: 1.3rem;
  }
}

.shown {
  scale: 1;
  visibility: visible;
  display: flex;
}

.container-logo {
  margin-right: auto;
}

.desc-list,
.messages-area {
  background-color: rgba(255, 255, 255, 0.8);
  flex: 1;
}

.rules-and-guides {
  list-style-type: disc;
  list-style-position: inside;
  padding-left: 0;
  margin: 0;
  text-align: left;
}
.rules-and-guides ul {
  margin-left: 1rem;
}

.rules-and-guides li {
  margin-left: 0;
  padding-left: 0;
}

.messages-area-wrapper {
  flex: 1;
  overflow-y: scroll;
  &::-webkit-scrollbar {
    width: 5px;
  }

  &::-webkit-scrollbar-thumb {
    background: #b9b9b9;
    border-radius: 20px;
  }
}

.messages-area {
  text-align: center;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 1rem;
  color: #282828;
}

.message-wrapper.outgoing {
  display: flex;
  flex-direction: row-reverse;
  width: 100%;
}

.message-wrapper.incoming {
  display: flex;
  flex-direction: row;
  width: 100%;
}

.message {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.1rem;
  text-wrap: wrap;
  transition: border-radius 0.25s;

  & .text {
    font-size: 1.2rem;
    line-height: 1.5rem;
    background: linear-gradient(-45deg, rgb(229, 238, 248), rgb(254, 235, 242));
    padding: 0.6rem 0.7rem;
    border-radius: 15px;
    transition: background 0.25s;
  }

  & .sender {
    font-size: 1rem;
    color: gray;
    line-height: 1.1rem;
  }
}

.message-wrapper:last-child .message .text {
  background: linear-gradient(-45deg, rgb(252, 235, 246), rgb(247, 235, 255));
}

.message-wrapper:nth-last-child(2) .message .text {
  background: linear-gradient(-45deg, rgb(252, 235, 240), rgb(254, 235, 242));
}

.msg-options {
  background-color: transparent;
  border: none;
  width: fit-content;
  align-self: center;
  justify-self: center;
  cursor: pointer;
  & img {
    width: 24px;
    opacity: 0;
  }
}

.incoming .msg-options {
  margin-top: 19px;
}

#deleteIcon {
  height: 19px;
  padding-top: 1px;
  margin-left: 0.3rem;
}

#deleteIcon:hover,
#reportIcon:hover {
  opacity: 1;
}

.message-wrapper.outgoing:hover > .msg-options img,
.message-wrapper.incoming:hover > .msg-options img {
  opacity: 0.5;
}

.message.outgoing {
  align-items: end;
  margin-left: 10px;
  width: fit-content;
  text-align: right;
  justify-self: end;
}

.message.incoming {
  align-items: start;
  margin-right: 10px;
  width: fit-content;
  text-align: left;
}

.messages-toolbar {
  justify-self: flex-end;
  position: relative;
  display: flex;
  min-height: 48px;
}

.messages-toolbar input {
  flex: 1;
  border: 1.5px solid var(--col-border-light);
  border-radius: 15px;
  outline: none;
  padding: 0 2.7rem 0 1rem;
  font-size: 1.1rem;
  z-index: 0;
}

.messages-toolbar button {
  &:hover {
    opacity: 0.8;
  }
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  cursor: pointer;
  background-color: transparent;
  border: none;
  color: var(--col-text-heading);
}

.right .report-popup {
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translate(-50%, 5px);
  display: none;
  gap: 0.4rem;
  background-color: #94ff94;
  padding: 0.5rem;
  border: none;
  border-radius: 1rem;
  box-shadow: 0 3px 10px #81818133;
  opacity: 0;
  transition: all 0.25s;

  & img {
    width: 20px;
    filter: invert(100) hue-rotate(90deg);
    padding: 0 1px;
  }

  & p {
    color: rgb(255, 255, 255);
    font-weight: 700;
  }
}

.right .visible {
  display: flex;
  transform: translate(-50%, 0);
  opacity: 1;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin: auto;
}

.search-box-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background-color: #fff;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 1rem;
  padding: 0 10px;
}

/* Search input styling */
.search-box {
  width: 1px;
  flex: 1;
  background-color: transparent;
  outline: none;
  border: none;
  height: 45px;
  font-size: 1rem;
  color: #333;
  padding: 0 0.5rem;
}

.search-button {
  background-color: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;

  & img {
    width: 1.3rem;
  }
}

.new-chat-button {
  background-color: #fff;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  color: #d201a9;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0 0 0;
  height: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.desc img {
  border: 3px solid #d201a9;
  border-radius: 50%;
  margin: 0 1rem 0 0;
  padding: 3px;
}

.logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
}
