/*-----FÆLLES------*/
* {
    font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-style: normal;
  margin: 0;
  padding: 0;
}

@font-face {
    font-family: 'MoneaAlegante';
    src: url('../materials/monea_alegante-webfont.woff2') format('woff2'),
         url('../materials/monea_alegante-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

h1 {
    font-size: 35px;
}

.no-messages h1 {
    font-family: 'MoneaAlegante', sans-serif;
}


:root {
    --eggplant: #32313b;
    --violet: #bd97d2;
    --lavender: #ede8f5;
}

 .background {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(-45deg, #2e1b45, #82427a, #482a6d, #472439);
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
} 


/*-------OVERALL CONTENT-------*/
.content-wrap {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100vh;
    width: 460px;
}

/*---------HEADER---------*/

header {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px 10px;
    width: 100%;
    color: var(--lavender);
}

header img {
    width: 40px;
    padding-right: 5px;
}

h2 {
    font-size: 30px;
}

header h2 {
    font-family: 'MoneaAlegante', sans-serif;
    padding-top: 5px;
}

/*-------INPUT--------*/
.text-input {
    width: 100%;
    background: var(--violet);
    margin: 15px 0;
    padding: 15px;
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-input input {
    width: 90%;
    border: none;
    padding: 5px 10px;
    border-radius: 25px 0 0 25px;
    background-color: var(--lavender);
    color: var(--eggplant);
}

.text-input button {
    width: 10%;
    border: none;
    padding: 5px 10px;
    border-radius: 0 25px 25px 0;
    background-color: var(--eggplant);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 7.7px 5px 7.7px 0;
}

.text-input button i {
    font-size: 15px;
    transition: 0.2s;
    color: var(--lavender);
}

.text-input button:hover i {
    color: var(--violet);
}

.text-input button:hover {
   cursor: pointer;
}

.counter {
    background-color: var(--lavender);
    padding: 3px 7px;
    color: var(--eggplant);
}

/*-------MESSAGES-------*/
.conversation-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    justify-content: flex-end;
}

.conversation {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: calc(80vh - 100px); 
    padding-bottom: 15px; 
}


.message {
    max-width: 70%;
    padding: 10px 15px;
    margin: 20px 0;
    border-radius: 10px;
} 

.question {
    background-color: var(--lavender);  
    color: var(--eggplant);
    align-self: flex-end;
    text-align: right;
}

.answer {
    background-color: var(--violet);
    color: var(--eggplant);
    align-self: flex-start;
}

/* ---------------SCROLLBAR-------------- */

.conversation {
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--violet) rgb(178, 166, 217, 0.4);
}

/*-------------TYPING MESSAGE---------------*/

.dots {
    list-style: none;
    align-self: flex-end;
    background-color: var(--lavender);
    padding: 18px 15px 12px 15px;
    border-radius: 15px;
}

#type {
    display: none;
}

.dots div {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    margin: 0 3px;
    background-color: var(--violet);
    --webkit-animation: bounce 0.7s infinite alternate;
    --moz-animation: bounce 0.7s infinite alternate;
    --o-animation: bounce 0.7s infinite alternate;
    animation: bounce 0.7s infinite alternate;
}

@-webkit-keyframes bounce {
    to {
        opacity: .4;
        transform: translateY(-5px);
    }
}

@-moz-keyframes bounce {
    to {
        opacity: .4;
        transform: translateY(-5px);
    }
}

@-o-keyframes bounce {
    to {
        opacity: .4;
        transform: translateY(-5px);
    }
}

@keyframes bounce {
    to {
        opacity: .4;
        transform: translateY(-5px);
    }
}

.dots div:nth-child(2) {
    animation-delay: 300ms;
}

.dots div:nth-child(3) {
    animation-delay: .6s;
}

/*-------------MESSAGE ANIMATION---------------*/

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.new-message {
    animation: fadeIn 0.5s ease-in-out;
}

/*-------------STARTING MESSAGE---------------*/

.no-messages {
    text-align: center;
    color: var(--violet);
    padding: 10px;
    font-style: italic;
    line-height: 40px;
}