/**
 * お客様レビューコンポーネント
 * BEM命名規則を使用したコンポーネントベースのスタイル
 */

/* =====================================================
   コンポーネントルート
   ===================================================== */
/* .review-component と .review-component__container は
   既存の .sub_section と .sub_box のスタイルを継承 */

/* =====================================================
   星評価サマリー (.review-component__summary)
   ===================================================== */
.review-component__summary {
    width: 300px;
    max-width: 100%;
    position: sticky;
    top: 20%;
}

.review-component__title {
    font-size: 17px;
}

.review-component__average {
    color: #f1b500;
    margin: 10px 0;
}

.review-component__score {
    color: #5a5a5a;
    letter-spacing: 1px;
    font-weight: bold;
    font-style: normal;
}

.review-component__count {
    display: block;
    color: #ababab;
}

/* =====================================================
   評価割合バー (.review-component__rating-bars)
   ===================================================== */
.review-component__rating-bars {
    list-style: none;
    padding: 0;
    margin: 0;
}

.review-component__rating-bar {
    cursor: pointer;
}

.review-component__rating-bar:not(:last-of-type) {
    margin-bottom: 5px;
}

.review-component__rating-bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: space-between;
    align-items: center;
    color: #4fa5d7;
    font-weight: 500;
    margin: 0;
}

.review-component__rating-label {
    width: 45px;
}

.review-component__rating-progress {
    width: calc(100% - 90px);
    display: block;
    height: 18px;
    background-color: #dfdfdf;
    border-radius: 3px;
    position: relative;
    z-index: 0;
}

.review-component__rating-progress span {
    position: absolute;
    z-index: 0;
    top: 0;
    left: 0;
    background-color: #f1b500;
    height: 100%;
    border-radius: 3px;
}

.review-component__rating-percent {
    width: 45px;
    text-align: right;
}

/* =====================================================
   レビューリスト (.review-component__list)
   ===================================================== */
.review-component__list {
    width: calc(100% - 330px);
}

.review-component__group {
    display: none;
    margin-bottom: 2rem;
}

.review-component__group.active {
    display: block;
}

.review-component__items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.review-component__item:not(:last-of-type) {
    margin-bottom: 2rem;
}

/* =====================================================
   個別レビュー (.review-component__item)
   ===================================================== */
.review-component__author {
    font-size: 16px;
    margin-right: 10px;
    font-weight: 500;
}

.review-component__author-icon {
    width: 40px;
    display: inline-block;
    margin-right: 10px;
}

.review-component__author-icon img {
    width: 100%;
    height: auto;
}

.review-component__rating {
    color: #f1b500;
}

.review-component__rating-value {
    color: #5a5a5a;
    letter-spacing: 1px;
    font-weight: bold;
    font-style: normal;
}

.review-component__date {
    display: block;
    color: #ababab;
}

.review-component__content {
    margin: 10px 0;
}

.review-component__content-title {
    font-size: 1.15em;
    margin-bottom: 5px;
    font-weight: 600;
}

/* =====================================================
   役に立った (.review-component__helpful)
   ===================================================== */
.review-component__helpful-count {
    color: #d19ab4;
}

.review-component__helpful-btn {
    border: 1px solid #c5c5c5;
    padding: 3px 6px;
    display: inline-block;
    border-radius: 3px;
    font-weight: 600;
    margin-top: 5px;
    cursor: pointer;
}

.review-component__helpful-btn:hover {
    background-color: #f5f5f5;
}

/* =====================================================
   ボタンエリア (.review-component__actions)
   ===================================================== */
.review-component__actions {
    width: 100%;
}

.review-component__btn {
    width: 300px;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    color: #5a5a5a;
    display: block;
    border: 1px solid #5a5a5a;
    border-radius: 5px;
    padding: 9px 0;
    margin-top: 15px;
    cursor: pointer;
    text-decoration: none;
}

.review-component__btn:hover {
    background-color: #f5f5f5;
}

.review-component__btn--write {
    font-weight: 600;
}

/* PC/SP表示切り替えは既存の.pcと.spクラスに従う */

/* =====================================================
   レスポンシブ (800px以下)
   ===================================================== */
@media screen and (max-width: 800px) {
    .review-component__summary {
        width: 100%;
        position: relative;
        top: 0;
    }

    .review-component__list {
        width: 100%;
        border-top: 1px solid #5a5a5a;
        border-bottom: 1px solid #5a5a5a;
        padding: 1.5rem 0;
        margin: 1.5rem 0;
    }

    .review-component__author-icon {
        width: 30px;
        margin-right: 5px;
    }

    .review-component__author {
        font-size: 15px;
    }

    .review-component__btn--view {
        margin: 0 auto;
    }

    .review-component__btn {
        margin-top: 10px;
        width: 100%;
    }
}

/* =====================================================
   レスポンシブ (640px以下)
   ===================================================== */
@media screen and (max-width: 640px) {
    .review-component__summary {
        padding: 0 15px;
    }

    .review-component__list {
        padding: 1rem 15px;
        margin: 1rem 0;
    }

    .review-component__actions--sp {
        padding: 0 15px;
    }
}
