/* Chatbot Container */
#whom-chatbot-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Floating Button */
#whom-chatbot-button {
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#whom-chatbot-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#whom-chatbot-button svg {
    width: 35px;
    height: 35px;
    fill: white;
}

/* Chat Window */
#whom-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
}

/* Header */
.whom-chat-header {
    background-color: #075E54;
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.whom-chat-avatar {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.whom-chat-avatar svg {
    width: 24px;
    height: 24px;
}

.whom-chat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.whom-chat-name {
    font-weight: 600;
    font-size: 16px;
}

.whom-chat-status {
    font-size: 12px;
    opacity: 0.8;
}

#whom-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Body */
#whom-chat-body {
    flex: 1;
    background-color: #E5DDD5;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    /* WhatsApp default bg pattern */
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Messages */
.whom-message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.whom-message-bot {
    align-self: flex-start;
    background-color: white;
    border-top-left-radius: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.whom-message-user {
    align-self: flex-end;
    background-color: #DCF8C6;
    border-top-right-radius: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Footer */
.whom-chat-footer {
    background-color: #F0F0F0;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#whom-chat-input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

#whom-chat-send {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#whom-chat-send:hover {
    transform: scale(1.1);
}

/* Typing Indicator */
.whom-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 16px;
    border-top-left-radius: 0;
    align-self: flex-start;
    width: fit-content;
}

.whom-typing span {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: whomTyping 1.4s infinite ease-in-out both;
}

.whom-typing span:nth-child(1) {
    animation-delay: -0.32s;
}

.whom-typing span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes whomTyping {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 480px) {
    #whom-chatbot-wrapper {
        z-index: 999999;
        bottom: 15px;
        right: 15px;
    }

    #whom-chatbot-window {
        position: fixed;
        bottom: 85px;
        right: 15px;
        left: 15px;
        width: auto !important;
        height: 65vh !important;
        max-height: 600px;
        top: auto;
        border-radius: 12px;
        margin: 0;
        z-index: 1000000;
        transform: none !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

    .whom-chat-header {
        padding: 15px;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }
}

/* Quick Actions */
.whom-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
}

.whom-quick-action-btn {
    background: #fff;
    border: 1px solid #25D366;
    color: #25D366;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.whom-quick-action-btn:hover {
    background: #25D366;
    color: #fff;
}