/**
 * ComprarOnline - Contact Channels (WhatsApp, phone, email)
 * Floating button, product page CTA and footer contact lines.
 */

/* ---------- Floating WhatsApp pill (always visible) ---------- */
.co-wa-float {
    position: fixed;
    right: 18px;
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    z-index: 9975;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 18px 11px 14px;
    border-radius: 999px;
    background: #1da851;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(21, 128, 61, 0.35), 0 2px 8px rgba(15, 23, 42, 0.18);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    animation: co-wa-attention 2.2s ease-in-out 3;
}

.co-wa-float:hover,
.co-wa-float:focus-visible {
    background: #15803d;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(21, 128, 61, 0.42), 0 2px 8px rgba(15, 23, 42, 0.18);
}

.co-wa-float:focus-visible {
    outline: 3px solid #86efac;
    outline-offset: 3px;
}

.co-wa-icon {
    display: block;
    flex-shrink: 0;
}

.co-wa-float__label {
    white-space: nowrap;
}

.co-wa-float__label--short {
    display: none;
}

/* Ripple that stops itself: draws the eye without becoming a nuisance. */
@keyframes co-wa-attention {
    0%, 100% {
        box-shadow: 0 10px 26px rgba(21, 128, 61, 0.35), 0 0 0 0 rgba(29, 168, 81, 0.5);
    }
    60% {
        box-shadow: 0 10px 26px rgba(21, 128, 61, 0.35), 0 0 0 14px rgba(29, 168, 81, 0);
    }
}

/* Clear the fixed mobile bottom navigation (56px) and the safe area. */
@media (max-width: 921px) {
    .co-wa-float {
        right: 14px;
        bottom: calc(70px + env(safe-area-inset-bottom, 0px));
        padding: 10px 15px 10px 12px;
        gap: 7px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .co-wa-float__label {
        display: none;
    }

    .co-wa-float__label--short {
        display: inline;
    }
}

/* ---------- Product page CTA ---------- */
.co-wa-product {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 12px;
    padding: 11px 16px;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 10px;
    color: #14532d !important;
    font-size: 0.93rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.co-wa-product:hover,
.co-wa-product:focus-visible {
    background: #1da851;
    border-color: #1da851;
    color: #ffffff !important;
}

.co-wa-product:focus-visible {
    outline: 3px solid #86efac;
    outline-offset: 2px;
}

.co-wa-product .co-wa-icon {
    flex-shrink: 0;
}

/* ---------- Footer contact lines ---------- */
.co-contact-link {
    color: #e2e8f0;
    text-decoration: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.28);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.co-contact-link:hover,
.co-contact-link:focus-visible {
    color: #ffffff;
    border-bottom-color: #6ee7b7;
}

.co-contact-link--wa {
    color: #6ee7b7;
    border-bottom-color: rgba(110, 231, 183, 0.45);
}

.co-contact-link--wa:hover,
.co-contact-link--wa:focus-visible {
    color: #a7f3d0;
    border-bottom-color: #a7f3d0;
}

.co-contact-note {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* ---------- Accessibility / print ---------- */
@media (prefers-reduced-motion: reduce) {
    .co-wa-float,
    .co-wa-float__label,
    .co-wa-product {
        transition: none;
        animation: none;
    }
}

@media print {
    .co-wa-float,
    .co-wa-product {
        display: none !important;
    }
}
