@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap');

:root {
    --window-height: 100vh;
    --header-height: 50px;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Arial', sans-serif;
    background-color: #ffffff;
    height: var(--window-height);
    overflow: hidden;
}

#chat-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 10px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-weight: bold;
    text-align: left;
    background-image: url('https://nutrileya.it/wp-content/themes/nutrileya-child/favicon.png');
    background-repeat: no-repeat;
    background-size: 25px;
    background-position: 10px center;
    padding-left: 45px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    height: var(--header-height);
    max-width: 500px;
    margin: 0 auto;
}

#reset-icon {
    cursor: pointer;
    padding-right: 10px;
}

#chat-container {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    max-width: 500px;
    margin: 0 auto;
    overflow-y: auto;
    scroll-behavior: smooth;
}

#chat-box {
    padding: 10px;
}

#input-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    margin-top: 10px;
}

#user-input {
    flex-grow: 1;
    height: 36px;
    font-size: 14px;
    padding: 5px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    margin-right: 10px;
}

#send-button {
    height: 36px;
    width: 36px;
    font-size: 12px;
    padding: 0;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

#send-button svg {
    width: 24px;
    margin-right: 4px;
}

p {
    max-width: 70%;
    margin: 5px 0;
    padding: 8px 12px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.usermsg {
    background-color: #E3F2FD;
    align-self: flex-end;
    margin-left: auto;
    text-align: left;
    border-radius: 10px 10px 0 10px;
    border: 1px solid #BBDEFB;
}

.botmsg {
    background-color: #F3E5F5;
    color: #000000;
    align-self: flex-start;
    margin-right: auto;
    text-align: left;
    left: 50px;
    position: relative;
    border-radius: 0 10px 10px 10px;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
    margin-bottom: 10px;
    margin-top: 10px;
    border: 1px solid #E1BEE7;
}

.botmsg::before {
    content: "";
    position: absolute;
    left: -40px;
    top: 4px;
    width: 30px; 
    height: 30px;
    background-size: contain;
    border-radius: 50%;
    background-image: url('/static/bot_operator.png');
    z-index: 1000;
}

#error-message {
    text-align: center;
    background-color: #ffcccb;
    color: #d8000c;
    padding: 10px;
    margin: 10px auto;
    border-radius: 4px;
    max-width: 400px;
}

#loader {
    text-align: left;
    margin-left: 40px;
    position: relative;
    min-height: 24px;
}

@keyframes ellipsis {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

#loader::after {
    content: '.';
    display: inline-block;
    width: 24px;
    animation: ellipsis 1s infinite steps(3);
    overflow: hidden;
    vertical-align: bottom;
}

.audio {
    background-color: transparent !important;
}

.disclaimer {
    font-size: 12px;
    line-height: 1.2;
    color: #df92ec !important;
    font-weight: bold;
    font-style: italic;
}

@media (max-width: 480px) {
    #chat-container {
        height: calc(100% - var(--header-height));
    }

    #user-input {
        height: 22px;
        font-size: 16px;
    }

    #send-button {
        height: 28px;
        width: 28px;
    }

    #send-button svg {
        width: 18px;
        margin-right: 2px;
    }

    p {
        font-size: 16px;
    }
}