/* === WhatsApp Floating Widget === */
.wa-float {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column; align-items: flex-end;
}
.wa-float__tip {
    background: #fff; color: #333; font-size: 13px; font-weight: 600;
    padding: 8px 14px; border-radius: 20px; margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    opacity: 0; transform: translateX(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none; white-space: nowrap;
}
.wa-float:hover .wa-float__tip { opacity: 1; transform: translateX(0); }
.wa-float__btn {
    width: 60px; height: 60px; border-radius: 50%;
    background: #25D366; cursor: pointer; border: none;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}
.wa-float__btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.65);
}
.wa-float__btn svg { width: 34px; height: 34px; fill: #fff; }
.wa-float__btn::before {
    content: ''; position: absolute; inset: -6px; border-radius: 50%;
    background: #25D366; opacity: 0.3; z-index: -1;
    animation: wa-pulse 2s infinite;
}
@keyframes wa-pulse {
    0% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.15); opacity: 0.15; }
    100% { transform: scale(1); opacity: 0.4; }
}
.wa-float__badge {
    position: absolute; top: -2px; right: -2px;
    background: #ff5252; color: #fff; font-size: 11px; font-weight: 700;
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

/* Popup panel */
.wa-popup {
    position: fixed; bottom: 100px; right: 24px; z-index: 9998;
    width: 340px; max-width: calc(100vw - 48px);
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transform: translateY(20px) scale(0.95);
    opacity: 0; pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.wa-popup.open {
    transform: translateY(0) scale(1);
    opacity: 1; pointer-events: auto;
}
.wa-popup__header {
    background: #25D366; color: #fff; padding: 20px;
    position: relative;
}
.wa-popup__header h3 {
    margin: 0 0 4px; font-size: 17px; font-weight: 700;
    display: flex; align-items: center; gap: 10px;
}
.wa-popup__header p {
    margin: 0; font-size: 12px; opacity: 0.9;
}
.wa-popup__header svg { width: 22px; height: 22px; fill: #fff; }
.wa-popup__close {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.25); border: none; color: #fff;
    font-size: 18px; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: background 0.2s;
}
.wa-popup__close:hover { background: rgba(255,255,255,0.4); }
.wa-popup__reply {
    background: #e8f5e9; color: #2e7d32; font-size: 12px;
    padding: 8px 14px; margin: 0;
}
.wa-popup__body {
    max-height: 320px; overflow-y: auto;
    padding: 8px 0;
}
.wa-member {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; cursor: pointer;
    transition: background 0.15s;
    text-decoration: none; color: inherit;
}
.wa-member:hover { background: #f5f5f5; }
.wa-member:hover .wa-member__chat { background: #25D366; }
.wa-member:hover .wa-member__chat svg { fill: #fff; }
.wa-member__avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: #e8f5e9; display: flex;
    align-items: center; justify-content: center;
    flex-shrink: 0; overflow: hidden;
}
.wa-member__avatar img { width: 100%; height: 100%; object-fit: cover; }
.wa-member__avatar svg { width: 26px; height: 26px; fill: #25D366; }
.wa-member__info { flex: 1; min-width: 0; }
.wa-member__name { font-size: 14px; font-weight: 600; color: #333; }
.wa-member__role { font-size: 12px; color: #888; }
.wa-member__chat {
    width: 34px; height: 34px; border-radius: 50%;
    background: #e8f5e9; display: flex;
    align-items: center; justify-content: center;
    flex-shrink: 0; transition: background 0.2s;
}
.wa-member__chat svg { width: 18px; height: 18px; fill: #25D366; transition: fill 0.2s; }
.wa-popup__footer {
    border-top: 1px solid #eee; padding: 12px 16px;
    text-align: center; font-size: 11px; color: #999;
}

@media (max-width: 600px) {
    .wa-popup {
        position: fixed; bottom: 90px; right: 12px; left: 12px;
        width: auto; max-width: none;
    }
    .wa-float { bottom: 16px; right: 16px; }
    .wa-float__btn { width: 54px; height: 54px; }
    .wa-float__btn svg { width: 30px; height: 30px; }
    .wa-float__tip { display: none; }
}
