/* ===================================
   WhatsApp Sticky Chat Widget
   =================================== */

.whatsapp-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: var(--font-family-primary);
    transition: bottom 0.3s ease;
}

/* ===================================
   Popup Bubble
   =================================== */

.whatsapp-widget__popup {
    background-color: var(--color-white);
    border-radius: .5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 1rem 1.5rem;
    max-width: 220px;
    display: none;
    animation: wa-fadein 0.2s ease;
    position: relative;
}

.whatsapp-widget__popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 22px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--color-white);
}

.whatsapp-widget__popup.is-visible {
    display: block;
}

.whatsapp-widget__popup p {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    line-height: 1.5;
}

.whatsapp-widget__popup a {
    display: inline-block;
    background-color: #25d366;
    color: var(--color-white);
    text-decoration: none;
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-semibold);
    font-size: 0.875rem;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.whatsapp-widget__popup a:hover {
    background-color: #1ebe57;
    color: var(--color-white);
    transform: scale(1.03);
}

/* ===================================
   Floating Button
   =================================== */

.whatsapp-widget__btn {
    width: 56px;
    height: 56px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    position: relative;
}

.whatsapp-widget__btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.55);
}

.whatsapp-widget__btn svg {
    width: 28px;
    height: 28px;
    fill: var(--color-white);
}

/* Pulse ring */
.whatsapp-widget__btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.35);
    animation: wa-pulse 2s ease-out infinite;
}

/* ===================================
   Animations
   =================================== */

@keyframes wa-pulse {
    0%   { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.7); opacity: 0; }
}

@keyframes wa-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 768px) {
    .whatsapp-widget {
        bottom: 20px;
        right: 16px;
    }
}

@media (max-width: 480px) {
    .whatsapp-widget {
        bottom: 16px;
        right: 12px;
    }

    .whatsapp-widget__popup {
        max-width: 185px;
        padding: 1rem 1.25rem;
    }
}
