#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-family: Arial, sans-serif;
    z-index: 9999;
}

#chat-toggle {
    background-color: #1aa3a3;
    color: white;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 20px;
}

.chat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

#chat-box {
    width: 10cm;
    height: 15cm;
    background: #fff;
    border: 1px solid #ccc;
    margin-top: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.85);
}

#chat-header {
    background-color: #1aa3a3;
    color: white;
    padding: 10px;
    border-radius: 10px 10px 0 0;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-body {
    height: 600px;
    overflow-y: auto;
    padding: 10px;
    font-size: 14px;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-msg,
.bot-msg {
    padding: 10px 14px;
    max-width: 80%;
    border-radius: 16px;
    animation: fadeIn 0.3s ease-in;
    text-align: justify;
}

.user-msg {
    align-self: flex-end;
    background-color: #cce5ff;
    border-radius: 16px 16px 0 16px;
    line-height: 1.6;
    text-align: justify;
}

.bot-msg {
    align-self: flex-start;
    background-color: #e0e0e0;
    border-radius: 16px 16px 16px 0;
    line-height: 1.6;
    text-align: justify;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#chat-controls {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #ccc;
    gap: 10px;
}

#chat-input {
    flex: 1;
    border-radius: 20px;
    padding: 10px;
    background: #e6f0ff;
    margin: 5px;
    font-size: 14px;
    border: 1px solid #ccc;
    outline: none;
}

#chat-box button {
    background: #1aa3a3;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    margin: 5px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

#close-chat {
    cursor: pointer;
    font-weight: bold;
    font-size: 20px;
    padding: 6px 12px;
    background-color: #ffffff;
    color: #1aa3a3;
    border-radius: 50%;
    border: 2px solid #1aa3a3;
    transition: all 0.3s ease;
}

#close-chat:hover {
    background-color: #1aa3a3;
    color: white;
    transform: scale(1.1);
}


#chat-toggle:hover {
    background-color: #1aa3a3;
    transform: scale(1.05);
}


.typing-indicator {
    display: inline-flex;
    gap: 4px;
    padding: 10px 14px;
    background-color: #e0e0e0;
    border-radius: 16px 16px 16px 0;
    align-self: flex-start;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: blink 1.2s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {

    0%,
    80%,
    100% {
        opacity: 0.2;
        transform: scale(0.8);
    }

    40% {
        opacity: 1;
        transform: scale(1);
    }
}


@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#chat-box {
    animation: slideUp 0.4s ease-out;
}


@media (max-width: 600px) {
    #chat-toggle {
        font-size: 14px;
        padding: 8px 12px;
        gap: 10px;
    }

    #chat-input {
        font-size: 12px;
        padding: 8px;
    }

    .chat-icon {
        width: 30px;
        height: 30px;
    }
}