/* ==========================================================
   WAHAG WHATSAPP BUTTON BESIDE BUY NOW
   ========================================================== */

.single-product form.cart {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Stop the WhatsApp wrapper from taking the full row */
.single-product .wahag-single-product-whatsapp {
    display: inline-flex !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto;
}

/* WhatsApp button */
.single-product .wahag-single-product-whatsapp__button {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;

    width: auto !important;
    min-width: 115px;
    height: 48px;
    min-height: 48px;
    padding: 0 18px !important;

    margin: 0 !important;
    border: 0 !important;
    border-radius: 30px !important;

    background: #25d366 !important;
    color: #ffffff !important;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap;

    box-shadow: none !important;
    transform: none;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.single-product .wahag-single-product-whatsapp__button:hover {
    background: #1fbd5a !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 7px 17px rgba(37, 211, 102, 0.22) !important;
}

.single-product .wahag-single-product-whatsapp__button:active {
    transform: translateY(0) scale(0.98);
}

.single-product .wahag-single-product-whatsapp__button:focus-visible {
    outline: 3px solid rgba(37, 211, 102, 0.25);
    outline-offset: 3px;
}

/* Official WhatsApp SVG */
.single-product .wahag-single-product-whatsapp__icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.single-product .wahag-single-product-whatsapp__icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Text */
.single-product .wahag-single-product-whatsapp__text {
    display: inline-block;
    color: inherit !important;
    white-space: nowrap;
}

/* Loading state after click */
.single-product
.wahag-single-product-whatsapp__button.wahag-whatsapp-loading
.wahag-single-product-whatsapp__icon {
    visibility: hidden;
}

.single-product
.wahag-single-product-whatsapp__button.wahag-whatsapp-loading::before {
    content: "";
    position: absolute;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: wahagWhatsappSpin 0.65s linear infinite;
}

@keyframes wahagWhatsappSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Tablet and mobile */
@media (max-width: 767px) {
    .single-product form.cart {
        gap: 8px;
    }

    .single-product .wahag-single-product-whatsapp__button {
        min-width: 105px;
        height: 44px;
        min-height: 44px;
        padding: 0 14px !important;
        font-size: 13px;
    }

    .single-product .wahag-single-product-whatsapp__icon {
        width: 18px;
        height: 18px;
        flex-basis: 18px;
    }
}

/* Very small screens */
@media (max-width: 420px) {
    .single-product .wahag-single-product-whatsapp {
        width: 100% !important;
    }

    .single-product .wahag-single-product-whatsapp__button {
        width: 100% !important;
    }
}