/* ---------------------------- */
/*     Classes générales        */
/* ---------------------------- */

header,
.menu,
.feed {
  display: none;
}

body {
  padding: 0;
  height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
}

main {
  width: 100%;
  height: 100%;
  overflow-y: scroll;
}

#noMessagesYet {
  text-align: center;
}

/* Conversation */

.convName {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  top: 0;
  padding: 15px 0;
  width: 100%;
  background-color: #fafafa;
  z-index: 100;
}

.convName {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.convName a:nth-of-type(2) {
  text-decoration: none;
}

.convName a:nth-of-type(2) h1 {
  color: black;
  margin: 0 auto;
  text-align: center;
  font-size: 1.5rem;
}

.convName a:nth-of-type(2) h1::first-letter {
  color: #ffa319;
}

.convName>a>img {
  width: 30px;
  height: 30px;
  transition: 0.25s ease-in-out;
}

.convName>a>img:hover {
  transform: translateX(-7.5px);
}

.convName>a:nth-of-type(1) {
  position: absolute;
  transform: translate(-50%, -50%);
  left: min(7.5%, 60px);
  top: 50%;
}

/* Plus de messages */

.moreMsg {
  margin-top: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
}

#loadMoreMessages {
  height: 25px;
  width: 25px;
  padding: 7.5px;
  border: 3px solid #f3811c;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.25s ease-in-out;
}

#loadMoreMessages:hover {
  border: 3px solid #ffc800;
}


/* Formulaire d'envoi de message / Footer */
.inputMsgWrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.inputMessage {
  z-index: 100;
  bottom: 0;
  width: 100%;
  background-color: #f6f6f6;
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.15);
}

.legalLink {
  position: fixed;
  bottom: 0;
  background-color: #f3f3f3;
  display: flex;
  justify-content: center;
  width: 100%;
  height: 20px;
  margin: 0;
}


/* Messages  */
#chatContainer {
  width: 100%;
  margin: auto;
  max-width: 1280px;
  padding: 0 10%;
  box-sizing: border-box;
}


article {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 450px;
  min-width: 250px;
  height: fit-content;
  margin-top: 40px;
  background-color: #eeeeee;
  border-radius: 25px 25px 25px 0px;
  margin-right: 0;
}

/* Envoi de message */
.sendContainer {
  min-height: 50px;
  min-width: 50px;
  background-color: white;
  position: relative;
  border-radius: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.25s ease-in-out;
}

.sendContainer:hover,
.currentPicture:hover {
  box-shadow: 0px 0px 5px #ffa319aa;
}

#submitAddMessage {
  transform-origin: -10% -10%;
  animation-play-state: paused;
  position: absolute;
  background-color: unset;
  border-radius: unset;
}

@keyframes flySend {
  0% {
    transform: rotate(0deg);
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    transform: rotate(-360deg);
    opacity: 1;
  }
}

.myMessages {
  background-color: #f8f8f8;
  border-radius: 25px 25px 0px 25px;
  margin-left: auto;
}

.chatMsgContainer {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.username {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.username img {
  margin-left: 15px;
}

article p:first-child {
  width: 80%;
  justify-self: center;
  margin: 0;
  margin-top: 10px;
  margin-left: 20px;
  font-size: 1.1rem;
  word-wrap: break-word;
}

.imgChat {
  align-self: center;
  width: 250px;
  height: 150px;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  margin-top: 20px;
  margin-bottom: 60px;
}

article p a {
  color: #ffa319;
}

article p:last-child {
  align-self: flex-end;
  justify-self: flex-end;
  display: flex;
  width: 50%;
  min-width: 225px;
  justify-content: flex-end;
  align-items: center;
  font-size: 0.9rem;
  font-style: italic;
  margin-right: 10px;
}

.authorPic {
  object-fit: cover;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 50%;
}

input {
  background-color: white;
}

#addMessageForm {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 50%;
  max-width: 700px;
  margin-top: 20px;
}

textarea {
  grid-area: b;
  width: 100%;
  height: 3rem;
  background: white;
  border: none;
  border-radius: 15px;
  border-radius: 3px 3px 3px 3px;
  font-family: 'Montserrat', sans-serif;
  resize: none;
  padding: 10px;
  margin: 0 25px;
}

#media {
  display: none;
}

.mobileContainer {
  display: flex;
  flex-direction: column;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 100px;
}

.mediaContainer {
  display: flex;
  align-items: center;
  justify-content: space-around;
  grid-area: a;
}

.labelForMedia {
  display: none;
}

.currentPicture {
  margin: auto;
  width: 50px;
  height: 50px;
  background-color: white;
  border-radius: 50px;
  object-fit: cover;
  transition: 0.25s ease-in-out;
}

.currentPicture:hover {
  background-color: #ffc800;
}

label[for='media'] {
  margin-top: 10px;
  cursor: pointer;
  width: fit-content;
}

#submitAddMessage {
  margin: 0;
}

input[type='submit'] {
  grid-area: c;
  cursor: pointer;
  transition: 0.25s ease-in-out;
}

#ConfirmationMessage {
  margin-bottom: 10px;
  margin-top: 10px;
  max-width: 100%;
  word-wrap: break-word;
}

input[type='submit']:hover {
  box-shadow: none;
  border-radius: 10px;
}

.inputMessage span {
  color: #ffa319;
}

article:last-child {
  margin-bottom: 50px;
}

.popupPic {
  z-index: 1000;
  height: 100vh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #00000050;
  box-sizing: border-box;
  padding: 10%;
  display: none;
}

.username {
  text-decoration: none;
  font-weight: bold;
}

.illusPop {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.closePop {
  position: absolute;
  top: 0;
  left: 0;
  height: 40px;
  width: 40px;
  padding: 20px;
  transition: 0.25s ease-in-out;
  cursor: pointer;
}

.closePop:hover {
  transform: rotate(90deg);
}

/* ---------------------------- */
/*       Media Queries          */
/* ---------------------------- */

@media screen and (max-width: 370px) {
  article p:last-child {
    font-size: 0.8rem;
  }
}

@media (max-width: 900px) {
  #addMessageForm {
    width: 75%;
  }
}

@media (max-width: 490px) {
  #chatContainer {
    padding: 0 5px;
  }

  #addMessageForm {
    width: 95%;
  }

  textarea {
    margin: 0 10px;
  }

  .popupPic {
    padding: 0;
  }
}