@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,400;0,600;1,300&display=swap');

/* CHATBOX
=============== */
.chatbox {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

    --primaryGradient: linear-gradient(93.12deg, #581B98 0.52%, #9C1DE7 100%);
    --secondaryGradient: linear-gradient(268.91deg, #581B98 -2,14%, #9C1DE7 99.69%);

    --primaryBoxShadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
    --secondaryBoxShadow: 0px -10px 15px rgba(0, 0, 0, 0.1);

    --light: 300;
    --regular: 400;
    --semiBold: 600;
    --extraLight: 300;
    --italic: 300;
    --primary: #581B98;

    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 100%;
    position: absolute;
    bottom: 30px;
    right: 30px;
  }

  /* CONTENT IS CLOSE */
  .chatbox__support {
    display: flex;
    flex-direction: column;
    background: #f9f9f9;
    width: 340px;
    height: 350px;
    z-index: -123456;
    opacity: 0;
    transition: all .5s ease-in-out;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
  }
  
  /* CONTENT ISOPEN */
  .chatbox--active {
    transform: translateY(-40px);
    z-index: 123456;
    opacity: 1;
    
  }
  
  /* BUTTON */
  .chatbox__button {
    text-align: right;
  }
  
  
  /* HEADER */
  .chatbox__header {
    position: sticky;
    top: 0;
    background: orange;
    background: var(--primaryGradient);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: var(--primaryBoxShadow);
  }
  
  .chatbox__image--header{
    margin-right: 10px;
  }

  .chatbox__heading--header{
    font-size: 1.2rem;
    color: white;
  }
  
  /* MESSAGES */
  .chatbox__messages {
    padding: 0 20px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    flex-direction: column-reverse;
  }
  
  .messages__item {
    margin-top: 10px;
    background: #e0e0e0;
    padding: 8px 12px;
    max-width: 70%;
    width: fit-content;
  }

  .messages__item--visitor,
  .messages__item--typing {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    margin-right: auto;
  }
  
  .messages__item--operator {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom-left-radius: 20px;
    background: #581B98;
    color: white;
    margin-left: auto;
  }

  .messages__item--typing{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 15px;
  }

  .messages__dot{
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 10px;
    background: #C4C4C4;
    margin-right: 5px;
    padding: 3px;
  }

  .messages__dot:last-child{
    margin-right: 0;
  }

  /* FOOTER */
  .chatbox__footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 20px 20px;
    background: #581B98;
    box-shadow: 0px -10px 15px #eb37f51a;;
    background: var(--secondaryGradient);
    box-shadow: var(--secondaryBoxShadow);
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    motion-path: 20px;
    motion-path: 20px;
    position: sticky;
    margin-right: 5px;
    padding: 3px;
    bottom: 0;
  }

  .chatbox__footer input{
    border: none;
    padding: 10px 10px;
    border-radius: 30px;
  }

  .chatbox__send--footer{
    font-size: .9rem;
    color: white;
  }

  .chatbox__button button,
  .chatbox__button button:focus,
  .chatbox__button button:visited{
    padding: 10px;
    background: white;
    border: none;
    outline: none;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    border-bottom-left-radius: 50px;
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
  }