.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.chat-header {
    background: #007bff;
    color: white;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    height: 300px;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 15px;
    max-width: 80%;
}

.message.sent {
    background: #007bff;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message.received {
    background: #e9ecef;
    color: #212529;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
}

#messageInput {
    flex: 1;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    outline: none;
}

#sendMessage {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

#sendMessage:hover {
    background: #0056b3;
}

#chatToggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #007bff;
    border-radius: 50%;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

#chatToggle:hover {
    transform: scale(1.1);
}

#chatToggle.active {
    transform: rotate(180deg);
}

.minimize-button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2em;
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.3s forwards;
}

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

/* Responsive design */
@media (max-width: 480px) {
    .chat-widget {
        width: 100%;
        bottom: 0;
        right: 0;
        border-radius: 10px 10px 0 0;
    }

    #chatToggle {
        width: 50px;
        height: 50px;
    }
}
