/* ====================================
   Tab 5: Reviews CSS
   Updated: November 18, 2025
   Version: 1.0
   ==================================== */

/* ====================================
   Tab Content Wrapper
   ==================================== */
.tab-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tab-section {
    margin-bottom: 2rem;
}

.tab-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2rem;
}

.section-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
}

/* ====================================
   Our Take Section
   ==================================== */
.our-take-section {
    background: linear-gradient(135deg, var(--htt-accent) 0%, var(--htt-accent) 100%);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
}

.our-take-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.our-take-text {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.95);
}

.read-full-review-link {
    display: inline-flex;
    align-items: center;
    color: white;
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    transition: background 0.2s ease;
}

.read-full-review-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ====================================
   Aggregate Rating Section
   ==================================== */
.aggregate-rating-section {
    text-align: center;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.rating-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

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

.rating-stars .star {
    font-size: 1.5rem;
}

/* #263 step 11d: "half" rendered the identical ⭐ glyph as "filled" — no
   rule distinguished them, so a 4.7 rating showed five full stars instead
   of four and a half. visibility (not color/opacity) hides the span's own
   ⭐ text node, because a child can opt back in to visible even though an
   ancestor is hidden — the two replacement glyphs below then keep their
   natural glyph colour instead of depending on a `color`/currentColor
   value inherited from a hidden parent. An empty star (☆) underneath, with
   a filled one (⭐) clipped to its left half on top, reads as a half star. */
.rating-stars .star.half {
    position: relative;
    visibility: hidden;
}

.rating-stars .star.half::before,
.rating-stars .star.half::after {
    visibility: visible;
    position: absolute;
    inset: 0;
}

.rating-stars .star.half::before {
    content: '☆';
}

.rating-stars .star.half::after {
    content: '⭐';
    width: 50%;
    overflow: hidden;
}

/* #263 step 11b: the standalone "Read our full review" link (reviews tab,
   outside .our-take-section) used to share .read-full-review-link, styled
   white-on-transparent for that section's purple gradient — invisible
   against the plain tab background, but still taking up its box and
   margin ("empty gap"). .read-full-review-link itself is untouched, so
   its still-working use inside .our-take-section is unaffected. */
.review-page-link {
    display: inline-flex;
    align-items: center;
    color: var(--htt-accent);
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--htt-accent);
    border-radius: 0.5rem;
    transition: background 0.2s ease;
}

.review-page-link:hover {
    background: var(--htt-accent-soft);
}

.rating-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--htt-accent);
}

.rating-source {
    font-size: 0.875rem;
    color: #6b7280;
}

/* ====================================
   Critic Reviews Grid
   ==================================== */
.critic-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 767px) {
    .critic-reviews-grid {
        grid-template-columns: 1fr;
    }
}

.critic-review-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.critic-review-card:hover {
    border-color: var(--htt-accent);
    box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.1);
    transform: translateY(-2px);
}

.review-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #374151;
    font-style: italic;
    margin: 0;
}

.quote-mark {
    color: var(--htt-accent);
    font-size: 1.5rem;
    font-weight: 700;
}

.review-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.publication-name {
    font-weight: 700;
    color: #111827;
    font-size: 0.95rem;
}

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

.read-full-link {
    display: inline-flex;
    align-items: center;
    color: var(--htt-accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.read-full-link:hover {
    color: var(--htt-accent-hover);
}

.read-full-link .arrow {
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

.read-full-link:hover .arrow {
    transform: translateX(3px);
}

/* ====================================
   Critic Ratings Grid (#353 item 3) -- outlet + stars, no quote
   ==================================== */
.critic-ratings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

@media (max-width: 767px) {
    .critic-ratings-grid {
        grid-template-columns: 1fr;
    }
}

.critic-rating-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.critic-rating-card .rating-stars .star {
    font-size: 1rem;
}

.critic-rating-card .rating-number {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--htt-accent);
    margin-left: 0.25rem;
}

.critic-rating-card .review-meta {
    border-top: none;
    padding-top: 0;
    flex-direction: row;
    gap: 0.5rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.critic-name {
    font-size: 0.875rem;
    color: #6b7280;
}

.review-context {
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
    margin: 0;
}

/* ====================================
   Audience Reviews Grid
   ==================================== */
.audience-reviews-section {
    margin-bottom: 2rem;
}

.audience-note {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.audience-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 767px) {
    .audience-reviews-grid {
        grid-template-columns: 1fr;
    }
}

.audience-review-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.audience-review-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.review-rating {
    margin-bottom: 0.75rem;
}

.review-rating .star {
    font-size: 1.125rem;
    margin-right: 0.125rem;
}

.review-comment {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 1rem;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.author-name {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #10b981;
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.verified-icon {
    width: 14px;
    height: 14px;
}

/* ====================================
   Empty State
   ==================================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    margin-top: 2rem;
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    color: #9ca3af;
    margin: 0 auto 1rem;
}

.empty-state p {
    margin-bottom: 0.5rem;
}

/* ====================================
   Mobile Responsive Design
   ==================================== */
@media (max-width: 767px) {
    .tab-content-wrapper {
        padding: 1rem;
    }
    
    .tab-section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1.25rem;
    }
    
    .our-take-section {
        padding: 1.5rem;
    }
    
    .our-take-text {
        font-size: 1rem;
    }
    
    .rating-number {
        font-size: 2rem;
    }
    
    .critic-review-card,
    .audience-review-card {
        padding: 1rem;
    }
}

/* ====================================
   Print Styles
   ==================================== */
@media print {
    .critic-review-card,
    .audience-review-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .read-full-link,
    .read-full-review-link {
        color: var(--htt-accent);
        text-decoration: underline;
    }
}

