/* BGG Reviews Frontend Styles */

.bgg-reviews-container {
    max-width: 100%;
    margin: 2rem 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Game Header */
.bgg-game-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.bgg-game-thumbnail {
    width: 120px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bgg-game-info {
    flex: 1;
}

.bgg-game-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
}

.bgg-game-year {
    color: #6b7280;
    font-weight: 400;
    font-size: 1.5rem;
}

/* Reviews List */
.bgg-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bgg-review-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.bgg-review-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.bgg-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.bgg-review-username {
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
}

.bgg-review-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bgg-stars {
    display: inline-flex;
    gap: 0.125rem;
    font-size: 1.25rem;
    line-height: 1;
}

.bgg-star {
    color: #fbbf24;
}

.bgg-star-full {
    color: #f59e0b;
}

.bgg-star-half {
    color: #f59e0b;
    opacity: 0.6;
}

.bgg-star-empty {
    color: #d1d5db;
}

.bgg-rating-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
}

.bgg-review-content {
    color: #374151;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.bgg-review-content p {
    margin: 0 0 0.75rem 0;
}

.bgg-review-content p:last-child {
    margin-bottom: 0;
}

/* Pagination */
.bgg-reviews-pagination {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.bgg-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.bgg-page-link,
.bgg-page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.bgg-page-link {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.bgg-page-link:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.bgg-page-current {
    background: #3b82f6;
    color: #ffffff;
    border: 1px solid #3b82f6;
    cursor: default;
}

.bgg-page-ellipsis {
    padding: 0 0.25rem;
    color: #9ca3af;
}

/* Footer */
.bgg-reviews-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.bgg-reviews-attribution {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.bgg-reviews-attribution a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.bgg-reviews-attribution a:hover {
    text-decoration: underline;
}

/* Error and Empty States */
.bgg-reviews-error,
.bgg-reviews-empty {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.bgg-reviews-empty {
    background: #f0f9ff;
    border-color: #bfdbfe;
}

.bgg-reviews-error p,
.bgg-reviews-empty p {
    margin: 0;
    color: #374151;
}

/* Loading State */
.bgg-reviews-loading {
    text-align: center;
    padding: 3rem 1rem;
}

.bgg-reviews-loading::after {
    content: "";
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: bgg-spin 0.8s linear infinite;
}

@keyframes bgg-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .bgg-game-header {
        flex-direction: column;
    }
    
    .bgg-game-thumbnail {
        width: 100%;
        max-width: 200px;
    }
    
    .bgg-game-title {
        font-size: 1.5rem;
    }
    
    .bgg-review-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bgg-pagination {
        font-size: 0.8125rem;
    }
    
    .bgg-page-link,
    .bgg-page-current {
        min-width: 2rem;
        height: 2rem;
        padding: 0 0.5rem;
    }
}
