#container-messages {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;

  width: 100vw;
  height: 75vh;
}

.messages-background {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 0 40%;
}

.overlay-pink {
  position: relative;
}

.overlay-pink:before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  background: #edc38c;
}

#messages-input {
  width: 30vw;
  min-width: 345px;

  padding: 0 2rem;

  z-index: 0;
}

#messages-carousel {
  width: 60vw;
  height: 65vh;

  display: flex;
  justify-content: center;
  overflow: hidden;
}

.messages-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

#messages-list {
  margin: calc(2rem * var(--home-ratio)) 0;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: center;
}

#messages-list .item {
  margin: 10px;
  width: 250px;

  animation: fade-in-right 1s ease-in-out;
  box-shadow: rgba(0, 0, 0, 0.15) 0px 5px 15px 0px;
}

#messages-list .card-text {
  font-size: 16px;
  min-height: 25px;
  max-height: 75px;
  line-height: 25px;
  overflow-y: auto;
}

@media only screen and (max-width: 1000px) {
  #messages-input {
    width: 35vw;
  }
}

@media only screen and (max-width: 600px),
  only screen and (min-width: 667px) and (max-width: 926px) and (min-height: 311px) and (max-height: 568px) and (orientation: landscape) {
  #container-messages {
    height: 80vh;
  }

  #messages-carousel .messages-wrapper {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  #messages-list {
    flex-flow: column nowrap;
  }

  #messages-list .item {
    margin: 5px;
    animation: fade-in-up 1s ease-in-out;
  }
}

@media only screen and (max-width: 600px) {
  #container-messages {
    flex-direction: column;
    justify-content: flex-start;
  }

  #messages-input,
  #messages-carousel {
    width: 100vw;
  }

  #messages-carousel {
    height: 45vh;
    justify-content: flex-start;
  }

  #messages-list {
    margin: 0;
    justify-content: flex-start;
    order: 2;
  }

  .pagination {
    order: 1;
  }

  #messages-list .card-text {
    min-height: 22px;
    max-height: 70px;
    line-height: 22px;
    font-size: 13px;
  }

  #messages-list .card-title {
    font-size: 15px;
  }

  #messages-list .item {
    margin: 5px 0;
    margin-right: auto;
    padding: 0 10px;

    width: auto;
    min-width: 150px;
    max-width: 265px;
  }

  #messages-carousel.messages-background {
    background-position: 100% 50%;
  }

  #form-background {
    padding: 20px;
    padding-top: 0;
    box-shadow: unset;
  }

  #messages-input {
    padding: 0;
    width: 90%;
  }

  #messages-input .form-label {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
  }

  #messages-input .form-label .label-txt {
    padding: 0;
    font-size: 15px;
    width: 40%;
  }

  #messages-input .form-title {
    display: none;
  }

  #messages-input .button-38 {
    font-size: 16px;
    padding: 0.5rem 0.65rem;
  }
}

@media only screen and (min-width: 667px) and (max-width: 926px) and (min-height: 311px) and (max-height: 568px) and (orientation: landscape) {
  #messages-carousel {
    min-height: 510px;
    justify-content: flex-end;
  }

  #messages-input #form-background {
    padding: 12px;
    box-shadow: rgba(41, 0, 46, 0.12) 0px -12px 30px,
      rgba(41, 0, 46, 0.12) 0px 4px 6px, rgba(41, 0, 46, 0.17) 0px 12px 13px,
      rgba(41, 0, 46, 0.09) 0px -3px 5px;
  }

  #messages-input #form-messages {
    padding: 0 5px;
  }

  #messages-input .form-title {
    font-size: 18px;
  }

  #messages-input .label-txt {
    padding-left: 0;
    font-size: 14px;
  }

  #messages-input .form-label {
    margin: 2px 0;
  }

  #messages-input .input {
    padding: 0;
    font-size: 13px;
  }

  #message-content {
    min-height: 22px;
  }

  #messages-input .line-box {
    margin-bottom: 16px;
  }

  #messages-input .error {
    font-size: 13px;
  }

  #messages-input #btn-send button {
    font-size: 14px;
    padding: 0.3rem 0.6rem;
  }

  #messages-list .item {
    margin: 5px 0;
    margin-left: auto;
    padding: 0 10px;

    width: auto;
    min-width: 150px;
    max-width: 280px;
  }

  #messages-list .card-title {
    font-size: 16px;
    margin-bottom: 5px;
  }

  #messages-list .card-body {
    padding: 0.6rem 1rem;
  }

  #messages-list .card-text {
    min-height: 22px;
    max-height: 44px;
    font-size: 14px;
    line-height: 22px;
  }
}

/* ----------- iPad ----------- */
@media only screen and (width: 768px) and (height: 1024px),
  only screen and (width: 834px) and (height: 834px) {
  #messages-carousel {
    width: 50vw;
    height: 70vh;
  }

  #messages-input {
    min-width: 400px;
  }

  #messages-list {
    flex-flow: column nowrap;
    min-height: 360px;
  }

  #messages-list .item {
    margin: 5px auto;
  }

  #container-messages.messages-background {
    background-position: 65% 0;
  }
}
