﻿.btn {
    background-color: #2e7abd;
    border-color: #2e7abd;
    font-weight: bold;
}
    .btn:hover {
        background: #fff;
        color:#2e7abd;
    }

.chat-open {
    position: fixed;
    bottom: 10px;
    right: 0;
    padding: 15px 35px;
    border-right: none;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    z-index: 2;
}

/* topbar*/
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    padding: 15px;
    border-bottom: 1px solid #ccc;
    background-color: rgb(234, 234, 234);
}

/* chat */
.chat {
    height: 500px;
}

.chat_content {
    display: flex;
    flex-direction: column;
    height: calc(100% - 170px);
    overflow-y: auto;
    padding: 20px;
}

/* sendbar */
.sendbar {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: rgb(234, 234, 234);
    padding: 15px;
    height: 120px;
    border-top: 1px solid #ccc;
    border-radius: 0px 0px 10px 10px;
}

.textarea-container {
    position: relative;
    width: 100%;
}

    .textarea-container textarea {
        background: #fff;
        width: 100%;
        height: 75px;
        border: 1px solid #ccc;
        border-bottom: none;
        border-radius: 10px 10px 0 0;
        padding: 10px 15px;
        resize: none;
        outline: none;
        position: relative;
    }

.counter-container {
    height: 15px;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    margin-top: -6px;
}

#charCount {
    font-size: 12px;
    color: #555;
}

.send {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2c5ca9;
    border: none;
    color: white;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    border-radius: 50%;
    cursor: pointer;
    outline: none;
    transition: 0.2s;
}

    .send:hover {
        color: #fff;
        background-color: #3776db;
        text-decoration: none;
    }

/* messaggi */
.message {
    max-width: 370px;
    padding: 8px 12px;
    border-radius: 15px;
    margin-bottom: 10px;
    position: relative;
    overflow-wrap: break-word;
    box-shadow: 0px 4px 2px rgba(0, 0, 0, 0.15);
    
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideIn 0.6s ease forwards;
    
}

@media screen and (max-width: 400px) {
    .message {
        max-width: 220px;
    }
}

@media screen and (max-width: 300px) {
    .message {
        max-width: 180px;
    }
}

.sent {
    color: #fff;
    border: 2px solid #fff;
    background-color: #3776db;
    align-self: flex-end;
    border-top-right-radius: 0px;
}

.received {
    border: 1px solid #2c5ca9;
    background-color: #fff;
    align-self: flex-start;
    border-top-left-radius: 0px;
}

.mex {
    margin-bottom: 5px;
}

.data {
    font-size: 12px;
}

.numeroMex {
    position: absolute;
    top: -7px;
    left: -7px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 3px 6px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    display:none;
}


/*ANIMAZIONI*/
@keyframes fadeSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
