/* ========================================
   Testimonial Popup (floating social-proof card)
   Sibling of the floating newsletter popup.
   Renamed from review-popup.css.
   ======================================== */

.testimonial-popup-floating {
    position: fixed;
    z-index: 1050;
    max-width: 340px;
    animation: testimonial-popup-slide-in 0.3s ease-out;
}

@keyframes testimonial-popup-slide-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonial-popup-floating.testimonial-popup-hidden {
    display: none !important;
}

/* Position variants */
.testimonial-popup-floating.testimonial-popup-position-bottom-right {
    bottom: 2rem;
    right: 2rem;
}

.testimonial-popup-floating.testimonial-popup-position-bottom-left {
    bottom: 2rem;
    left: 2rem;
}

.testimonial-popup-floating.testimonial-popup-position-top-right {
    top: 2rem;
    right: 2rem;
}

.testimonial-popup-floating.testimonial-popup-position-top-left {
    top: 2rem;
    left: 2rem;
}

/* Card shell */
.testimonial-popup-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-4) var(--space-5);
    position: relative;
}

.testimonial-popup-close {
    position: absolute;
    top: var(--space-1);
    right: var(--space-2);
    background: none;
    border: none;
    font-size: var(--font-size-2xl);
    line-height: var(--line-height-none);
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-1) var(--space-2);
    opacity: 0.7;
    transition: opacity var(--duration-200);
    z-index: 1;
}

.testimonial-popup-close:hover {
    opacity: 1;
}

/* Rotating items: only the active one is shown */
.testimonial-popup-item {
    display: none;
}

.testimonial-popup-item.is-active {
    display: block;
    animation: testimonial-popup-fade 0.4s ease;
}

@keyframes testimonial-popup-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.testimonial-popup-body {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    padding-right: var(--space-4);
}

.testimonial-popup-thumb {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    object-fit: cover;
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
}

.testimonial-popup-content {
    min-width: 0;
}

.testimonial-popup-stars {
    font-size: var(--font-size-sm);
    color: var(--warning, #f5a623);
    margin-bottom: var(--space-1);
}

.testimonial-popup-stars .fa-star {
    color: var(--warning, #f5a623);
}

.testimonial-popup-text {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
    line-height: var(--line-height-snug, 1.35);
}

.testimonial-popup-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.testimonial-popup-name {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    text-decoration: none;
}

.testimonial-popup-author {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .testimonial-popup-floating {
        max-width: calc(100% - 2rem);
        left: 1rem !important;
        right: 1rem !important;
        bottom: 1rem !important;
    }

    .testimonial-popup-position-top-right,
    .testimonial-popup-position-top-left {
        top: 1rem !important;
        bottom: auto !important;
    }
}
