.wwccw-widget {
    position: fixed;
    bottom: 20px;
    z-index: 999999;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.wwccw-visible {
    opacity: 1;
    transform: translateY(0);
}

.wwccw-pos-right {
    right: 20px;
}

.wwccw-pos-left {
    left: 20px;
}

/* =================================
   FLOAT BUTTON
================================= */

.wwccw-float-btn {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    max-width: 60px;
    max-height: 60px;

    padding: 0;
    border: none;
    border-radius: 50%;

    background: var(--wwccw-button-bg, #25D366);
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 24px;
    line-height: 1;
    cursor: pointer;

    box-sizing: border-box;
    overflow: hidden;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;

    animation: wwccw-pulse 2s infinite;
}

.wwccw-float-btn:hover,
.wwccw-float-btn:focus,
.wwccw-float-btn:active {
    background: #20bd5a;
    color: #ffffff;
    border-radius: 50%;
    outline: none;
    transform: scale(1.06);
}

.wwccw-float-btn.has-avatar {
    padding: 0;
    overflow: hidden;
    background: var(--wwccw-button-bg, #25D366);
}

.wwccw-float-btn .wwccw-float-avatar,
.wwccw-float-btn img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}

/* =================================
   CHAT BOX
================================= */

.wwccw-chat-box {
    width: 300px;
    margin-bottom: 10px;

    overflow: hidden;

    display: none;

    background: #ffffff;
    border-radius: 16px;

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* =================================
   HEADER
================================= */

.wwccw-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px;

    background: linear-gradient(
        135deg,
        var(--wwccw-button-bg, #25D366),
        #128C7E
    );

    color: #ffffff;
}

.wwccw-avatar {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #ffffff;
    border-radius: 50%;
}

.wwccw-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wwccw-status {
    font-size: 12px;
    opacity: 0.8;
}

/* =================================
   BODY
================================= */

.wwccw-chat-body {
    padding: 15px;
}

.wwccw-message {
    padding: 10px;

    background: #f1f5f9;
    border-radius: 12px;

    white-space: pre-line;
    line-height: 1.6;
}

/* =================================
   FOOTER
================================= */

.wwccw-chat-footer {
    padding: 12px;
}

.wwccw-channel-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wwccw-channel-list .wwccw-whatsapp-btn {
    width: 100%;
}

.wwccw-channel-btn {
    width: 100%;
    display: block;
    text-align: center;
}

.wwccw-whatsapp-btn {
    display: block;

    padding: 10px;

    text-align: center;
    text-decoration: none;
    font-weight: 700;

    color: #ffffff;
    background: var(--wwccw-button-bg, #25D366);

    border-radius: 999px;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.wwccw-whatsapp-btn:hover,
.wwccw-whatsapp-btn:focus {
    background: #20bd5a;
    color: #ffffff;
    transform: translateY(-1px);
}

/* =================================
   OPEN STATE
================================= */

.wwccw-widget.open .wwccw-chat-box,
.wwccw-widget.wwccw-is-open .wwccw-chat-box {
    display: block;
}

/* =================================
   HIDE BUBBLE
================================= */

.wwccw-widget.wwccw-hide-bubble .wwccw-chat-box {
    display: none;
}

/* =================================
   ANIMATION
================================= */

@keyframes wwccw-pulse {

    0% {
        box-shadow:
            0 10px 25px rgba(0, 0, 0, 0.2),
            0 0 0 0 rgba(37, 211, 102, 0.45);
    }

    70% {
        box-shadow:
            0 10px 25px rgba(0, 0, 0, 0.2),
            0 0 0 14px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow:
            0 10px 25px rgba(0, 0, 0, 0.2),
            0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* =================================
   MOBILE
================================= */

@media (max-width: 480px) {

    .wwccw-widget {
        bottom: 15px;
    }

    .wwccw-pos-right {
        right: 15px;
    }

    .wwccw-pos-left {
        left: 15px;
    }

    .wwccw-chat-box {
        width: calc(100vw - 30px);
        max-width: 340px;
    }

    .wwccw-float-btn,
    .wwccw-float-btn:hover,
    .wwccw-float-btn:focus,
    .wwccw-float-btn:active {
        width: 58px;
        height: 58px;
        min-width: 58px;
        min-height: 58px;
        max-width: 58px;
        max-height: 58px;
    }
}