/**
 * レビュー管理システム フロントエンド用CSS
 */

/* レビューセクション全体 */
.srm-reviews-section {
    margin: 40px 0;
}

/* レビュー統計 */
.srm-reviews-summary {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.srm-average-rating {
    text-align: center;
    min-width: 150px;
}

.srm-rating-number {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.srm-rating-stars {
    margin: 10px 0;
}

.srm-total-reviews {
    color: #666;
    font-size: 14px;
}

/* 評価分布 */
.srm-rating-distribution {
    flex: 1;
}

.srm-rating-bar-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.srm-rating-label {
    width: 40px;
    font-size: 14px;
    color: #666;
}

.srm-rating-bar {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    margin: 0 10px;
    position: relative;
    overflow: hidden;
}

.srm-rating-bar-fill {
    height: 100%;
    background: #ffb400;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.srm-rating-count {
    width: 30px;
    text-align: right;
    font-size: 14px;
    color: #666;
}

/* レビューフォーム */
.srm-review-form-wrapper {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.srm-review-form-wrapper h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.srm-form-group {
    margin-bottom: 20px;
}

.srm-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.srm-label .required {
    color: #dc3545;
}

/* 星評価入力 */
.srm-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.srm-rating-input input[type="radio"] {
    display: none;
}

.srm-star {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.srm-rating-input input[type="radio"]:checked ~ label,
.srm-rating-input label:hover,
.srm-rating-input label:hover ~ label {
    color: #ffb400;
}

/* フォーム要素 */
.srm-input,
.srm-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
}

.srm-textarea {
    min-height: 120px;
    resize: vertical;
}

.srm-char-count {
    text-align: right;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.srm-help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.srm-submit-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.srm-submit-button:hover {
    background: #005a87;
}

.srm-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* メッセージ */
.srm-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

.srm-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.srm-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* レビュー一覧 */
.srm-reviews-list {
    margin-top: 30px;
}

.srm-review-item {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.srm-review-item:last-child {
    border-bottom: none;
}

.srm-review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.srm-review-author {
    color: #666;
}

.srm-author-name {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

.srm-review-date {
    font-size: 14px;
    color: #999;
}

.srm-review-rating {
    color: #ffb400;
}

.srm-review-title {
    margin: 10px 0;
    font-size: 18px;
    color: #333;
}

.srm-review-content {
    color: #666;
    line-height: 1.6;
}

/* 星表示 */
.srm-star-full {
    color: #ffb400;
}

.srm-star-half {
    color: #ffb400;
    position: relative;
}

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

/* ログインプロンプト */
.srm-login-prompt {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
}

.srm-login-prompt a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.srm-already-reviewed {
    text-align: center;
    padding: 20px;
    background: #d4edda;
    color: #155724;
    border-radius: 4px;
}

/* レビューなし */
.srm-no-reviews {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* ページネーション */
.srm-pagination {
    margin-top: 30px;
    text-align: center;
}

.srm-pagination a,
.srm-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #dee2e6;
    color: #007cba;
    text-decoration: none;
    border-radius: 4px;
}

.srm-pagination .current {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .srm-reviews-summary {
        flex-direction: column;
        gap: 20px;
    }
    
    .srm-average-rating {
        min-width: auto;
    }
    
    .srm-review-header {
        flex-direction: column;
        gap: 10px;
    }
}