/* WhatsApp Chat Button */

.wa-chat-widget {
    position: fixed;
    z-index: 2147483647;
    display: inline-block;
    line-height: 1;
    pointer-events: none;
}

/* ── Main button (the <a> itself) ───────────────────────────────────────────── */
.wa-chat-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    gap: 10px;
    background-color: #25D366;
    color: #ffffff;
    text-decoration: none;
    padding: 14px 20px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    white-space: nowrap;
    line-height: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: rgba(37,211,102,0.3);
    pointer-events: auto;
    touch-action: manipulation;
}

.wa-chat-btn:hover,
.wa-chat-btn:active {
    background-color: #1ebe5d;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    color: #ffffff;
    text-decoration: none;
}

/* children not interactive — clicks go to <a> */
.wa-chat-btn svg,
.wa-chat-btn span {
    pointer-events: none;
}

.wa-icon {
    display: block;
    width: 24px;
    height: 24px;
    fill: #ffffff;
    flex-shrink: 0;
}

/* ── Pulse ring ──────────────────────────────────────────────────────────────── */
.wa-chat-widget::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50px;
    background: rgba(37, 211, 102, 0.35);
    animation: wa-pulse 2.5s ease-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes wa-pulse {
    0%   { transform: scale(1);    opacity: .7; }
    70%  { transform: scale(1.18); opacity: 0;  }
    100% { transform: scale(1.18); opacity: 0;  }
}

/* ── Admin drag handle ───────────────────────────────────────────────────────── */
.wa-drag-handle {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    cursor: grab;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    z-index: 2;
    pointer-events: auto;
}
.wa-drag-handle:active { cursor: grabbing; }
.wa-drag-handle:hover  { background: #f0f0f0; }
.wa-drag-handle svg    { pointer-events: none; }

/* ── Mobile ──────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .wa-chat-widget {
        right: 12px;
        right: max(12px, env(safe-area-inset-right));
        top: calc(50% - 29px);
        left: auto;
        bottom: auto;
        width: 58px;
        height: 58px;
    }

    .wa-chat-btn {
        width: 58px;
        height: 58px;
        min-width: 58px;
        min-height: 58px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        gap: 0;
        display: flex;
        overflow: hidden;
    }

    #wa-chat-widget .wa-chat-label { display: none !important; }

    .wa-icon {
        width: 28px;
        height: 28px;
    }

    .wa-chat-widget::after { border-radius: 50%; }
    .wa-drag-handle        { display: none; }
}
