/* random-reviews/css/style.css */

.rrd-plugin {
    max-width: 1200px;
    margin: 20px auto;
}

/* ── Header ── */
.rrd-plugin .rrd-headline {
    margin-bottom: 2rem;
}

.rrd-plugin .rrd-headline-category {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: #888;
    display: block;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.rrd-plugin .rrd-headline-title {
    font-size: 2.8rem;
    font-weight: 300;
    color: #333;
    line-height: 1.1;
    margin: 0 0 8px;
}

.rrd-plugin .rrd-headline-subtitle p {
    font-size: 1rem;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

/* ── Summary bar ── */
.rrd-plugin .rrd-summary-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f7f7f8;
    border: 1px solid #dedee1;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 2rem;
}

.rrd-plugin .rrd-summary-score {
    font-size: 2.4rem;
    font-weight: 500;
    color: #333;
    line-height: 1;
    white-space: nowrap;
}

.rrd-plugin .rrd-summary-divider {
    width: 1px;
    height: 48px;
    background: #dedee1;
    flex-shrink: 0;
}

.rrd-plugin .rrd-summary-right {
    flex: 1;
}

.rrd-plugin .rrd-summary-label {
    font-size: 13px;
    color: #555;
    margin: 0 0 6px;
}

.rrd-plugin .rrd-summary-count {
    font-size: 12px;
    color: #999;
    margin: 4px 0 0;
}

.rrd-plugin .rrd-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.rrd-plugin .rrd-bar-num {
    font-size: 11px;
    color: #999;
    width: 10px;
    flex-shrink: 0;
}

.rrd-plugin .rrd-bar-track {
    flex: 1;
    height: 5px;
    background: #e8e8ea;
    border-radius: 3px;
    overflow: hidden;
}

.rrd-plugin .rrd-bar-fill {
    height: 100%;
    border-radius: 3px;
}

/* ── Grid ── */
.rrd-plugin .reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.rrd-plugin .reviews-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ── Card ── */
.rrd-plugin .review-card {
    background: white;
    border-radius: 10px;
    padding: 24px;
    border: 1px solid #dedee1;
    position: relative;
    overflow: hidden;
}

/* Coloured top accent border — cycles through 3 colours */
.rrd-plugin .review-card:nth-child(1)::before { background: #1E3F7A; }
.rrd-plugin .review-card:nth-child(2)::before { background: #1D9E75; }
.rrd-plugin .review-card:nth-child(3)::before { background: #D85A30; }
.rrd-plugin .review-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}

.rrd-plugin .reviewer-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.rrd-plugin .avatars {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 1px solid #dedee1;
    margin-right: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.rrd-plugin .reviewer-info {
    flex: 1;
}

.rrd-plugin .reviewer-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.2;
}

.rrd-plugin .date {
    color: #999;
    font-size: 14px;
    margin-top: 4px;
    margin-bottom: 0;
}

.rrd-plugin .quote-icon {
    width: 55px;
    height: 55px;
    position: absolute;
    top: 20px;
    right: 20px;
    opacity: 0.12;
}

.rrd-plugin .rating {
    margin-bottom: 12px;
}

.rrd-plugin .stars {
    color: #ffd700;
    font-size: 16px;
    letter-spacing: 2px;
}

.rrd-plugin .rating-value {
    color: #1E3F7A;
    font-size: 15px;
    font-weight: 700;
    margin-left: 8px;
}

.rrd-plugin .review-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.rrd-plugin .review-text {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.rrd-plugin .review-from {
    color: #888;
    font-style: italic;
    font-size: 14px;
    text-align: center;
    margin-bottom: 4px;
}

/* ── Helpful button ── */
.rrd-plugin .helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EBF0F8;
    border: 1px solid #EBF0F8;
    border-radius: 20px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #1E3F7A;
    margin-top: 12px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.rrd-plugin .helpful-btn:hover {
    border-color: #1E3F7A;
    color: #1E3F7A;
    background: #d6e2f5;
}

.rrd-plugin .helpful-btn.voted {
    border-color: #1E3F7A;
    color: #1E3F7A;
    background: #EBF0F8;
    pointer-events: none;
}

.rrd-plugin .helpful-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* ── Loading overlay ── */
.rrd-plugin .loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.rrd-plugin .loading::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .rrd-plugin .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rrd-plugin {
        padding: 20px 10px;
    }

    .rrd-plugin .rrd-headline-title {
        font-size: 2rem;
    }

    .rrd-plugin .reviews-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .rrd-plugin .review-card {
        padding: 16px;
    }

    .rrd-plugin .quote-icon {
        width: 40px;
        height: 40px;
    }
}
