/*
 * Source of truth for rating UI on detail/watch pages.
 * Legacy box-rating rules were removed from styles.css and default.css.
 */
.box-rating {
    display: inline-flex;
    align-items: center;
    column-gap: 8px;
    row-gap: 4px;
    flex-wrap: wrap;
    width: auto;
    max-width: 100%;
    margin: 0;
    line-height: 1.2;
}

.detail-page .box-rating,
.watch-page #player-video .details .box-rating {
    align-items: center;
    background: #252525;
    border: 1px solid #2f2f2f;
    box-sizing: border-box;
    column-gap: 10px;
    margin-top: 14px;
    min-height: 46px;
    padding: 12px 14px;
    width: 100%;
}

.box-rating #star {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    width: auto;
    float: none;
    min-height: 14px;
}

.box-rating .rating-star {
    appearance: none;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.box-rating .rating-star.is-active {
    color: #f3bc2a;
}

.box-rating #star.is-readonly .rating-star {
    cursor: default;
}

.box-rating .rating-star:focus {
    outline: none;
    text-shadow: 0 0 4px rgba(243, 188, 42, 0.6);
}

.box-rating > div:last-child {
    display: inline-flex;
    align-items: center;
}

.box-rating #div_average {
    display: inline-flex;
    align-items: center;
    float: none !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    min-height: 14px;
    white-space: nowrap;
}

.box-rating #hint,
.box-rating .num-rating {
    line-height: 1.2;
}

.detail-page .box-rating #hint,
.watch-page #player-video .details .box-rating #hint {
    display: none;
}

.detail-page .box-rating #div_average,
.watch-page #player-video .details .box-rating #div_average {
    color: #d4d7dc;
    font-size: 12px;
}

.watch-page #player-video .details .box-rating.is-empty {
    width: auto;
    max-width: 100%;
    flex: 0 0 auto;
    min-height: 38px;
    margin-top: 0;
    padding: 8px 12px;
    border-radius: 4px;
}

.watch-page #player-video .details .box-rating.is-empty #div_average {
    white-space: nowrap;
}

.detail-page .box-rating .average,
.detail-page .box-rating #rate_count,
.watch-page #player-video .details .box-rating .average,
.watch-page #player-video .details .box-rating #rate_count {
    color: #ffffff;
    font-weight: 700;
}

.detail-page .dinfo {
    max-height: none;
    overflow: visible;
}

@media (max-width: 479px) {
    .detail-page .box-rating,
    .watch-page #player-video .details .box-rating {
        padding: 10px 12px;
        row-gap: 6px;
    }

    .box-rating #div_average {
        white-space: normal;
    }

    .watch-page #player-video .details .box-rating.is-empty {
        margin-top: 8px;
        padding: 8px 10px;
    }
}
