/* WRAPPER */
.wa-float-wrapper {
    position: fixed;
    bottom: 25px;
    right: 0;
    z-index: 999999;
    font-family: 'Inter', sans-serif;
}

/* DOCKED BUTTON */
.wa-dock-ultra {
    position: relative;
    right: -150px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #d4a339, #f2c879);
    padding: 12px 18px;
    border-radius: 18px 0 0 18px;
    color: #fff;
    text-decoration: none;
    box-shadow: -4px 6px 22px rgba(0, 0, 0, 0.2);
    transition: all .35s cubic-bezier(.25, .1, .25, 1);
}

/* Slide masuk otomatis */
.wa-dock-ultra.show {
    right: 0;
}

/* ICON BUBBLE */
.wa-icon-bubble {
    background: #fff;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: waWiggle 2.6s infinite ease-in-out;
}

.wa-icon-bubble img {
    width: 28px;
}

/* Hover effect */
.wa-dock-ultra:hover {
    padding-right: 26px;
    background: linear-gradient(135deg, #c8962e, #edc164);
    box-shadow: -6px 10px 26px rgba(0, 0, 0, 0.3);
}

/* Notification red dot */
.wa-notif-dot {
    position: absolute;
    top: 6px;
    right: 16px;
    width: 12px;
    height: 12px;
    background: #ff2d2d;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
}

/* CHAT POPUP */
.wa-popup {
    width: 280px;
    background: #fff;
    border-radius: 18px;
    position: absolute;
    bottom: 80px;
    right: 20px;
    padding: 0;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    display: none;
    overflow: hidden;
}

/* header */
.wa-popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #d4a339, #f2c879);
    color: white;
}

.wa-popup-header img {
    width: 38px;
    border-radius: 8px;
}

/* BODY */
.wa-popup-body {
    padding: 20px;
    min-height: 90px;
    display: flex;
    align-items: center;
}

/* typing bubbles */
.wa-typing span {
    width: 9px;
    height: 9px;
    background: #bbb;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    animation: typingAnim 1.4s infinite ease-in-out;
}

.wa-typing span:nth-child(2) {
    animation-delay: .15s;
}

.wa-typing span:nth-child(3) {
    animation-delay: .3s;
}

@keyframes typingAnim {

    0%,
    100% {
        opacity: .3;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

/* BUTTON POPUP */
.wa-popup-button {
    display: block;
    padding: 14px;
    text-align: center;
    color: white;
    font-weight: 600;
    background: #25d366;
    text-decoration: none;
    transition: .25s;
}

.wa-popup-button:hover {
    background: #1ebe5a;
}

/* ICON WIGGLE */
@keyframes waWiggle {

    0%,
    100% {
        transform: rotate(0);
    }

    20% {
        transform: rotate(15deg);
    }

    40% {
        transform: rotate(-15deg);
    }

    60% {
        transform: rotate(10deg);
    }

    80% {
        transform: rotate(-10deg);
    }
}

/* Dark mode aware */
@media (prefers-color-scheme: dark) {
    .wa-popup {
        background: #222;
    }

    .wa-popup-body {
        color: #eee;
    }
}

.bubble-msg {
    background: #f1f1f1;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    color: #333;
}

.wa-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 22px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-left: auto;
    transition: .25s;
}

.wa-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Saat WA dock masuk ke dinding */
.wa-dock-ultra.hide {
    right: -150px !important;
}