// Variables
$main-color: #6db8a7;
$secondary-color: #fff;
$send-message-form: #f5f5f5;

// Styles
body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  font-family: system-ui;
  font-weight: 200;
  .title {
    color: #fff;
    padding: 5px 10px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
  }

  .app {
    height: 300px;
    width: 300px;
    display: flex;
    flex-direction: column;
    transition: all .4s ease;
  }

  .title {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    color: $secondary-color;
    background: $main-color;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-align: center;
  }

  .message {
    margin: 15px 0;
  }

  .message div:nth-child(1) {
    font-size: 11px;
    opacity: 0.9;
    margin-bottom: 6px;
  }

  .message div:nth-child(2) {
    background: $main-color;
    color: $secondary-color;
    display: inline;
    padding: 4px 8px;
    border-radius: 8px;
  }

  .message-list {
    box-sizing: border-box;
    padding: 0 0 0 6px;
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: scroll;
    background: white;
    box-shadow: 1px 0 5px rgba(0, 0, 0, 0.05);
  }

  .send-message-form {
    background: $send-message-form;
    display: flex;
    box-sizing: border-box;
    height: 60px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.06);
    input {
      width: 100%;
      padding: 15px 10px;
      border: none;
      margin: 0;
      background: $send-message-form;
      font-weight: 200;
      &:focus {
        outline-width: 0;
      }
      &::placeholder {
        color: black;
      }
    }
  }

  .header {
    margin: 0;
    padding: 5px;
    background: #dcf3ee;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    .header-maximize {
      float: right;
      opacity: 0.3;
      cursor: pointer;
    }
  }

  .icon {
    width: 80px;
    position: absolute;
    bottom: 50px;
    right: 50px;
    cursor: pointer;
    z-index: 50;
    transition: opacity 0.5s ease;
  }

  .icon-clicked {
    opacity: 0.2;
  }

  .chat {
    position: absolute;
    cursor: pointer;
    padding: 10px 30px;
  }

  .max {
    position: static;
    margin: 0 auto;
    padding: 10px;
    .app {
      height: 95vh;
      width: 55vw;
      margin: 0 auto;
    }
  }
}

@media only screen and (max-width: 768px) {
  body .max {
    .app {
      width: 95vw;
    }
  }
}
