/**
 * Testimonial Star Rating Styles
 * Styles for testimonial star rating shortcodes
 */

/* Base star wrapper */
.testimonial-stars-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

/* Star container */
.testimonial-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    line-height: 1;
}

/* Individual star */
.testimonial-stars .star {
    display: inline-block;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    transition: all 0.2s ease;
}

/* Star sizes */
.testimonial-stars-small .star {
    font-size: 14px;
}

.testimonial-stars-medium .star {
    font-size: 18px;
}

.testimonial-stars-large .star {
    font-size: 24px;
}

/* Default style - gold stars */
.testimonial-stars-default .star-full {
    color: #ffc107;
}

.testimonial-stars-default .star-half {
    position: relative;
    display: inline-block;
    color: #e4e5e9; /* Empty star background */
}

.testimonial-stars-default .star-half::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #ffc107;
}

.testimonial-stars-default .star-empty {
    color: #e4e5e9;
}

/* Filled style - solid colors */
.testimonial-stars-filled .star-full {
    color: #ff6b35;
}

.testimonial-stars-filled .star-half {
    background: linear-gradient(90deg, #ff6b35 50%, #e4e5e9 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.testimonial-stars-filled .star-empty {
    color: #e4e5e9;
}

/* Outline style */
.testimonial-stars-outline .star {
    -webkit-text-stroke: 1px #ffc107;
    -webkit-text-fill-color: transparent;
}

.testimonial-stars-outline .star-full {
    -webkit-text-fill-color: #ffc107;
}

.testimonial-stars-outline .star-half {
    background: linear-gradient(90deg, #ffc107 50%, transparent 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom style - uses CSS variables */
.testimonial-stars-custom .star-full {
    color: var(--star-color, #ffc107);
}

.testimonial-stars-custom .star-half {
    background: linear-gradient(90deg, var(--star-color, #ffc107) 50%, var(--star-empty-color, #e4e5e9) 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.testimonial-stars-custom .star-empty {
    color: var(--star-empty-color, #e4e5e9);
}

/* Rating number display */
.testimonial-rating-number {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
}

.testimonial-rating-count {
    font-size: 0.8em;
    color: #999;
    margin-left: 4px;
}

/* Average stars specific styling */
.testimonial-avg-stars {
    font-weight: 500;
}

.testimonial-avg-stars .testimonial-rating-number {
    font-weight: 600;
    color: #333;
}

/* No rating states */
.testimonial-no-rating,
.testimonial-no-ratings {
    color: #999;
    font-style: italic;
    font-size: 0.9em;
}

/* Admin dashboard specific styles */
.admin-stars {
    font-family: inherit;
    white-space: nowrap;
}

/* Hover effects for interactive stars */
.testimonial-stars .star:hover {
    transform: scale(1.1);
}

/* Animation for star appearance */
@keyframes starAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.testimonial-stars .star {
    animation: starAppear 0.3s ease-out;
}

.testimonial-stars .star:nth-child(1) { animation-delay: 0.1s; }
.testimonial-stars .star:nth-child(2) { animation-delay: 0.2s; }
.testimonial-stars .star:nth-child(3) { animation-delay: 0.3s; }
.testimonial-stars .star:nth-child(4) { animation-delay: 0.4s; }
.testimonial-stars .star:nth-child(5) { animation-delay: 0.5s; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .testimonial-stars-large .star {
        font-size: 20px;
    }
    
    .testimonial-stars-medium .star {
        font-size: 16px;
    }
    
    .testimonial-stars-small .star {
        font-size: 12px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .testimonial-stars-default .star-full {
        color: #000;
    }
    
    .testimonial-stars-default .star-empty {
        color: #999;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .testimonial-stars .star {
        animation: none;
        transition: none;
    }
    
    .testimonial-stars .star:hover {
        transform: none;
    }
}