/* Vibe Verified Reviews - Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --vvr-primary: #10B981;
    --vvr-primary-dark: #059669;
    --vvr-secondary: #1F2937;
    --vvr-accent: #F59E0B;
    --vvr-accent-light: #FCD34D;
    --vvr-cta: #EF4444;
    --vvr-bg: #FFFFFF;
    --vvr-border: #E5E7EB;
    --vvr-text: #374151;
    --vvr-text-light: #6B7280;
    --vvr-badge-bg: #ECFDF5;
    --vvr-badge-text: #059669;
    --vvr-star-filled: #F59E0B;
    --vvr-star-empty: #D1D5DB;
}

/* Main Widget Container */
.vvr-widget {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--vvr-bg);
    border: 1px solid var(--vvr-border);
    border-radius: 16px;
    padding: 28px;
    margin: 24px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    max-width: 100%;
}

.vvr-widget * {
    box-sizing: border-box;
}

/* Hero Rating Section */
.vvr-hero {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.vvr-rating-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vvr-rating-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--vvr-secondary);
    line-height: 1;
}

.vvr-rating-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vvr-stars {
    display: flex;
    gap: 4px;
}

.vvr-star {
    width: 22px;
    height: 22px;
    fill: var(--vvr-star-empty);
    transition: fill 0.2s ease;
}

.vvr-star.filled {
    fill: var(--vvr-star-filled);
}

.vvr-star.half {
    fill: url(#half-star-gradient);
}

.vvr-review-count {
    font-size: 16px;
    font-weight: 500;
    color: var(--vvr-text-light);
}

.vvr-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--vvr-badge-bg);
    color: var(--vvr-badge-text);
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.vvr-verified-badge:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.vvr-verified-badge svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Rating Distribution */
.vvr-distribution {
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.vvr-distribution-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
}

.vvr-distribution-label {
    color: var(--vvr-text);
    font-weight: 500;
    width: 45px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vvr-distribution-label svg {
    width: 14px;
    height: 14px;
    fill: var(--vvr-star-filled);
}

.vvr-distribution-bar {
    flex: 1;
    height: 8px;
    background: var(--vvr-border);
    border-radius: 4px;
    overflow: hidden;
}

.vvr-distribution-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--vvr-star-filled), var(--vvr-accent-light));
    border-radius: 4px;
    transition: width 0.6s ease;
}

.vvr-distribution-count {
    color: var(--vvr-text-light);
    width: 32px;
    text-align: right;
    font-size: 12px;
}

/* Media Reviews Section */
.vvr-media-section {
    border-top: 1px solid var(--vvr-border);
    padding-top: 24px;
    margin-top: 8px;
}

.vvr-media-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.vvr-media-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--vvr-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.vvr-media-title svg {
    width: 20px;
    height: 20px;
    fill: var(--vvr-primary);
}

.vvr-see-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--vvr-primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.vvr-see-all:hover {
    background: var(--vvr-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    color: white;
}

.vvr-see-all svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.vvr-see-all:hover svg {
    transform: translateX(2px);
}

/* Media Reviews Grid */
.vvr-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.vvr-media-card {
    background: #FAFAFA;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--vvr-border);
    transition: all 0.3s ease;
}

.vvr-media-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: var(--vvr-primary);
}

.vvr-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.vvr-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vvr-primary), var(--vvr-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.vvr-card-meta {
    flex: 1;
    min-width: 0;
}

.vvr-author {
    font-weight: 600;
    color: var(--vvr-secondary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vvr-card-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vvr-card-rating {
    display: flex;
    gap: 2px;
}

.vvr-card-rating .vvr-star {
    width: 14px;
    height: 14px;
}

.vvr-card-date {
    font-size: 12px;
    color: var(--vvr-text-light);
}

.vvr-card-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--vvr-badge-bg);
    color: var(--vvr-badge-text);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.vvr-card-verified svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

.vvr-card-text {
    font-size: 14px;
    color: var(--vvr-text);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vvr-card-media {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.vvr-media-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.vvr-media-item:hover {
    transform: scale(1.05);
}

.vvr-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vvr-media-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.vvr-media-item:hover .vvr-media-overlay {
    opacity: 1;
}

.vvr-media-overlay svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.vvr-media-count {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Lightbox */
.vvr-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vvr-lightbox.active {
    display: flex;
    opacity: 1;
}

.vvr-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.vvr-lightbox-media {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
}

.vvr-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.vvr-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.vvr-lightbox-close svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.vvr-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.vvr-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.vvr-lightbox-nav svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.vvr-lightbox-prev {
    left: -60px;
}

.vvr-lightbox-next {
    right: -60px;
}

/* Responsive */
@media (max-width: 768px) {
    .vvr-widget {
        padding: 20px;
        border-radius: 12px;
    }

    .vvr-hero {
        flex-direction: column;
        gap: 20px;
    }

    .vvr-rating-number {
        font-size: 40px;
    }

    .vvr-distribution {
        max-width: 100%;
    }

    .vvr-media-grid {
        grid-template-columns: 1fr;
    }

    .vvr-lightbox-nav {
        top: auto;
        bottom: 20px;
        transform: none;
    }

    .vvr-lightbox-prev {
        left: 20px;
    }

    .vvr-lightbox-next {
        right: 20px;
    }
}

/* Loading Animation */
@keyframes vvr-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.vvr-loading {
    animation: vvr-pulse 1.5s infinite;
    background: #E5E7EB;
    border-radius: 4px;
}

/* ============================================
   Shortcode: [vvr_stars] - Compact Stars Widget
   ============================================ */
.vvr-stars-widget {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vvr-stars-inline {
    display: flex;
    align-items: center;
    gap: 2px;
}

.vvr-stars-widget .vvr-star {
    width: 18px;
    height: 18px;
    fill: var(--vvr-star-empty);
    transition: fill 0.2s ease;
}

.vvr-stars-widget .vvr-star.filled {
    fill: var(--vvr-star-filled);
}

.vvr-stars-widget .vvr-star.half {
    fill: url(#half-star-gradient);
}

/* Size variations */
.vvr-stars-small .vvr-star {
    width: 14px;
    height: 14px;
}

.vvr-stars-large .vvr-star {
    width: 24px;
    height: 24px;
}

.vvr-rating-inline {
    font-size: 18px;
    font-weight: 700;
    color: var(--vvr-secondary);
}

.vvr-stars-small .vvr-rating-inline {
    font-size: 14px;
}

.vvr-stars-large .vvr-rating-inline {
    font-size: 24px;
}

.vvr-count-inline {
    font-size: 14px;
    color: var(--vvr-text-light);
    font-weight: 500;
}

.vvr-stars-small .vvr-count-inline {
    font-size: 12px;
}

.vvr-stars-large .vvr-count-inline {
    font-size: 16px;
}

.vvr-verified-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--vvr-badge-bg);
    color: var(--vvr-badge-text);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.vvr-verified-inline svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.vvr-stars-small .vvr-verified-inline {
    font-size: 9px;
    padding: 3px 8px;
}

.vvr-stars-large .vvr-verified-inline {
    font-size: 11px;
    padding: 5px 12px;
}

.vvr-stars-large .vvr-verified-inline svg {
    width: 14px;
    height: 14px;
}
