/* Recent Purchase popup — see inc/recent-purchase.php and assets/js/recent-purchase.js */

.bc-rp {
    position: fixed;
    left: 1.5rem;
    bottom: 1.5rem;
    z-index: 9990; /* Below the theme's modals (9999). */
    width: 360px;
    max-width: calc(100vw - 3rem);
    background: #fff;
    border: 1px solid #eef0f0;
    border-radius: 9999px;
    box-shadow: 0 10px 30px rgba(37, 67, 67, 0.15);
    font-family: 'Inter', sans-serif;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
}

.bc-rp.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s;
}

.bc-rp__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 2.25rem 0.5rem 0.5rem;
    color: inherit;
    text-decoration: none;
}

.bc-rp__image {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    object-fit: cover;
    background: #f6f1e6;
}

.bc-rp__body {
    min-width: 0;
}

.bc-rp__title {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.35;
    color: #4b5563;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bc-rp__title strong,
.bc-rp__product {
    font-weight: 600;
    color: #254343;
}

.bc-rp__link:hover .bc-rp__product {
    color: #284179;
    text-decoration: underline;
}

.bc-rp__meta {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #9ca3af;
}

.bc-rp__close {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #9ca3af;
    font-size: 0.875rem;
    cursor: pointer;
}

.bc-rp__close:hover,
.bc-rp__close:focus-visible {
    background: #f3f4f6;
    color: #254343;
}

/* Phones: full width, lifted above the WhatsApp button in the bottom-right corner. */
@media (max-width: 600px) {
    .bc-rp {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 4.5rem;
        width: auto;
        max-width: none;
        border-radius: 1rem;
    }

    .bc-rp__image {
        width: 48px;
        height: 48px;
        border-radius: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bc-rp,
    .bc-rp.is-visible {
        transform: none;
    }
}
