/* =============================================
   ELVOURA — FLOATING WHATSAPP BUTTON
   whatsapp-float.css
============================================= */

/* ── Floating Button ─────────────────────── */
#wa-float-wrap {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9980;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none; /* Let clicks pass through the wrapper */
}

/* Main WhatsApp Button */
#wa-float-btn {
    pointer-events: auto; /* Re-enable clicks for the button */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #25D366;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37,211,102,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    flex-shrink: 0;
}
#wa-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 28px rgba(37,211,102,0.5);
}
#wa-float-btn i {
    color: #fff;
    font-size: 24px;
    line-height: 1;
}

/* Pulse ring animation */
#wa-float-btn::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 3px solid rgba(37,211,102,0.4);
    animation: waPulse 2s ease-out infinite;
}
@keyframes waPulse {
    0%   { transform: scale(1);   opacity: 1; }
    70%  { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Notification badge */
#wa-notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Jost', sans-serif;
    animation: waBadgePop 0.4s ease;
}
@keyframes waBadgePop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

/* ── Chat Popup ──────────────────────────── */
#wa-chat-popup {
    width: 280px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    transform: scale(0.85) translateY(20px);
    transform-origin: bottom right;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
#wa-chat-popup.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto; /* Re-enable clicks when open */
}

/* Popup Header */
.wa-popup-header {
    background: #128C7E;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.wa-popup-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}
.wa-popup-header-info h4 {
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px;
}
.wa-popup-header-info p {
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}
.wa-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #25D366;
    display: inline-block;
    animation: waBlink 1.4s ease infinite;
}
@keyframes waBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}
.wa-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}
.wa-popup-close:hover { color: #fff; }

/* Chat bubble */
.wa-popup-body {
    background: #ece5dd;
    padding: 14px 12px 10px;
}
.wa-bubble {
    background: var(--bg-card);
    border-radius: 0 10px 10px 10px;
    padding: 10px 12px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 12px;
}
.wa-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -6px;
    border-width: 0 6px 6px 0;
    border-style: solid;
    border-color: transparent #fff transparent transparent;
}
.wa-bubble p {
    font-family: 'Jost', sans-serif;
    font-size: 12.5px;
    color: #111;
    margin: 0 0 4px;
    line-height: 1.4;
}
.wa-bubble-time {
    font-size: 9px;
    color: #94a3b8;
    text-align: right;
    display: block;
}

/* Quick reply buttons */
.wa-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wa-quick-btn {
    background: var(--bg-card);
    border: 1px solid #25D366;
    border-radius: 20px;
    padding: 7px 14px;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    color: #128C7E;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}
.wa-quick-btn:hover {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
    transform: translateX(3px);
}
.wa-quick-btn i {
    font-size: 12px;
    width: 14px;
    text-align: center;
}

/* Popup Footer */
.wa-popup-footer {
    padding: 10px 14px;
    border-top: 1px solid #f1f5f9;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.wa-popup-footer span {
    font-family: 'Jost', sans-serif;
    font-size: 10px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}
.wa-send-btn {
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s, transform 0.2s;
}
.wa-send-btn:hover {
    background: #128C7E;
    transform: scale(1.03);
}

/* ── Tooltip ─────────────────────────────── */
#wa-tooltip {
    background: #0a0a0a;
    color: #fff;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.25s ease;
    pointer-events: none;
    letter-spacing: 0.3px;
    align-self: center;
}
#wa-float-btn:hover ~ #wa-tooltip,
#wa-float-wrap:hover #wa-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile */
@media (max-width: 768px) {
    #wa-float-wrap { bottom: 20px; right: 16px; }
    #wa-chat-popup { width: calc(100vw - 32px); }
    #wa-float-btn { width: 52px; height: 52px; }
    #wa-float-btn i { font-size: 24px; }
}
