/**
 * WP Rating Chart - Frontend Styles
 * ダークテーマ対応レイアウト
 */

/* コンテナ */
.wprc-container {
    margin: 1.5em 0;
    border: 1px solid #0394df;
    border-radius: 8px;
    overflow: hidden;
}

/* ヘッダー（総合評価） */
.wprc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(90deg, rgba(3, 148, 223, 0.4) 0%, rgba(0, 0, 0, 0) 100%);
    border-bottom: 1px solid rgba(3, 148, 223, 0.3);
}

.wprc-header-title {
    font-weight: bold;
    color: #fff;
    font-size: 16px;
}

.wprc-header-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wprc-header-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.wprc-header-value {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
}

.wprc-header .wprc-stars {
    margin-left: 2px;
}

.wprc-header .wprc-star {
    font-size: 16px;
}

/* メインコンテンツ - 左にチャート、右にテーブル */
.wprc-content {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 20px;
    gap: 24px;
}

/* チャートエリア（左側） */
.wprc-chart-area {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wprc-chart-title {
    font-size: 14px;
    font-weight: bold;
    color: rgba(255, 255, 255, 1);
    text-align: center;
}

.wprc-chart-area canvas {
    max-width: 100%;
    height: auto;
}

/* テーブルエリア（右側） */
.wprc-table-area {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

/* 評価テーブル */
.wprc-rating-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    margin-bottom: 0 !important;
}

.wprc-rating-table tr {
    background: rgba(0, 0, 0, 0.4);
}

.wprc-rating-table th,
.wprc-rating-table td {
    padding: 4px 16px;
    vertical-align: middle;
}

.wprc-rating-table th {
    text-align: center;
    font-weight: bold;
    color: #fff;
    font-size: 13px;
    width: 100px;
    background: linear-gradient(90deg, #02d1a3 0%, #0199ea 100%);
    border-radius: 4px 0 0 4px;
}

.wprc-rating-table td {
    text-align: center;
    color: #fff;
    border-radius: 0 4px 4px 0;
}

/* 星評価 */
.wprc-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.wprc-star {
    font-size: 22px;
    line-height: 1;
}

.wprc-star-full {
    color: #ffd000;
}

.wprc-star-half {
    position: relative;
    display: inline-block;
}

.wprc-star-half .wprc-star-bg {
    color: rgba(255, 255, 255, 0.3);
}

.wprc-star-half .wprc-star-fg {
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #ffd000;
}

.wprc-star-empty {
    color: rgba(255, 255, 255, 0.3);
}

/* コメント */
.wprc-comment {
    margin: 0 20px 20px;
    padding: 16px 20px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(3, 148, 223, 0.4) 0%, rgba(0, 0, 0, 0) 100%);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.7;
    text-align: center;
}

/* レスポンシブ - モバイル */
@media screen and (max-width: 767px) {
    .wprc-header {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        padding: 10px 16px;
        gap: 20px;
    }
    
    .wprc-header-value {
        font-size: 24px;
    }
    
    .wprc-content {
        flex-direction: column;
        padding: 16px;
        gap: 0px;
    }
    
    .wprc-chart-area {
        flex: none;
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .wprc-table-area {
        width: 100%;
    }
    
    .wprc-rating-table th {
        width: 140px;
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .wprc-rating-table td {
        padding: 8px 12px;
    }
    
    .wprc-star {
        font-size: 21px;
    }
    
    .wprc-comment {
        margin: 0 16px 16px;
        padding: 12px 16px;
        font-size: 18px;
    }
    .wprc-chart-title {
    font-size: 17px;
    }
}

@media screen and (max-width: 480px) {
    
    .wprc-header {
        flex-direction: column;
        gap: 0;
    }
}
