/* * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Nunito, sans-serif;
    font-weight: 400;
    font-size: 100%;
    background: #F1F1F1;
} */

*, html {
    --primaryGradient: linear-gradient(93.12deg, #581B98 0.52%, #9C1DE7 100%);
    --secondaryGradient: linear-gradient(268.91deg, #581B98 -2.14%, #9C1DE7 99.69%);
    --primaryBoxShadow: 0 10px 15px rgb(0 0 0 / 10%);
    --secondaryBoxShadow: 0 -10px 15px rgb(0 0 0 / 10%);
    --primary: #581B98;
}

/* CHATBOX
=============== */
.meno-mia-chatbox {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 123456;
    pointer-events: none;
}

/* CONTENT IS CLOSE */
.chatbox__support {
    display: none;
    flex-direction: column;
    background: #eee;
    width: 600px;
    height: 600px;
    max-width: 90vw;
    max-height: 90vh;
    z-index: -123456;
    opacity: 0%;
    transition: all .5s ease-in-out;
    pointer-events: none;
    /* background: #f9f9f9; */

    /* height: 450px;
    width: 350px; */
    box-shadow: 0 0 15px rgb(0 0 0 / 10%);
    border-radius: 20px;
}

/* CONTENT ISOPEN */
.chatbox--active {
    display: flex;
    transform: translateY(-20px);
    z-index: 123456;
    opacity: 100%;
    pointer-events: auto;
}

/* BUTTON */
.chatbox__button {
    float: right;
    text-align: right;
    pointer-events: auto;
}

.send__button {
    padding: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    border: none;
    outline: none;
    cursor: pointer;
}

.send__button:hover {
    background: rgba(255, 255, 255, 0.1);
}


/* HEADER */
.chatbox__header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: orange;
    z-index: 123458;
    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);
}

/* MESSAGES */
.chatbox__messages {
    display: flex;
    overflow-y: scroll;
    overflow-x: hidden;
    flex-direction: column-reverse;
    padding: 0 20px 5px 20px;
    margin-top: 80px;
    height: 100%;
    z-index: 123457;
}

.messages__item {
    background: orange;
    max-width: 60.6%;
    width: fit-content;
    font-size: 1.1rem;
}

.messages__item h1, .messages__item h2, .messages__item h3, .messages__item h4, .messages__item h5, .messages__item h6 {
    margin-bottom: 10px;
}

.messages__item p, .messages__item li {
    margin-top: 10px;
    margin-bottom: 5px;
}
.messages__item ul {
    margin-left: 20px;
}
.messages__item li p {
    padding-top: 0px;
    padding-bottom: 0px;
    margin-top: 0px;
    margin-bottom: 0px;
}

.messages__item--visitor {
    margin-left: auto;
}

.messages__item--menomia {
    margin-right: auto;
}

/* FOOTER */
.chatbox__footer {
    position: sticky;
    bottom: 0;
}

.chatbox__image--header {
    margin-right: 10px;
}

.chatbox__heading--header {
    font-size: 1.2rem;
    color: white;
}

.chatbox__description--header {
    font-size: .9rem;
    color: white;
}

/* Messages */

.messages__item {
    margin-top: 10px;
    background: #E0E0E0;
    padding: 8px 12px;
    max-width: 95%;
    min-width: 95%;
}

.messages__item--menomia,
.messages__item--typing {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    background: rgb(241 108 20 / 60%);
}

@keyframes pulse {
    0%, 100% {
        opacity: 100%;
    }

    50% {
        opacity: 60%;
    }
}    

@keyframes loading_dots {
    0%, 20% { content: ""; }
    40% { content: "o"; }
    60% { content: "oo"; }
    80% { content: "ooo"; }
}
        
.messages__item--menomia div.typing::after {
    content: "";
    animation: loading_dots 1.4s infinite;
    font-size: 2rem;
    height: 1rem;
    font-weight: bold;
    color: rgb(241 108 20 / 50%);

    /* animation: pulse 2s ease-in-out infinite; */
}


.messages__item--visitor {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom-left-radius: 20px;
    background: var(--primary);
    opacity: 80%;
    color: white;
}

/* FOOTER */
.chatbox__footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: var(--secondaryGradient);
    box-shadow: var(--secondaryBoxShadow);
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
}

.chatbox__footer input {
    width: 80%;
    border: none;
    padding: 10px;
    border-radius: 30px;
    text-align: left;
}

.chatbox__send--footer {
    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: 0 10px 15px rgb(0 0 0 / 10%);
    cursor: pointer;
}

#settingsIcon {
    display: none;
}

#settingsModal {
    text-align: center;
}

#settingsModal input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#settingsModal button {
    margin: 10px 5px;
    padding: 8px 15px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#settingsModal button:hover {
    opacity: 80%;
}

#chat-top-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* Media queries for mobile devices */
@media screen and (max-width: 768px) {
    .chatbox__button {
        width: 25px;
        height: 25px;
        padding: 0;
        /* background-color: red; */
    }

    .chatbox__button button,
    .chatbox__button button:focus,
    .chatbox__button button:visited {
        width: 25px;
        height: 25px;
        padding: 0;
        /* background-color: blue; */
    }

    .chatbox__button img {
        width: 20px;
        height: 20px;
        /* background-color: green; */
    }

    .chatbox__support {
        width: 450px;
        height: 70vh;
    }

    .chatbox__header {
        padding: 5px 10px;
    }
    #chat-top-avatar {
        width: 25px;
        height: 25px;
    }

    .messages__item {
        max-width: 85%;
        font-size: 0.8rem;
    }
    .chatbox__heading--header {
        font-size: 0.8rem;
    }
    
    .chatbox__description--header {
        font-size: 0.5rem;
    }

    .chatbox__image--header img {
        width: 25px;
        height: 25px;
    }

    .send__button {
        padding: 5px;
        font-size: 0.7rem;
    }

    .chatbox__footer {
        padding: 5px;
    }

    .chatbox__footer input {
        padding: 5px;
        font-size: 0.7rem;
    }

    #settingsModal {
        width: 90vw;
        max-width: 400px;
    }
}
