/**
 * PrimeMeadow Review CSS
 * Comprehensive styles for all review components.
 *
 * @package PrimeMeadow
 */

/* =============================================================================
   STAR RATING COMPONENT
   ============================================================================= */
.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.stars {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    font-size: 1rem;
    line-height: 1;
}

.star {
    color: #d1d5db;
    transition: color 0.15s;
    font-size: 1.125rem;
}

.star-full {
    color: #f59e0b;
}

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

.star-empty {
    color: #d1d5db;
}

.rating-text {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #4b5563;
    white-space: nowrap;
}

/* Size Variants */
.star-rating-sm .stars { font-size: 0.875rem; }
.star-rating-sm .star { font-size: 0.9rem; }
.star-rating-lg .stars { font-size: 1.375rem; }
.star-rating-lg .star { font-size: 1.5rem; }
.star-rating-xl .stars { font-size: 1.75rem; }
.star-rating-xl .star { font-size: 2rem; }

/* Rating Color Classes */
.rating-excellent .star-full,
.rating-excellent .star-half { color: #10b981; }

.rating-good .star-full,
.rating-good .star-half { color: #3b82f6; }

.rating-average .star-full,
.rating-average .star-half { color: #f59e0b; }

.rating-poor .star-full,
.rating-poor .star-half { color: #ef4444; }

/* =============================================================================
   REVIEW CARD (in listings)
   ============================================================================= */
.post-card-review {
    position: relative;
}

/* Rating Badge on Card Thumbnail */
.review-card-score {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: baseline;
    gap: 2px;
    padding: 0.25rem 0.625rem;
    border-radius: 8px;
    background: #10b981;
    color: #fff;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 2;
}

.review-card-score.rating-excellent { background: #10b981; }
.review-card-score.rating-good { background: #3b82f6; }
.review-card-score.rating-average { background: #f59e0b; }
.review-card-score.rating-poor { background: #ef4444; }

.score-number {
    font-size: 1.25rem;
    font-weight: 900;
}

.score-scale {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.85;
}

/* Review Card Body Extra Elements */
.review-card-product-name {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6b7280;
    margin: 0 0 0.375rem;
}

.review-card-stars {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.rating-label {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.625rem;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #4b5563;
}

.rating-excellent .rating-label { background: #d1fae5; color: #065f46; }
.rating-good .rating-label { background: #dbeafe; color: #1e40af; }
.rating-average .rating-label { background: #fef3c7; color: #92400e; }
.rating-poor .rating-label { background: #fee2e2; color: #991b1b; }

.review-card-price {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.price-label {
    color: #6b7280;
    font-size: 0.8rem;
}

.price-value {
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
}

/* Pros Preview in Card */
.review-card-pros-preview {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pro-item {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #374151;
    line-height: 1.4;
}

.pro-icon,
.pro-check {
    color: #10b981;
    font-size: 0.875rem;
    flex-shrink: 0;
    line-height: 1.4;
    font-weight: 700;
}

.pros-more {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
}

/* =============================================================================
   REVIEW SUMMARY BOX (single post)
   ============================================================================= */
.review-summary-box {
    background: #fff;
    border-radius: 16px;
    border: 2px solid var(--review-box-accent, #2563eb);
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(37,99,235,0.1);
}

/* Summary Header */
.review-summary-header {
    background: var(--review-box-accent, #2563eb);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.review-summary-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 0;
}

.review-summary-header .award-badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Summary Top Section */
.review-summary-top {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0;
}

.review-summary-image {
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-right: 1px solid #e5e7eb;
}

.review-summary-image img {
    max-width: 160px;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

.review-summary-details {
    padding: 1.5rem;
}

.review-product-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 1rem;
    line-height: 1.3;
}

/* Score Circle Display */
.review-score-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: #f9fafb;
}

.score-circle {
    display: flex;
    align-items: baseline;
    gap: 3px;
    background: #fff;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-shrink: 0;
    min-width: 80px;
    justify-content: center;
}

.review-score-display.rating-excellent .score-circle { border-top: 4px solid #10b981; }
.review-score-display.rating-good .score-circle { border-top: 4px solid #3b82f6; }
.review-score-display.rating-average .score-circle { border-top: 4px solid #f59e0b; }
.review-score-display.rating-poor .score-circle { border-top: 4px solid #ef4444; }

.score-circle .score-number {
    font-size: 2rem;
    font-weight: 900;
    color: #111827;
    line-height: 1;
}

.score-circle .score-scale {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
}

.score-info {
    flex: 1;
}

.score-label {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.rating-excellent .score-label { color: #065f46; }
.rating-good .score-label { color: #1e40af; }
.rating-average .score-label { color: #92400e; }
.rating-poor .score-label { color: #991b1b; }

/* Quick Specs */
.review-quick-specs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
}

.spec-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    padding: 0.375rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.spec-row:last-child { border-bottom: none; }

.spec-label {
    font-weight: 600;
    color: #6b7280;
    min-width: 100px;
    flex-shrink: 0;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.spec-value {
    color: #1f2937;
}

.spec-value .price-value {
    font-size: 1rem;
    font-weight: 700;
}

/* =============================================================================
   SCORE BREAKDOWN BARS
   ============================================================================= */
.review-score-breakdown {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

.breakdown-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #374151;
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.breakdown-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-bar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.breakdown-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    min-width: 130px;
    flex-shrink: 0;
}

.breakdown-bar-wrap {
    flex: 1;
    height: 10px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.breakdown-bar {
    height: 100%;
    border-radius: 9999px;
    background: #3b82f6;
    transition: width 0.8s ease;
    min-width: 4px;
}

.breakdown-bar.rating-excellent { background: #10b981; }
.breakdown-bar.rating-good { background: #3b82f6; }
.breakdown-bar.rating-average { background: #f59e0b; }
.breakdown-bar.rating-poor { background: #ef4444; }

.breakdown-score {
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    min-width: 28px;
    text-align: right;
}

/* =============================================================================
   PROS AND CONS
   ============================================================================= */
.review-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid #e5e7eb;
}

.review-pros {
    padding: 1.5rem;
    border-right: 1px solid #e5e7eb;
}

.review-cons {
    padding: 1.5rem;
}

.pros-title,
.cons-title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0 0 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pros-title { color: #065f46; }
.cons-title { color: #991b1b; }

.pros-icon { color: #10b981; font-size: 1rem; }
.cons-icon { color: #ef4444; font-size: 1rem; }

.pros-list,
.cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pro-item,
.con-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
}

.pro-check {
    color: #10b981;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.con-x {
    color: #ef4444;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* =============================================================================
   VERDICT BOX
   ============================================================================= */
.review-verdict-box {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
}

.verdict-title {
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.verdict-text {
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.7;
    margin: 0;
    font-style: italic;
}

/* =============================================================================
   COMMUNITY RATING WIDGET
   ============================================================================= */
.community-rating-widget {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.community-rating-title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0 0 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #374151;
}

.community-rating-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.community-count {
    font-size: 0.8rem;
    color: #6b7280;
}

.community-rating-input p {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.rating-stars-input {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.rating-star-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.375rem;
    color: #d1d5db;
    transition: color 0.15s, transform 0.1s;
    padding: 0;
    line-height: 1;
}

.rating-star-btn:hover,
.rating-star-btn.hovered,
.rating-star-btn.selected {
    color: #f59e0b;
    transform: scale(1.15);
}

.rating-feedback {
    font-size: 0.8125rem;
    color: #10b981;
    margin-top: 0.5rem;
    min-height: 1.4em;
    font-weight: 600;
}

/* =============================================================================
   CHECK PRICE CTA SECTION
   ============================================================================= */
.review-cta-section {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    background: linear-gradient(to bottom, #fff, #f9fafb);
}

.review-check-price-btn {
    font-size: 1.0625rem;
    font-weight: 800;
    padding: 1rem 2.5rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(245,158,11,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.review-check-price-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,158,11,0.5);
}

.btn-arrow {
    margin-left: 0.375rem;
}

.affiliate-disclosure {
    margin: 0.625rem 0 0;
    color: #9ca3af;
    font-size: 0.75rem;
}

/* =============================================================================
   REVIEW POST - META (on single post header)
   ============================================================================= */
.post-rating {
    display: inline-flex;
    align-items: center;
}

.post-rating .star-rating {
    font-size: 0.875rem;
}

/* =============================================================================
   REVIEW CARD - LISTING VARIANT (review-card-thumbnail)
   ============================================================================= */
.review-card-thumbnail {
    position: relative;
}

/* =============================================================================
   AWARD BADGE RIBBON STYLES
   ============================================================================= */
.award-badge-editors-choice { background: #7c3aed; }
.award-badge-best-value { background: #10b981; }
.award-badge-best-overall { background: #f59e0b; }
.award-badge-budget-pick { background: #3b82f6; }
.award-badge-premium-pick { background: #6d28d9; }
.award-badge-top-rated { background: #ef4444; }
.award-badge-staff-pick { background: #0891b2; }
.award-badge-hot-deal { background: #dc2626; }

/* Award badge in overlay (on thumbnail) - ribbon style */
.award-badge-overlay .award-badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
}

/* =============================================================================
   COMPARISON TABLE
   ============================================================================= */
.comparison-table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: #fff;
}

.comparison-table th {
    background: #2563eb;
    color: #fff;
    padding: 1rem;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.comparison-table th:first-child {
    background: #1e40af;
}

.comparison-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.comparison-table tr:last-child td { border-bottom: none; }

.comparison-table tr:nth-child(even) td {
    background: #f9fafb;
}

.comparison-table .best-pick {
    background: #fffbeb;
}

.comparison-table .best-pick td {
    background: #fffbeb;
}

.comparison-table .check { color: #10b981; font-weight: 700; }
.comparison-table .cross { color: #ef4444; font-weight: 700; }

/* =============================================================================
   RESPONSIVE REVIEW STYLES
   ============================================================================= */
@media (max-width: 768px) {
    .review-summary-top {
        grid-template-columns: 1fr;
    }

    .review-summary-image {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 1.25rem;
    }

    .review-summary-image img {
        max-width: 120px;
    }

    .review-pros-cons {
        grid-template-columns: 1fr;
    }

    .review-pros {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .breakdown-label {
        min-width: 100px;
        font-size: 0.75rem;
    }

    .review-score-display {
        flex-direction: column;
        text-align: center;
    }

    .stars { font-size: 0.875rem; }
    .star { font-size: 0.9rem; }

    .spec-label {
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .review-check-price-btn {
        width: 100%;
        justify-content: center;
    }

    .breakdown-bar-row {
        flex-wrap: wrap;
    }

    .breakdown-label {
        width: 100%;
        min-width: unset;
    }

    .rating-stars-input {
        gap: 0.125rem;
    }

    .rating-star-btn {
        width: 30px;
        height: 30px;
        font-size: 1.25rem;
    }
}
