

.chatbox {
    width: 300px;
    height: 400px;
    background-color: #242933;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: fixed;
    bottom: 100px;
    right: 30px;
    display: none; /* Hidden by default */
    flex-direction: column;
    transform: translateY(-200px); /* Start position off-screen */
    opacity: 0; /* Start invisible */
    transition: all 1s ease;
    animation:  slideIn 0.5s ease-out;

}

.chatbox.show {
    display: flex;
    transform: translateY(0); /* Move to final position */
    opacity: 1; /* Fade in */
}

.chat-header {
    display: flex;
    align-items: center;
    background: #242933;
    color: rgb(255, 145, 0);
    padding: 15px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative; /* Ensure absolute positioning for the close button works */
}

.user-pic img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
    background: rgb(255, 145, 0);
    transform: rotate(-8deg);
}

.profileinfo {
    display: flex;
    flex-direction: column;
}

.username {
    color: rgb(255, 145, 0);
    font-weight: bold;
    font-size: 18px;
}

.last-seen {
    font-size: 13px;
}

.close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 15px;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: rgb(199, 113, 1);
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: rgb(214, 221, 221);
}

.chat-message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 20px;
    max-width: 75%;
    animation: fadeIn 0.5s ease-out;

    position: relative;
}

.chat-message.right {
    background-color:rgb(255, 145, 0);
    color: #fff;
    align-self: flex-end;
    margin-left: auto;
}

.message-content p {
    margin: 0;
}

.message-time {
    font-size: 12px;
    text-align: right;
    margin-top: 5px;
    color: #000000;
}

.chat-footer {
    display: flex;
    align-items: center;
    /* border-top: 1px solid rgb(255, 145, 0); */
    padding: 10px;
    background-color: rgb(214, 221, 221);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.chat-input {
    color: #000;
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    transition: border-color 0.3s ease-in-out;
}

.chat-input:focus {
    border-color: rgb(255, 145, 0);
    outline: none;
}

.send-btn {
    background: rgb(255, 145, 0);
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    margin-left: 10px;
    display: flex;
    align-items: center;
    transition: background 0.3s ease-in-out;
    white-space: nowrap;
}

.send-btn .icon {
    font-size: 16px;
    margin-right: 5px;
}

.send-btn:hover {
    background: rgb(211, 120, 0);
}

.chaticon {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

#chat-toggle {
    background: rgb(255, 145, 0);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 24px;
    transition: background 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-toggle:hover {
    background: rgb(199, 113, 1);
}

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

@keyframes slideIn {
    from {
        transform: translateY(100px); /* Start from below the screen */
        opacity: 0; /* Start invisible */
    }
    to {
        transform: translateY(0); /* End at the final position */
        opacity: 1; /* End fully visible */
    }
}
