/**
 * YayReviews Social Proof Popup Styles
 */

.yayrev-social-proof {
    position: fixed;
    z-index: 99999;
    max-width: 340px;
    width: calc(100% - 32px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Position variants */
.yayrev-social-proof--bottom-left {
    bottom: 20px;
    left: 20px;
}

.yayrev-social-proof--bottom-right {
    bottom: 20px;
    right: 20px;
}

/* Visible state */
.yayrev-social-proof--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Close button */
.yayrev-social-proof__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease, color 0.2s ease;
    line-height: 1;
}

.yayrev-social-proof__close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Link wrapper */
.yayrev-social-proof__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.yayrev-social-proof__link:hover {
    text-decoration: none;
}

/* Header with stars */
.yayrev-social-proof__header {
    margin-bottom: 8px;
}

.yayrev-social-proof__stars {
    display: flex;
    gap: 2px;
}

.yayrev-social-proof__star {
    color: #ddd;
    font-size: 16px;
    line-height: 1;
}

.yayrev-social-proof__star--filled {
    color: #fbbf24;
}

/* Content */
.yayrev-social-proof__content {
    margin-bottom: 12px;
}

.yayrev-social-proof__text {
    margin: 0 0 6px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.yayrev-social-proof__author {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.yayrev-social-proof__location {
    color: #888;
}

/* Product info */
.yayrev-social-proof__product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.yayrev-social-proof__image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.yayrev-social-proof__product-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.yayrev-social-proof__product-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yayrev-social-proof__time {
    font-size: 11px;
    color: #888;
}

/* Hover effect */
.yayrev-social-proof__link:hover .yayrev-social-proof__product-name {
    color: #2563eb;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .yayrev-social-proof {
        max-width: none;
        left: 16px !important;
        right: 16px !important;
        bottom: 16px !important;
        width: auto;
    }

    .yayrev-social-proof__text {
        font-size: 13px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .yayrev-social-proof {
        transition: opacity 0.1s ease, visibility 0.1s ease;
        transform: none;
    }
}