/**
 * Sticky WhatsApp button (inc/core/whatsapp-button.php)
 *
 * Design (ARKAN-248): Qtrshoe WhatsApp Button — 56px high, fully rounded
 * (28px), 16px from the right and 24px from the bottom, soft shadow
 * (0 6px 18px, 28% dark), white WhatsApp logo (26px).
 * - Default (.qs-whatsapp--logo): the WhatsApp logo itself, as on
 *   officialsneon.com — green bubble (#57D163 to #23B33A), white border,
 *   white phone, and the logo's own soft grey shadow (drawn in its SVG); no
 *   circle behind it. 48px on desktop, 44px on phones (made smaller from
 *   55px; 44px keeps a full-size tap target).
 * - Green with the label: WhatsApp green #25D366 behind the white logo.
 * - .qs-whatsapp--dark: brand dark #2B1D1D, #4A3A3A border, green dot at the
 *   icon's top right.
 * - .qs-whatsapp--label: "Chat with us" (14px, semi-bold, white) beside the
 *   icon, 16px / 20px side padding.
 *
 * Layer: above the page and the sticky header (200), below the menu drawer
 * overlay (300), the cart drawer (500) and every modal, so those cover it.
 */

.qs-whatsapp {
    position: fixed;
    right: 16px;
    bottom: calc(24px + var(--qs-whatsapp-lift, 0px) + env(safe-area-inset-bottom, 0px));
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 56px;
    height: 56px;
    padding: 0;
    box-sizing: border-box;
    border: 1px solid #25D366;
    border-radius: 28px;
    background: #25D366;
    color: #FFFFFF;
    box-shadow: 0 6px 18px rgba(30, 26, 26, 0.28);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: bottom 0.2s ease, opacity 0.2s ease, visibility 0.2s;
}

.qs-whatsapp:hover {
    color: #FFFFFF;
}

.qs-whatsapp:focus {
    outline: none;
}

.qs-whatsapp:focus-visible {
    outline: 2px solid #2B1D1D;
    outline-offset: 3px;
}

.qs-whatsapp--logo {
    min-width: 48px;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
}

.qs-whatsapp--logo .qs-whatsapp__icon,
.qs-whatsapp--logo .qs-whatsapp__icon svg {
    width: 48px;
    height: 48px;
}

@media (max-width: 767px) {
    .qs-whatsapp--logo,
    .qs-whatsapp--logo .qs-whatsapp__icon,
    .qs-whatsapp--logo .qs-whatsapp__icon svg {
        min-width: 44px;
        width: 44px;
        height: 44px;
    }
}

.qs-whatsapp--dark {
    border-color: #4A3A3A;
    background: #2B1D1D;
}

.qs-whatsapp--label {
    padding: 0 20px 0 16px;
}

.qs-whatsapp__icon {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
}

.qs-whatsapp__icon svg {
    display: block;
    width: 26px;
    height: 26px;
}

.qs-whatsapp__dot {
    position: absolute;
    top: -3px;
    right: -4px;
    width: 10px;
    height: 10px;
    box-sizing: content-box;
    border: 2px solid #2B1D1D;
    border-radius: 50%;
    background: #25D366;
}

.qs-whatsapp__label {
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* Steps aside while an Add to cart, quantity or View More button is under it
   (js/components/whatsapp-button.js), so it never covers them. */
.qs-whatsapp--aside {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* The FAQ and legal pages' section menu opens from their bottom bar on phones,
   in a layer below this one, and the button would sit over its last items:
   it steps aside while that menu is open. */
body:has(.faq-mobile-overlay.active, .pp-mobile-overlay.active) .qs-whatsapp {
    visibility: hidden;
}

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