.ww-container {
    position: fixed;
    bottom: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    transition: bottom 0.4s ease;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ww-container.ww-left {
    left: 20px;
    align-items: flex-start;
}

.ww-container.ww-right {
    right: 20px;
}

.ww-container.with-tawk {
    bottom: 95px !important;
}

body:has(#tawkchat-container) .ww-container.ww-right,
body .ww-container.with-tawk {
    bottom: 95px !important;
}

.ww-whatsapp-icon-only {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.3s ease;
    background-color: #25D366;
    color: #ffffff;
}

.ww-whatsapp-icon-only:hover {
    transform: scale(1.1);
}

.ww-chat-panel {
    display: none;
    margin-top: 15px;
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.ww-container.open .ww-chat-panel {
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    background-color: #25D366;
    color: #ffffff;
}

.close-chat {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    padding: 0 5px;
}

.header-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #2CD952;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.agent-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: #333;
}

.agent-content h4 {
    margin: 0;
    text-align: center;
    font-size: 18px;
}

.status {
    text-align: center;
    color: #2CD952;
    font-size: 14px;
    margin: 0;
}

.pre-message {
    background: #f1f5f9;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.4;
}

.ww-wa-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: auto;
    background-color: #25D366;
    color: #ffffff;
}

.ww-wa-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

@media (max-width: 480px) {
    .ww-chat-panel {
        width: 280px;
    }
    .ww-container {
        bottom: 15px;
    }
    .ww-container.with-tawk {
        bottom: 85px !important;
    }
    .ww-whatsapp-icon-only {
        width: 55px;
        height: 55px;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
