.cifarelli-bot {
    position: fixed;
    bottom: 5px;
    right: 5px;
    padding: 0;
    z-index: 99999;
}

.cifarelli-bot .btn-mascotte {
    width: 90px;
    height: 130px;
    background: url('/template/assets/images/mascotte.png') center center no-repeat;
    background-size: contain;
    cursor: pointer;
    position: relative; 
}

.cifarelli-bot .btn-mascotte-2 {
    
    background: url('/template/assets/images/mascotte.png') left center no-repeat;
    background-size: auto 35px;
    background-position: 5px center;
    background-color: #c22026;
    cursor: pointer;
    position: relative; 
    padding : 15px 10px 14px 40px !important;
    font-weight: bold;
    color: #fff;
    border-radius:10px;
    margin-bottom: 10px;
    margin-right: 10px;
}

.cifarelli-bot .btn-mascotte-3 {   
    background-color: #c22026;
    cursor: pointer;
    position: relative; 
    padding : 10px;
    font-weight: bold;
    color: #fff;
    border-radius:10px;
    margin-bottom: 10px;
    margin-right: 10px;
}

.cifarelli-bot-3 .btn-mascotte-3 {
    border-radius:50%;
    padding:5px 7px;
}

.cifarelli-bot .bot-balloon {
    position: absolute;
    bottom: 74%;
    right: 80%;
    white-space: nowrap;
    background: #fff;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
    display: none;
}


/* Chat container */
.bot-chat {
    width: 300px;
    height: 400px;
    background: #fff;
    position: absolute;
    bottom: 0;
    right: 0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: Arial, sans-serif;
    display: none;
    transition: all 0.3s ease;
}

.cifarelli-bot-2 .bot-chat {
    bottom:57px;
    right:10px;
}

.cifarelli-bot-3 .bot-chat {
    bottom:80px;
    right:10px;
}

.cifarelli-bot-2 .bot-chat-maximized {
    bottom:0;
    right:0;
}

.bot-chat-maximized {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}

/* Header */
.bot-chat-header {
    height: 50px;
    background: #c22026;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.chat-header-left {
    display: flex;
    align-items: center;
}

.chat-header-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 8px;
}

.chat-header-title {
    font-weight: bold;
}

.chat-header-right {
    display: flex;
    align-items: center;
}

.chat-header-btn {
    cursor: pointer;
    font-size: 16px;
    margin-left: 8px;
    user-select: none;
}

/* Body */
.bot-chat-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: #f4f4f4;
}

/* Footer */
.bot-chat-footer {
    height: 50px;
    display: flex;
    border-top: 1px solid #ccc;
    padding: 5px 10px;
    box-sizing: border-box;
    background: #fafafa;
    flex-shrink: 0;
}

.cifarelli-bot-3 .bot-chat-footer {
    height: 100px;
}

#bot-chat-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
    height:35px;
}

#bot-chat-send {
    margin-left: 8px;
    background: #c22026;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 16px;
}


.chat-message-wrapper {
    display: flex;
    align-items: flex-end;
    margin: 10px 0;
}

.chat-message-wrapper.cifo {
    justify-content: flex-start;
}

.msg-avatar {
    width: auto;
    height: 90px;
    border-radius: 50%;
    margin-right: 8px;
}


.chat-message {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
    margin: 10px 0px;
}


.from-bot {
    background: #e6e6e6;
    color: #000;
    border-bottom-left-radius: 5px;
    align-self: flex-start;
}

.from-me {
    background: #c22026;
    color: #fff;
    border-bottom-right-radius: 5px;
    align-self: flex-end;
    margin-left: auto;
}

.from-cifo {
    background: #fce4e4;
    color: #333;
    border-bottom-left-radius: 5px;
}

@media (max-width: 768px) {
    /* Stili validi solo quando la finestra è più piccola di 768px */
    .bot-chat {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        bottom:0px;
        right:0px;
    }

    .cifarelli-bot .btn-mascotte-3 {
        margin-bottom: 3px;
        margin-right: 0px;
    }

    .cifarelli-bot-2 .bot-chat {
        bottom:0px;
        right:0px;
    }

}
