#wphc-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #0073aa;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    z-index: 99999;
    user-select: none;
    transition: transform 0.2s ease;
}

#wphc-bubble:hover {
    transform: scale(1.06);
}

#wphc-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 360px;
    height: 500px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#wphc-header {
    background: #0073aa;
    color: #ffffff;
    padding: 14px 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}

#wphc-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

#wphc-messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fbfbfb;
}

.wphc-msg {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}

/* User message aligned to the right */
.wphc-msg.user {
    align-self: flex-end;
    background: #0073aa;
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

/* Bot/Admin message aligned to the left */
.wphc-msg.bot {
    align-self: flex-start;
    background: #ffffff;
    color: #222222;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 2px;
}

/* Typing bubble on the bot/admin side */
.wphc-typing-bubble {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 2px;
    padding: 10px 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}

.wphc-typing-bubble span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #7b8591;
    border-radius: 50%;
    animation: wphcBounce 1.3s infinite ease-in-out;
}

.wphc-typing-bubble span:nth-child(2) {
    animation-delay: 0.2s;
}

.wphc-typing-bubble span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes wphcBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.wphc-wa-cta {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 8px 12px;
    background: #25d366;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.wphc-wa-cta:hover {
    background: #1eb857;
}

/* Black Input Area Styling */
#wphc-input-area {
    display: flex;
    border-top: 1px solid #222222;
    padding: 10px;
    background: #1a1a1a;
    gap: 8px;
}

#wphc-input-area input {
    flex: 1;
    background: #111111;
    color: #ffffff;
    border: 1px solid #333333;
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 14px;
    outline: none;
}

#wphc-input-area input::placeholder {
    color: #888888;
}

#wphc-input-area input:focus {
    border-color: #0073aa;
    background: #0d0d0d;
}

#wphc-input-area button {
    background: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

#wphc-input-area button:hover {
    background: #005a87;
}