/* ── WhatsApp Floating Widget ── */

.ag-whatsapp-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9997;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 10px 22px 10px 10px;
    background: #ffffff;
    color: #111;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    font-family: inherit;
    line-height: 1.2;
    transition: transform 220ms cubic-bezier(.2, .7, .3, 1), box-shadow 220ms ease;
}

.ag-whatsapp-widget:hover,
.ag-whatsapp-widget:focus {
    color: #111;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18), 0 4px 8px rgba(0, 0, 0, 0.08);
}

.ag-whatsapp-widget__media {
    position: relative;
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
}

.ag-whatsapp-widget__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    background: #f1f5f1;
}

.ag-whatsapp-widget__image--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ag-whatsapp-widget__badge {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #25D366;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), 0 0 0 2px #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ag-whatsapp-widget__badge svg {
    display: block;
}

.ag-whatsapp-widget__body {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
}

.ag-whatsapp-widget__title {
    font-size: 18px;
    font-weight: 800;
    color: #0f1115;
    letter-spacing: -0.01em;
}

.ag-whatsapp-widget__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 4px 10px;
    background: #d6f5da;
    color: #1a7a3a;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.ag-whatsapp-widget__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: ag-wa-pulse 1.8s infinite;
}

@keyframes ag-wa-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@media (max-width: 480px) {
    .ag-whatsapp-widget {
        right: 12px;
        bottom: 12px;
        padding: 8px 16px 8px 8px;
        gap: 10px;
        border-radius: 16px;
    }
    .ag-whatsapp-widget__media {
        width: 52px;
        height: 52px;
    }
    .ag-whatsapp-widget__image {
        border-radius: 10px;
    }
    .ag-whatsapp-widget__badge {
        width: 22px;
        height: 22px;
    }
    .ag-whatsapp-widget__badge svg {
        width: 14px;
        height: 14px;
    }
    .ag-whatsapp-widget__title {
        font-size: 15px;
    }
    .ag-whatsapp-widget__pill {
        font-size: 12px;
        padding: 3px 8px;
    }
}

.ag-whatsapp-widget--hide-mobile {
    /* applies on small screens */
}

@media (max-width: 640px) {
    .ag-whatsapp-widget--hide-mobile {
        display: none !important;
    }
}

@media print {
    .ag-whatsapp-widget {
        display: none;
    }
}

/* ── In-drawer variant (mobile slide menu) ── */
.ag-whatsapp-widget--in-drawer {
    position: static;
    right: auto;
    bottom: auto;
    display: flex;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px 10px 10px;
    gap: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    box-shadow: none;
}

.ag-whatsapp-widget--in-drawer:hover,
.ag-whatsapp-widget--in-drawer:focus {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.ag-whatsapp-widget--in-drawer .ag-whatsapp-widget__media {
    width: 48px;
    height: 48px;
}

.ag-whatsapp-widget--in-drawer .ag-whatsapp-widget__image {
    border-radius: 8px;
}

.ag-whatsapp-widget--in-drawer .ag-whatsapp-widget__badge {
    width: 22px;
    height: 22px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 0 2px var(--ag-header-bg, #fff);
}

.ag-whatsapp-widget--in-drawer .ag-whatsapp-widget__badge svg {
    width: 14px;
    height: 14px;
}

.ag-whatsapp-widget--in-drawer .ag-whatsapp-widget__title {
    font-size: 15px;
    color: #fff;
}

.ag-whatsapp-widget--in-drawer .ag-whatsapp-widget__pill {
    font-size: 12px;
    padding: 3px 8px;
}
