/**
 * WC Product Reviews - Frontend Styles
 *
 * @package WC_Product_Reviews_MYLP
 * @since 1.0.0
 */

/* Reviews Container */
.wcpr-reviews {
    margin: 30px 0;
}

.wcpr-reviews-title {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: inherit;
}

/* Single Review */
.wcpr-review {
    display: flex;
    gap: 20px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.wcpr-review:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Review Photo */
.wcpr-review-photo {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.wcpr-review-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.wcpr-review-photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
}

/* Review Content */
.wcpr-review-content {
    flex: 1;
}

.wcpr-review-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.wcpr-review-author {
    font-weight: 600;
    color: #1d2327;
}

.wcpr-review-position {
    color: #666;
    font-size: 0.9em;
}

/* Stars - Partielle Sterne für mehr Glaubwürdigkeit */
.wcpr-stars-container {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.wcpr-star {
    color: #f5a623;
    font-size: 16px;
    line-height: 1;
}

.wcpr-star-full {
    color: #f5a623;
}

.wcpr-star-empty {
    color: #ddd;
}

/* Partieller Stern - z.B. 80% gefüllt bei 4.8 Bewertung */
.wcpr-star-partial {
    position: relative;
    display: inline-block;
    color: #f5a623;
}

.wcpr-star-bg {
    color: #ddd;
}

.wcpr-star-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: #f5a623;
    white-space: nowrap;
}

/* Aggregate Stars größer */
.wcpr-aggregate-stars .wcpr-star {
    font-size: 22px;
}

/* Review Stars */
.wcpr-review-stars {
    display: inline-flex;
    align-items: center;
}

.wcpr-review-stars .wcpr-star {
    font-size: 16px;
}

/* Legacy Support für alte Klassen */
.wcpr-review-stars .star-empty,
.star-empty {
    color: #ddd;
}

/* Verified Badge */
.wcpr-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #d1e7dd;
    color: #0f5132;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.wcpr-verified-badge::before {
    content: "✓";
    font-weight: bold;
}

/* Review Text */
.wcpr-review-text {
    line-height: 1.6;
    color: #333;
    margin-bottom: 10px;
}

.wcpr-review-date {
    font-size: 0.85em;
    color: #888;
}

/* Aggregate Rating Wrapper */
.wcpr-aggregate-wrapper {
    margin-bottom: 30px;
}

/* Aggregate Rating */
.wcpr-aggregate {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    border-radius: 12px;
}

.wcpr-aggregate-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.wcpr-aggregate-score {
    font-size: 56px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1;
}

.wcpr-aggregate-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wcpr-aggregate-stars {
    color: #f5a623;
    font-size: 22px;
    letter-spacing: 2px;
}

.wcpr-aggregate-count {
    color: #666;
    font-size: 14px;
}

/* Progress Bars */
.wcpr-progress-bars {
    flex: 1;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wcpr-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wcpr-progress-label {
    width: 40px;
    font-size: 13px;
    color: #666;
    text-align: right;
}

.wcpr-progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.wcpr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f5a623 0%, #ffc107 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.wcpr-progress-percent {
    width: 38px;
    font-size: 12px;
    color: #888;
    text-align: right;
}

/* Trust Badges */
.wcpr-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.wcpr-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    color: #1d2327;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wcpr-trust-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.wcpr-trust-badge-icon {
    font-size: 14px;
}

.wcpr-trust-badge-icon[data-icon="check"] {
    color: #0f5132;
}

.wcpr-trust-badge-icon[data-icon="star"] {
    color: #f5a623;
}

.wcpr-trust-badge-icon[data-icon="shield"] {
    color: #0d6efd;
}

.wcpr-trust-badge-icon[data-icon="lock"] {
    color: #198754;
}

.wcpr-trust-badge-text {
    font-weight: 500;
}

/* Grid Layout */
.wcpr-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.wcpr-reviews-grid .wcpr-review {
    margin-bottom: 0;
}

/* Carousel Layout */
.wcpr-carousel-container {
    position: relative;
    overflow: hidden;
}

.wcpr-carousel-inner {
    position: relative;
}

/* Carousel Reviews - alle versteckt, nur .wcpr-active sichtbar */
.wcpr-carousel-container .wcpr-review {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    margin-bottom: 0;
}

.wcpr-carousel-container .wcpr-review.wcpr-active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.wcpr-carousel-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.wcpr-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s ease;
}

.wcpr-carousel-dot.active {
    background: #1d2327;
}

/* Compact Layout */
.wcpr-reviews-compact .wcpr-review {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
}

.wcpr-reviews-compact .wcpr-review-photo {
    width: 40px;
    height: 40px;
}

.wcpr-reviews-compact .wcpr-review-text {
    font-size: 0.95em;
}

/* Dark Theme */
.wcpr-reviews-dark .wcpr-review {
    background: #1d2327;
    color: #fff;
}

.wcpr-reviews-dark .wcpr-review-author {
    color: #fff;
}

.wcpr-reviews-dark .wcpr-review-text {
    color: #ccc;
}

.wcpr-reviews-dark .wcpr-review-position {
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .wcpr-review {
        flex-direction: column;
        gap: 15px;
    }
    
    .wcpr-review-photo {
        width: 50px;
        height: 50px;
    }
    
    .wcpr-aggregate {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .wcpr-aggregate-left {
        flex-direction: column;
        gap: 10px;
    }
    
    .wcpr-aggregate-score {
        font-size: 42px;
    }
    
    .wcpr-progress-bars {
        max-width: 100%;
        width: 100%;
    }
    
    .wcpr-trust-badges {
        justify-content: center;
    }
    
    .wcpr-reviews-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .wcpr-aggregate {
        padding: 20px 15px;
    }
    
    .wcpr-aggregate-score {
        font-size: 36px;
    }
    
    .wcpr-trust-badge {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* Animation - nur für List/Grid Layout, nicht Carousel */
@keyframes wcpr-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wcpr-reviews-list .wcpr-review,
.wcpr-reviews-grid .wcpr-review {
    animation: wcpr-fadeIn 0.5s ease forwards;
}

.wcpr-reviews-list .wcpr-review:nth-child(2),
.wcpr-reviews-grid .wcpr-review:nth-child(2) { animation-delay: 0.1s; }
.wcpr-reviews-list .wcpr-review:nth-child(3),
.wcpr-reviews-grid .wcpr-review:nth-child(3) { animation-delay: 0.2s; }
.wcpr-reviews-list .wcpr-review:nth-child(4),
.wcpr-reviews-grid .wcpr-review:nth-child(4) { animation-delay: 0.3s; }
.wcpr-reviews-list .wcpr-review:nth-child(5),
.wcpr-reviews-grid .wcpr-review:nth-child(5) { animation-delay: 0.4s; }

/* Carousel-Reviews keine fadeIn Animation */
.wcpr-carousel-container .wcpr-review {
    animation: none;
}