/* ========================================================================
   SentimentOwl Community Signals Section  [sowl_community shortcode]
   Dark-theme styles mirroring reddit-frontend.css structure.
   Reuses shared qc-level-* classes for score coloring.
   ======================================================================== */

.sowl-community-section {
    margin-top: 40px;
    margin-bottom: 24px;
}

.sowl-community-header {
    margin-bottom: 20px;
}

.sowl-community-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.sowl-community-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--sowl-text-primary, #e2e8f0);
    margin: 0 0 6px 0;
}

.sowl-community-subtitle {
    font-size: 14px;
    color: var(--sowl-text-secondary, #94a3b8);
    margin: 0;
}

/* Average score badge */
.sowl-community-avg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.sowl-community-avg-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sowl-text-muted, #64748b);
    font-weight: 500;
}

.sowl-community-avg-value {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.sowl-community-avg-value.qc-level-very-high { background: var(--sowl-green, #22c55e); }
.sowl-community-avg-value.qc-level-high      { background: var(--sowl-green-light, #86efac); color: #1a1a1a; }
.sowl-community-avg-value.qc-level-neutral   { background: var(--sowl-yellow, #eab308); color: #1a1a1a; }
.sowl-community-avg-value.qc-level-low       { background: var(--sowl-orange, #f97316); }
.sowl-community-avg-value.qc-level-very-low  { background: var(--sowl-red, #ef4444); }

/* Signal list */
.sowl-community-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sowl-community-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #1e293b;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

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

.sowl-community-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Score pill */
.sowl-community-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    text-align: center;
}

.sowl-community-score.qc-level-very-high { background: var(--sowl-green, #22c55e); }
.sowl-community-score.qc-level-high      { background: var(--sowl-green-light, #86efac); color: #1a1a1a; }
.sowl-community-score.qc-level-neutral   { background: var(--sowl-yellow, #eab308); color: #1a1a1a; }
.sowl-community-score.qc-level-low       { background: var(--sowl-orange, #f97316); }
.sowl-community-score.qc-level-very-low  { background: var(--sowl-red, #ef4444); }

/* Message snippet */
.sowl-community-snippet {
    flex-grow: 1;
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Source + date metadata */
.sowl-community-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
    min-width: 90px;
    text-align: right;
}

.sowl-community-source {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.sowl-community-date {
    color: #475569;
    font-size: 11px;
    white-space: nowrap;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sowl-community-header-row {
        flex-direction: column;
        gap: 12px;
    }

    .sowl-community-avg {
        flex-direction: row;
        gap: 8px;
    }

    .sowl-community-avg-value {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .sowl-community-meta {
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .sowl-community-title {
        font-size: 16px;
    }

    .sowl-community-subtitle {
        font-size: 12px;
    }

    .sowl-community-snippet {
        font-size: 13px;
    }
}
