/* ============================================================
   PDP "Ask on WhatsApp" card (includes/partials/pdp-whatsapp-help.php)
   Loaded only by products/products.php. Every selector is scoped to
   .wt-pdp-wa so nothing else on the page is affected.
   ============================================================ */

.wt-pdp-wa {
    --wt-wa-green: #25d366;
    --wt-wa-green-deep: #128c7e;
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0 0 var(--wt-pdp-block-gap, 22px);
    padding: 14px 16px;
    border: 1px solid #eadfd3;
    border-radius: 8px;
    background: linear-gradient(135deg, #fffaf4 0%, #f7efe6 100%);
    color: #2c2420;
    text-decoration: none;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

/* Thin green thread on the left edge: a nod to the brand name. */
.wt-pdp-wa::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--wt-wa-green);
    opacity: 0.85;
}

.wt-pdp-wa:hover,
.wt-pdp-wa:focus-visible {
    border-color: var(--wt-wa-green);
    box-shadow: 0 6px 18px rgba(18, 140, 126, 0.12);
    transform: translateY(-1px);
    color: #2c2420;
    text-decoration: none;
}

.wt-pdp-wa:focus-visible {
    outline: 2px solid var(--wt-wa-green-deep);
    outline-offset: 2px;
}

.wt-pdp-wa:active {
    transform: translateY(0);
}

.wt-pdp-wa__icon {
    position: relative;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--wt-wa-green);
    color: #fff;
    box-shadow: 0 3px 8px rgba(37, 211, 102, 0.35);
}

/* Soft "online" pulse ring around the icon. */
.wt-pdp-wa__icon::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--wt-wa-green);
    opacity: 0;
    animation: wt-pdp-wa-pulse 2.6s ease-out infinite;
}

@keyframes wt-pdp-wa-pulse {
    0% { transform: scale(0.85); opacity: 0.55; }
    70% { transform: scale(1.18); opacity: 0; }
    100% { transform: scale(1.18); opacity: 0; }
}

.wt-pdp-wa__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}

.wt-pdp-wa__title {
    font-size: 15px;
    font-weight: 600;
    color: #2c2420;
}

.wt-pdp-wa__sub {
    font-size: 13px;
    font-weight: 400;
    color: #6b5d52;
}

.wt-pdp-wa__arrow {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    color: var(--wt-wa-green-deep);
    border: 1px solid #eadfd3;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.wt-pdp-wa:hover .wt-pdp-wa__arrow,
.wt-pdp-wa:focus-visible .wt-pdp-wa__arrow {
    transform: translateX(3px);
    background: var(--wt-wa-green);
    border-color: var(--wt-wa-green);
    color: #fff;
}

@media (max-width: 575px) {
    .wt-pdp-wa {
        gap: 12px;
        padding: 12px 14px;
    }

    .wt-pdp-wa__icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .wt-pdp-wa__title {
        font-size: 14px;
    }

    .wt-pdp-wa__sub {
        font-size: 12.5px;
    }

    .wt-pdp-wa__arrow {
        width: 28px;
        height: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wt-pdp-wa,
    .wt-pdp-wa__arrow {
        transition: none;
    }

    .wt-pdp-wa__icon::after {
        animation: none;
    }
}
