/* ============ WhatsApp Chat Support (compact clean) ============ */
:root {
    --wcs-g: #25D366;
    --wcs-g2: #128C7E;
    --wcs-t: #111827;
    --wcs-m: #6b7280;
    --wcs-bg: #fff;
    --wcs-card: #f6f7f9;
    --wcs-b: rgba(0, 0, 0, .08);
    --wcs-r: 18px;
    --wcs-rs: 14px;
    --wcs-sh: 0 18px 55px rgba(0, 0, 0, .22);
    --wcs-z: 2147483647;
}

/* container fixed always on top */
#wa-support.whatsapp_chat_support {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    z-index: var(--wcs-z) !important;
    font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* button */
#wa-support .wcs_button {
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    background: linear-gradient(135deg, var(--wcs-g), var(--wcs-g2));
    box-shadow: 0 16px 40px rgba(37, 211, 102, .35);
    transition: transform .18s ease, box-shadow .18s ease;
}

#wa-support .wcs_button:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 20px 52px rgba(37, 211, 102, .42);
}

#wa-support .wcs_button img {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .22));
}

/* popup base (NO display:none) */
#wa-support .wcs_popup {
    position: fixed !important;
    right: 20px !important;
    bottom: 96px !important;
    width: 360px;
    max-width: min(92vw, 380px);
    border-radius: var(--wcs-r);
    background: var(--wcs-bg);
    border: 1px solid var(--wcs-b);
    box-shadow: var(--wcs-sh);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(.98);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: calc(var(--wcs-z) + 1) !important;
}

#wa-support.wcs-show .wcs_popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* header (bien visible) */
#wa-support .wcs_popup_header {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 18px 18px 16px;
    background: linear-gradient(135deg, var(--wcs-g), var(--wcs-g2));
    color: #fff;
    position: relative;
}

#wa-support .wcs_popup_header::after {
    content: "";
    position: absolute;
    left: 18px;
    bottom: 10px;
    width: 56px;
    height: 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .35);
}

#wa-support .wcs_popup_header img {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .22));
}

#wa-support .wcs_popup_header_title {
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.1;
    margin: 0;
}

#wa-support .wcs_popup_header_description {
    font-size: .88rem;
    opacity: .95;
    margin-top: 4px;
}

/* close */
#wa-support .wcs_popup_close {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    background: rgba(0, 0, 0, .18);
    transition: transform .15s ease, background .15s ease;
}

#wa-support .wcs_popup_close:hover {
    transform: rotate(90deg);
    background: rgba(0, 0, 0, .26);
}

/* persons list */
#wa-support .wcs_popup_person_container {
    background: #f9fafb;
    max-height: min(52vh, 420px);
    overflow: auto;
    padding: 0;
}

#wa-support .wcs_popup_person {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    cursor: pointer;
    transition: background .15s ease;
}

#wa-support .wcs_popup_person:hover {
    background: #f8fafc;
}

#wa-support .wcs_popup_person_img img {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    object-fit: cover;
    border: 3px solid rgba(37, 211, 102, .55);
    box-shadow: 0 6px 16px rgba(37, 211, 102, .18);
}

#wa-support .wcs_popup_person_name {
    font-weight: 800;
    color: var(--wcs-t);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#wa-support .wcs_popup_person_description {
    font-size: .9rem;
    color: var(--wcs-m);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#wa-support .wcs_popup_person_status {
    margin-top: 8px;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(37, 211, 102, .12);
    color: #0aad00;
    border: 1px solid rgba(37, 211, 102, .25);
}

#wa-support .wcs_popup_person_offline {
    opacity: .75;
    cursor: not-allowed !important;
}

#wa-support .wcs_popup_person_offline .wcs_popup_person_status {
    background: rgba(156, 163, 175, .12);
    color: #9ca3af;
    border-color: rgba(156, 163, 175, .25);
}

#wa-support .wcs_popup_person_offline .wcs_popup_person_img {
    filter: grayscale(1);
}

/* input */
#wa-support .wcs_popup_input {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 18px;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

#wa-support .wcs_popup_input input {
    flex: 1;
    height: 46px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
    padding: 0 14px;
    outline: none;
    background: #f8fafc;
    color: var(--wcs-t);
}

#wa-support .wcs_popup_input input:focus {
    border-color: rgba(37, 211, 102, .8);
    box-shadow: 0 0 0 4px rgba(37, 211, 102, .14);
    background: #fff;
}

#wa-support .wcs_popup_input .fa-paper-plane {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(37, 211, 102, .12);
    color: var(--wcs-g2);
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

#wa-support .wcs_popup_input .fa-paper-plane:hover {
    background: var(--wcs-g);
    color: #fff;
    transform: translateX(2px);
}

/* overlays below WA (no need huge) */
#mn-overlay,
.mn-sidebar-overlay,
.mn-mobile-menu-overlay,
.mn-side-search-overlay,
.mn-side-wishlist-overlay,
.desktop-cart-overlay {
    z-index: 9999 !important;
}

/* mobile */
@media (max-width:420px) {
    #wa-support {
        right: 14px !important;
        bottom: 14px !important;
    }

    #wa-support .wcs_popup {
        right: 14px !important;
        bottom: 90px !important;
        width: 330px;
    }

    #wa-support .wcs_button {
        width: 60px;
        height: 60px;
    }
}

/* reduce motion */
@media (prefers-reduced-motion:reduce) {

    #wa-support .wcs_button,
    #wa-support .wcs_popup {
        transition: none !important;
    }
}