/**
 * NewSum Pro - Editorial Review Box & Affiliate Monetization Styles
 * High-converting, wirecutter-grade product review component with dark mode support.
 */

.newsum-review-box {
    margin: 40px 0;
    padding: 32px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    position: relative;
    font-family: inherit;
    color: #1a1a1a;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.newsum-review-box:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.07);
}

/* ── 1. Header & Score ────────────────────────────────────────────── */
.newsum-rb-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.newsum-rb-info {
    flex: 1;
}

.newsum-rb-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-color, #e63946);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 20px;
    margin-bottom: 10px;
}

.newsum-rb-product-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 10px;
    color: inherit;
}

.newsum-rb-price {
    font-size: 16px;
    font-weight: 600;
    color: #555555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.newsum-rb-price .price-val {
    color: var(--accent-color, #e63946);
    font-weight: 800;
}

.newsum-rb-score-card {
    background: linear-gradient(135deg, var(--accent-color, #e63946) 0%, #d62828 100%);
    color: #ffffff;
    padding: 16px 22px;
    border-radius: 12px;
    text-align: center;
    min-width: 110px;
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.25);
    flex-shrink: 0;
}

.newsum-rb-score-num {
    font-size: 38px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
}

.newsum-rb-score-denom {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.85;
    margin-top: 2px;
}

.newsum-rb-score-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ── 2. Breakdown Progress Bars ───────────────────────────────────── */
.newsum-rb-breakdown {
    padding: 24px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.newsum-rb-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #777777;
    margin-bottom: 16px;
}

.newsum-rb-bars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 28px;
}

@media (max-width: 650px) {
    .newsum-rb-bars {
        grid-template-columns: 1fr;
    }
}

.newsum-rb-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.newsum-rb-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
}

.newsum-rb-bar-labels .bar-score {
    color: var(--accent-color, #e63946);
    font-weight: 700;
}

.newsum-rb-progress {
    height: 8px;
    background: #edf0f4;
    border-radius: 4px;
    overflow: hidden;
}

.newsum-rb-progress-fill {
    height: 100%;
    background: var(--accent-color, #e63946);
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 3. Pros and Cons ─────────────────────────────────────────────── */
.newsum-rb-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 650px) {
    .newsum-rb-pros-cons {
        grid-template-columns: 1fr;
    }
}

.newsum-rb-col {
    background: #fbfbfd;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.newsum-rb-col-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
}

.newsum-rb-pros .newsum-rb-col-title {
    color: #2b8a3e;
}

.newsum-rb-cons .newsum-rb-col-title {
    color: #c92a2a;
}

.newsum-rb-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsum-rb-col ul li {
    font-size: 14px;
    line-height: 1.45;
    position: relative;
    padding-left: 20px;
}

.newsum-rb-pros ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #2b8a3e;
    font-weight: 800;
}

.newsum-rb-cons ul li::before {
    content: "✕";
    position: absolute;
    left: 0;
    top: 0;
    color: #c92a2a;
    font-weight: 800;
}

/* ── 4. Verdict / Summary ─────────────────────────────────────────── */
.newsum-rb-verdict {
    padding: 22px 0 20px;
}

.verdict-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #777777;
    margin-bottom: 6px;
}

.verdict-text {
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    color: #222222;
    font-weight: 500;
}

/* ── 5. Action Buttons ────────────────────────────────────────────── */
.newsum-rb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 10px;
}

.newsum-rb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

.newsum-rb-primary-btn {
    background: var(--accent-color, #e63946);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(230, 57, 70, 0.3);
}

.newsum-rb-primary-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(230, 57, 70, 0.4);
}

.newsum-rb-secondary-btn {
    background: #f1f2f6;
    color: #222222 !important;
}

.newsum-rb-secondary-btn:hover {
    background: #e2e4ea;
    transform: translateY(-2px);
}

/* ── 6. FTC Affiliate Disclosure ──────────────────────────────────── */
.newsum-rb-disclosure {
    font-size: 12px;
    color: #888888;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    font-style: italic;
    line-height: 1.4;
}

/* ── 7. Dark Mode Overrides ───────────────────────────────────────── */
body.dark-theme .newsum-review-box,
[data-theme="dark"] .newsum-review-box,
body.dark-mode .newsum-review-box {
    background: #141416;
    border-color: rgba(255, 255, 255, 0.08);
    color: #f1f2f6;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body.dark-theme .newsum-rb-header,
[data-theme="dark"] .newsum-rb-header,
body.dark-mode .newsum-rb-header,
body.dark-theme .newsum-rb-breakdown,
[data-theme="dark"] .newsum-rb-breakdown,
body.dark-mode .newsum-rb-breakdown,
body.dark-theme .newsum-rb-pros-cons,
[data-theme="dark"] .newsum-rb-pros-cons,
body.dark-mode .newsum-rb-pros-cons {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .newsum-rb-price,
[data-theme="dark"] .newsum-rb-price,
body.dark-mode .newsum-rb-price {
    color: #aaaaaa;
}

body.dark-theme .newsum-rb-section-title,
[data-theme="dark"] .newsum-rb-section-title,
body.dark-mode .newsum-rb-section-title,
body.dark-theme .verdict-label,
[data-theme="dark"] .verdict-label,
body.dark-mode .verdict-label {
    color: #888888;
}

body.dark-theme .newsum-rb-progress,
[data-theme="dark"] .newsum-rb-progress,
body.dark-mode .newsum-rb-progress {
    background: #25262b;
}

body.dark-theme .newsum-rb-col,
[data-theme="dark"] .newsum-rb-col,
body.dark-mode .newsum-rb-col {
    background: #1a1b1e;
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .verdict-text,
[data-theme="dark"] .verdict-text,
body.dark-mode .verdict-text {
    color: #e2e4ea;
}

body.dark-theme .newsum-rb-secondary-btn,
[data-theme="dark"] .newsum-rb-secondary-btn,
body.dark-mode .newsum-rb-secondary-btn {
    background: #25262b;
    color: #ffffff !important;
}

body.dark-theme .newsum-rb-disclosure,
[data-theme="dark"] .newsum-rb-disclosure,
body.dark-mode .newsum-rb-disclosure {
    border-top-color: rgba(255, 255, 255, 0.08);
    color: #777777;
}
