/* Shared sentimiento charts — votos.php + homepage .nr-vote-sentiment */

.v-sent-root {
    --v-sent-card-bg: #ffffff;
    --v-sent-card-border: #e8eaed;
    --v-sent-muted: #5f6368;
    --v-sent-ink: #202124;
    --v-sent-track: #f1f3f4;
}

body.votos-hub.dark-mode .v-sent-root,
body.home-newsroom.dark-mode .nr-vote-sentiment .v-sent-root {
    --v-sent-card-bg: #202124;
    --v-sent-card-border: #3c4043;
    --v-sent-muted: #9aa0a6;
    --v-sent-ink: #e8eaed;
    --v-sent-track: #3c4043;
}

.v-sent-empty,
.v-sent-root .v-empty {
    color: var(--v-sent-muted);
    font-size: 13px;
    padding: 8px 0;
}

/* —— Panorama (spectrum + diverging lollipops) —— */
.v-sent-panorama {
    margin-bottom: 1.25rem;
    padding: 14px 14px 12px;
    border-radius: 16px;
    border: 1px solid var(--v-sent-card-border);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

body.votos-hub.dark-mode .v-sent-panorama,
body.home-newsroom.dark-mode .nr-vote-sentiment .v-sent-panorama {
    background: linear-gradient(180deg, #292a2d 0%, #202124 100%);
}

.v-sent-panorama__title {
    margin: 0 0 10px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--v-sent-muted);
}

.v-sent-panorama__bar {
    display: flex;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(32, 33, 36, 0.08);
    margin-bottom: 14px;
}

.v-sent-panorama__seg {
    flex: 1 1 20%;
    min-width: 0;
}

.v-sent-panorama__cols {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.v-sent-panorama__col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.v-sent-panorama__lbl {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--v-sent-muted);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v-sent-lobby {
    position: relative;
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v-sent-lobby__axis {
    position: absolute;
    left: 50%;
    top: 4px;
    bottom: 4px;
    width: 2px;
    margin-left: -1px;
    background: rgba(95, 99, 104, 0.35);
    border-radius: 1px;
    z-index: 0;
}

.v-sent-lobby__stem {
    position: absolute;
    top: 50%;
    height: 8px;
    margin-top: -4px;
    border-radius: 999px;
    width: var(--mag, 0%);
    opacity: 0.92;
    transform-origin: center center;
    animation: vSentStemIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
    z-index: 1;
}

.v-sent-lobby.is-pos .v-sent-lobby__stem {
    left: 50%;
    border-radius: 0 999px 999px 0;
}

.v-sent-lobby.is-neg .v-sent-lobby__stem {
    right: 50%;
    border-radius: 999px 0 0 999px;
}

.v-sent-lobby__net {
    position: relative;
    z-index: 2;
    font-size: 0.72rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    padding: 3px 7px;
    border-radius: 8px;
    background: var(--v-sent-card-bg);
    border: 1px solid var(--v-sent-card-border);
    box-shadow: 0 2px 8px rgba(32, 33, 36, 0.06);
    animation: vSentStemIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.v-sent-lobby__net.is-up { color: #15803d; }
.v-sent-lobby__net.is-down { color: #b91c1c; }
.v-sent-lobby__net.is-flat { color: var(--v-sent-muted); }

@keyframes vSentStemIn {
    from { opacity: 0; transform: scaleX(0.2); }
    to { opacity: 1; transform: scaleX(1); }
}

/* —— Detail cards —— */
.v-sent-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.v-sent-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px 16px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--v-sent-card-border);
    background: var(--v-sent-card-bg);
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.06);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.v-sent-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(32, 33, 36, 0.08);
}

/* Donut (👍 green / 👎 red) */
.v-sent-donut {
    --up: 50;
    --down: 50;
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: conic-gradient(
        #22c55e 0 calc(var(--up) * 1%),
        #dc2626 calc(var(--up) * 1%) calc((var(--up) + var(--down)) * 1%),
        var(--v-sent-track) calc((var(--up) + var(--down)) * 1%) 100%
    );
    box-shadow: inset 0 0 0 1px rgba(32, 33, 36, 0.06);
}

.v-sent-donut__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}

.v-sent-donut__hole {
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: var(--v-sent-card-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.15;
    box-shadow: 0 0 0 1px var(--v-sent-card-border);
}

.v-sent-donut__hole strong {
    font-size: 0.72rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--v-sent-ink);
}

.v-sent-donut__hole span {
    font-size: 0.48rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--v-sent-muted);
}

.v-sent-body {
    min-width: 0;
}

.v-sent-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.v-sent-name {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--v-sent-ink);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v-sent-pill {
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1.25;
}

/* AllSides-style approval scale */
.v-sent-scale {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.v-sent-scale__cap {
    font-size: 0.85rem;
    line-height: 1;
    opacity: 0.85;
}

.v-sent-scale__track {
    display: flex;
    flex-direction: row;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--v-sent-track);
    box-shadow: inset 0 1px 2px rgba(32, 33, 36, 0.08);
}

.v-sent-scale__down,
.v-sent-scale__up {
    height: 100%;
    min-width: 0;
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.v-sent-scale__down {
    background: linear-gradient(90deg, #f87171, #dc2626);
}

.v-sent-scale__up {
    background: linear-gradient(90deg, #22c55e, #15803d);
}

.v-sent-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 12px;
}

.v-sent-net {
    font-size: 0.85rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.v-sent-net.is-up { color: #15803d; }
.v-sent-net.is-down { color: #b91c1c; }
.v-sent-net.is-flat { color: var(--v-sent-muted); }

.v-sent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 0.72rem;
    font-weight: 650;
    color: var(--v-sent-muted);
    font-variant-numeric: tabular-nums;
}

.v-sent-meta strong {
    color: var(--v-sent-ink);
    font-weight: 800;
}

/* Legends (votos + home) */
.v-legend-row,
.nr-vote-sentiment__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    font-size: 12px;
    color: var(--v-sent-muted, #5f6368);
    margin-top: 16px;
    font-weight: 600;
}

.v-legend-row span,
.nr-vote-sentiment__legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.v-legend-sw {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .v-sent-panorama__cols {
        gap: 4px;
    }

    .v-sent-lobby {
        height: 40px;
    }

    .v-sent-lobby__net {
        font-size: 0.65rem;
        padding: 2px 5px;
    }

    .v-sent-card {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 10px 12px;
        padding: 12px;
    }

    .v-sent-donut {
        width: 60px;
        height: 60px;
    }

    .v-sent-donut__hole {
        inset: 7px;
    }
}
