/**
 * Rating Summary Styles
 * Numbers style: "5 ⭐ ████████░░ 80"
 */

.yayrev-rating-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    column-gap: 2rem;
    margin-bottom: 1.5rem;
    max-width: 750px;
}

/* Average Score Section */
.yayrev-rating-summary__average {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    background-color: #fafafa;
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.yayrev-rating-summary__score-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.yayrev-rating-summary__score {
    font-size: 3.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.yayrev-rating-summary__stars {
    display: flex;
    gap: 0.125rem;
}

.yayrev-rating-summary__star {
    font-size: 1.25rem;
    line-height: 1;
}

.yayrev-rating-summary__star--empty {
    opacity: 0.3;
}

.yayrev-rating-summary__count {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Rating Bars Section */
.yayrev-rating-summary__bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.yayrev-rating-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    width: 100%;
    text-align: left;
}

.yayrev-rating-bar:hover:not(.yayrev-rating-bar--empty),
.yayrev-rating-bar:focus-visible:not(.yayrev-rating-bar--empty) {
    background-color: #f0f1f2c1;
}

.yayrev-rating-bar:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.yayrev-rating-bar--active {
    background-color: #dbeafe;
}

.yayrev-rating-bar--active:hover {
    background-color: #bfdbfe;
}

.yayrev-rating-bar--empty {
    cursor: default;
    opacity: 0.6;
}

/* Non-clickable version (when filter disabled) */
div.yayrev-rating-bar {
    cursor: default;
}

div.yayrev-rating-bar:hover {
    background-color: transparent;
}

.yayrev-rating-bar__label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 2.5rem;
    flex-shrink: 0;
}

.yayrev-rating-bar__number {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    min-width: 0.75rem;
}

.yayrev-rating-bar__icon {
    font-size: 1rem;
    line-height: 1;
}

.yayrev-rating-bar__track {
    flex: 1;
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 0.25rem;
    overflow: hidden;
}

.yayrev-rating-bar__fill {
    height: 100%;
    background-color: #fbbf24;
    border-radius: 0.25rem;
    transition: width 0.3s ease;
}

.yayrev-rating-bar__count {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    min-width: 2rem;
    text-align: right;
}

/* Recommendation Section */
.yayrev-rating-summary__recommend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
    width: 100%;
}

.yayrev-rating-summary__recommend-pct {
    font-size: 1.125rem;
    font-weight: 600;
    color: #059669;
}

.yayrev-rating-summary__recommend-text {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Filter Indicator */
.yayrev-rating-summary__filter-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: #dbeafe;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.yayrev-rating-summary__filter-text {
    color: #1e40af;
    font-weight: 500;
}

.yayrev-rating-summary__clear-filter {
    color: #1e40af;
    text-decoration: underline;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 480px) {
    .yayrev-rating-summary {
        padding: 1rem;
        gap: 1rem;
    }

    .yayrev-rating-summary__score {
        font-size: 2rem;
    }

    .yayrev-rating-summary__star {
        font-size: 1rem;
    }

    .yayrev-rating-bar {
        gap: 0.5rem;
        padding: 0.25rem;
    }

    .yayrev-rating-bar__label {
        min-width: 2rem;
    }

    .yayrev-rating-bar__number {
        font-size: 0.75rem;
    }

    .yayrev-rating-bar__icon {
        font-size: 0.875rem;
    }

    .yayrev-rating-bar__count {
        font-size: 0.75rem;
        min-width: 1.5rem;
    }
}
