/* 口コミ集約ページスタイル */

/* ページヘッダー */
.aggregate-header {
    text-align: center;
    margin-bottom: 3rem;
}

.aggregate-header h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.aggregate-logo img {
    max-width: 300px;
    height: auto;
}

/* カスタムHTMLエリア */
.custom-html-area {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

/* 総合評価セクション */
.rating-section {
    margin-bottom: 3rem;
}

.rating-overview {
    display: flex;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rating-main {
    flex: 0 0 300px;
    text-align: center;
}

.rating-score {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
}

.score-number {
    color: #ff6b35;
}

.score-max {
    font-size: 1.5rem;
    color: #666;
}

.rating-main .review-count {
    margin-top: 0.5rem;
    color: #666;
}

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

.rating-distribution h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.rating-bar:nth-child(2) { animation-delay: 0.08s; }
.rating-bar:nth-child(3) { animation-delay: 0.16s; }
.rating-bar:nth-child(4) { animation-delay: 0.24s; }
.rating-bar:nth-child(5) { animation-delay: 0.32s; }
.rating-bar:nth-child(6) { animation-delay: 0.4s; }

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.rating-label {
    flex: 0 0 100px;
}

.bar-container {
    flex: 1;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b35 0%, #ff8c5a 100%);
    width: 0;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
    position: relative;
    transform-origin: left center;
}

/* アニメーション完了後のシマーエフェクト */
.bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rating-section[data-animated="true"] .bar-fill::after {
    animation: shimmer 2s ease-out 1.5s;
    opacity: 1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.rating-bar .rating-count {
    flex: 0 0 50px;
    text-align: right;
    color: #666;
}

.rating-bar .rating-percent {
    flex: 0 0 50px;
    text-align: right;
    color: #999;
}

/* 項目別評価 */
.item-ratings {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.item-ratings h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.item-ratings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.item-rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.item-label {
    font-weight: 500;
}

.item-score {
    white-space: nowrap;
}

/* 口コミ一覧セクション */
.reviews-section {
    margin-bottom: 3rem;
}

.reviews-section h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.reviews-list {
    margin-bottom: 2rem;
}

/* 口コミアイテム */
.review-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease;
}

.review-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 口コミ収集元別のスタイル */
.review-item--internet_research {
    border-left: 4px solid #6c757d;
}

.review-item--photo_verified {
    border-left: 4px solid #28a745;
}

.review-item--direct_post {
    border-left: 4px solid #007bff;
}

/* 口コミヘッダー */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.review-author {
    font-weight: bold;
    color: #333;
}

.review-age {
    color: #666;
    font-size: 0.9rem;
}

.review-date {
    color: #666;
    font-size: 0.875rem;
}

/* レビュー評価表示 */
.review-rating {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-stars {
    color: #ffa500;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.review-rating .rating-number {
    font-size: 1rem;
    font-weight: bold;
    color: #666;
}

/* 口コミ本文 */
.review-content {
    margin: 1rem 0;
    line-height: 1.6;
    color: #333;
}

.review-comment-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* 個別評価項目 */
.review-item-ratings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 1rem 0;
}

.review-item-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.review-item-label {
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    min-width: 80px;
}

.review-item-rating .rating-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.review-item-rating .rating-stars {
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.review-item-score {
    font-weight: bold;
    color: #ff6b35;
    font-size: 0.875rem;
    margin-left: 0.25rem;
}

/* 統計情報セクション */
.statistics-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.statistics-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
}

.stat-value-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff6b35;
}

.stat-count {
    font-size: 0.9rem;
    color: #999;
}

/* 口コミ写真 */
.review-photos {
    margin-top: 1rem;
}

.review-photos-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.review-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    max-width: 400px;
}

.review-photo-link {
    position: relative;
    display: block;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 1;
}

.review-photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.review-photo-link:hover .review-photo-thumb {
    transform: scale(1.1);
}

.review-photos-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #666;
    font-weight: bold;
    border-radius: 6px;
    aspect-ratio: 1;
    font-size: 0.9rem;
}

/* バッジスタイル */
.review-source-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.review-source-badge--internet {
    background: #e9ecef;
    color: #495057;
}

.review-source-badge--photo {
    background: #d4edda;
    color: #155724;
}

.review-source-badge--direct {
    background: #d1ecf1;
    color: #0c5460;
}

.review-verified {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #ffc107;
    color: #856404;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* 店舗情報 */
.review-store-info {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

/* ページネーション */
.pagination-wrapper {
    margin-top: 2rem;
}

.pagination-wrapper ul {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.pagination-wrapper li {
    margin: 0;
}

.pagination-wrapper a,
.pagination-wrapper .current {
    display: block;
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
}

.pagination-wrapper .current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-wrapper a:hover {
    background: #e9ecef;
}

/* 記事セクション */
.article-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

/* 利用方法セクション */
.usage-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.usage-section h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.usage-section h3 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.usage-steps {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
}

.usage-steps li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.usage-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: #ff6b35;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.usage-points {
    list-style: none;
    padding: 0;
}

.usage-points li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
}

.usage-points li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.2rem;
}

.usage-cta {
    text-align: center;
}

/* 口コミ投稿フォーム */
.review-form-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.review-submission-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.required {
    color: #dc3545;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.form-option {
    margin-top: 0.5rem;
}

.form-option label {
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.photo-upload-area {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.photo-input-wrapper {
    position: relative;
}

.review-photo-input {
    width: 100%;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.form-submit {
    text-align: center;
    margin-top: 2rem;
}

#review-form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
}

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

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

/* 関連情報リンク */
.related-links {
    text-align: center;
    margin-bottom: 3rem;
}

.related-links h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.link-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ボタンスタイル */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-outline {
    border: 2px solid #007bff;
    color: #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

.btn-official {
    background: #ff6b35;
    color: white;
}

.btn-official:hover {
    background: #e55a2b;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .rating-overview {
        flex-direction: column;
    }
    
    .rating-main {
        flex: 1;
        margin-bottom: 2rem;
    }
    
    .item-ratings-grid {
        grid-template-columns: 1fr;
    }
    
    .review-item-ratings {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .photo-upload-area {
        grid-template-columns: 1fr;
    }
    
    .link-buttons {
        flex-direction: column;
    }
    
    .usage-steps li {
        padding-left: 2.5rem;
    }
    
    .usage-steps li::before {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.875rem;
    }
    
    .rating-bar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .rating-label {
        flex: 0 0 90px;
        font-size: 0.875rem;
    }
    
    .bar-container {
        flex: 1 1 100%;
        order: 3;
    }
    
    .rating-bar .rating-count,
    .rating-bar .rating-percent {
        flex: 0 0 auto;
        font-size: 0.875rem;
    }
}

/* 星評価表示の統一スタイル */
.rating-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-stars {
    color: #ffa500;
    font-size: 1.2em;
    letter-spacing: 2px;
}

.rating-score {
    color: #666;
    font-size: 0.9em;
}

.rating-badge {
    display: inline-block;
    padding: 0.25em 0.75em;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 500;
}

.rating-badge--gold {
    background: #fff3cd;
    color: #856404;
}

.rating-badge--silver {
    background: #e2e3e5;
    color: #383d41;
}

.rating-badge--bad {
    background: #f8d7da;
    color: #721c24;
}

/* 星評価スタイルの改善 */
.rating-main .rating-stars {
    font-size: 2rem;
}

.rating-main .rating-wrapper {
    justify-content: center;
    margin: 1rem 0;
}

/* ユーティリティクラス */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

.text-muted { color: #6c757d; }

/* 星の個別スタイル */
.star {
    display: inline-block;
    transition: transform 0.2s ease;
}

.star.filled {
    color: #ffa500;
}

.star.half {
    color: #ffa500;
    position: relative;
}

.star.half::after {
    content: '☆';
    position: absolute;
    left: 0;
    color: #ddd;
    overflow: hidden;
    width: 50%;
}

.star.empty {
    color: #ddd;
}

.star:hover {
    transform: scale(1.1);
}

/* 口コミ詳細情報 */
.review-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.review-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px 20px;
}

.review-detail-item {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
}

.detail-label {
    font-weight: 600;
    color: #666;
    margin-right: 8px;
    white-space: nowrap;
}

.detail-value {
    color: #333;
    word-break: break-word;
}

.detail-value small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 4px;
}

.review-selection-reason {
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
    margin-top: 15px;
}

.review-selection-reason h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.review-selection-reason p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

@media (max-width: 768px) {
    .review-details-grid {
        grid-template-columns: 1fr;
    }
}