/**
 * Custom Reviews Widget Styles
 */

.crw-reviews-container {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-family: inherit;
}

/* Profile Images */
.crw-profile-images {
    display: flex;
    align-items: center;
}

.crw-profile-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}


.crw-profile-image:not(:first-child) {
    margin-left: -5px;
}

/* Rating Stars */
.crw-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.crw-star {
    font-size: 20px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.crw-star.filled {
    color: #FFD700;
}

.crw-star.half {
    color: #FFD700;
    position: relative;
}

.crw-star.half::before {
    content: "★";
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: #FFD700;
}

.crw-star.empty {
    color: #E5E5E5;
}


/* Rating Section */
.crw-rating-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.crw-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.crw-rating-value {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
}

/* Review Text */
.crw-review-text {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666666;
    font-weight: 400;
    white-space: nowrap;
    flex-wrap: nowrap;
    gap: 0;
}

.crw-review-text > * {
    white-space: nowrap;
}

.crw-review-count {
    font-weight: 600;
    color: #333333;
}

.crw-review-label {
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    .crw-reviews-container {
        gap: 10px;
    }
    
    .crw-profile-image {
        width: 40px;
        height: 40px;
    }
    
    .crw-star {
        font-size: 18px;
    }
    
    .crw-review-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .crw-reviews-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .crw-profile-image {
        width: 35px;
        height: 35px;
    }
    
    .crw-star {
        font-size: 16px;
    }
    
    .crw-review-text {
        font-size: 12px;
    }
}

/* Animation for when widget loads */
.crw-reviews-container {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation Controls */
.crw-profile-image {
    transition: all 0.3s ease;
}

.crw-star {
    transition: all 0.3s ease;
}

/* Hover effects - Only when enabled */
.crw-reviews-container.crw-hover-enabled.crw-star-hover-enabled:hover .crw-star.filled {
    animation: starPulse 1s ease-in-out;
}

/* Image hover styles */
.crw-profile-image.crw-hover-scale:hover {
    transform: scale(1.1);
    z-index: 10;
    position: relative;
}

.crw-profile-image.crw-hover-individual:hover {
    transform: scale(1.15) rotate(5deg);
    z-index: 10;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Wave effect - images animate one after another */
.crw-reviews-container.crw-hover-enabled:hover .crw-profile-image.crw-hover-wave.crw-wave-1 {
    animation: waveEffect 0.6s ease-out 0s;
}

.crw-reviews-container.crw-hover-enabled:hover .crw-profile-image.crw-hover-wave.crw-wave-2 {
    animation: waveEffect 0.6s ease-out 0.1s;
}

.crw-reviews-container.crw-hover-enabled:hover .crw-profile-image.crw-hover-wave.crw-wave-3 {
    animation: waveEffect 0.6s ease-out 0.2s;
}

.crw-reviews-container.crw-hover-enabled:hover .crw-profile-image.crw-hover-wave.crw-wave-4 {
    animation: waveEffect 0.6s ease-out 0.3s;
}

.crw-reviews-container.crw-hover-enabled:hover .crw-profile-image.crw-hover-wave.crw-wave-5 {
    animation: waveEffect 0.6s ease-out 0.4s;
}

@keyframes waveEffect {
    0%, 100% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.1) translateY(-5px);
    }
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Disable all hover effects when animations are disabled */
.crw-reviews-container:not(.crw-hover-enabled) .crw-profile-image:hover {
    transform: none;
}

.crw-reviews-container:not(.crw-hover-enabled) .crw-star:hover {
    transform: none;
}

/* Custom alignment classes */
.crw-reviews-container.align-left {
    justify-content: flex-start;
}

.crw-reviews-container.align-center {
    justify-content: center;
}

.crw-reviews-container.align-right {
    justify-content: flex-end;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .crw-review-text {
        color: #ffffff;
    }
    
    .crw-star.empty {
        color: #555555;
    }
    
    .crw-profile-image {
        border-color: #333333;
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    }
}
