/* =========================================================
   C — EXPANDED VOTE SHARE STUDY

   Shared expanded-panel sizing / scrolling stays in the
   panel shell. This file only handles C's internal study.
   ========================================================= */


/* =========================================================
   Expanded Visibility
   ========================================================= */

.vote-share-study {
    display: none;
}


.dashboard-panel--vote-share.dashboard-panel--expanded
.vote-share-chart {
    display: none !important;
}


.dashboard-panel--vote-share.dashboard-panel--expanded
.vote-share-study {
    display: flex !important;
    flex-direction: column;

    width: 100%;
    min-width: 0;
}


.dashboard-panel--vote-share.dashboard-panel--expanded
.dashboard-panel__body--vote-share {
    display: flex;
    flex-direction: column;

    min-width: 0;
}


/* =========================================================
   Scope
   ========================================================= */

.vote-share-study__scope {
    margin-bottom: 0.7rem;

    padding: 0.7rem;

    background: var(
        --dashboard-background,
        #f7f9fb
    );

    border: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );

    border-radius: 0.55rem;
}


.vote-share-study__scope-head,
.vote-share-study__intro,
.vote-share-study__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 0.75rem;
}


.vote-share-study__scope-head {
    margin-bottom: 0.55rem;
}


.vote-share-study__scope-head > div,
.vote-share-study__section-head > div {
    display: grid;

    gap: 0.08rem;
}


.vote-share-study__scope-head strong,
.vote-share-study__intro h3,
.vote-share-study__section-head strong {
    color: var(
        --dashboard-text,
        #344054
    );
}


.vote-share-study__scope-head strong {
    font-size: 0.56rem;
}


.vote-share-study__scope-head span,
.vote-share-study__scope-context,
.vote-share-study__section-head span {
    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.42rem;
}


.vote-share-study__scope-context {
    font-weight: 750;

    white-space: nowrap;
}


.vote-share-study__scope-controls {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;

    gap: 0.6rem;
}


.vote-share-study__scope-group {
    display: grid;

    gap: 0.26rem;
}


.vote-share-study__scope-label {
    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.42rem;
    font-weight: 750;
}


.vote-share-study__segmented {
    display: inline-flex;

    min-height: 34px;

    padding: 2px;

    background: var(
        --dashboard-surface,
        #ffffff
    );

    border: 1px solid
        var(
            --dashboard-border,
            #dfe5ec
        );

    border-radius: 0.4rem;
}


.vote-share-study__scope-button {
    min-width: 70px;

    padding:
        0
        0.52rem;

    color: var(
        --dashboard-text-muted,
        #667085
    );

    background: transparent;

    border: 0;
    border-radius: 0.3rem;

    cursor: pointer;

    font: inherit;
    font-size: 0.47rem;
    font-weight: 750;
}


.vote-share-study__scope-button:hover,
.vote-share-study__scope-button.is-active {
    background: var(
        --dashboard-background,
        #edf1f5
    );
}


.vote-share-study__scope-button.is-active {
    color: var(
        --dashboard-text,
        #344054
    );
}


.vote-share-study__scope-select,
.vote-share-study__scope-readonly {
    min-width: 105px;
    height: 34px;

    padding:
        0
        0.55rem;

    color: var(
        --dashboard-text,
        #344054
    );

    background: var(
        --dashboard-surface,
        #ffffff
    );

    border: 1px solid
        var(
            --dashboard-border,
            #dfe5ec
        );

    border-radius: 0.4rem;

    font: inherit;
    font-size: 0.5rem;
    font-weight: 700;
}


.vote-share-study__scope-readonly {
    display: flex;
    align-items: center;
}


.vote-share-study__scope-compare {
    display: flex;
    align-items: flex-end;

    gap: 0.4rem;
}


.vote-share-study__scope-vs {
    display: flex;
    align-items: center;

    height: 34px;

    color: var(
        --dashboard-text-soft,
        #98a2b3
    );

    font-size: 0.43rem;
    font-weight: 800;
}


/* =========================================================
   Intro
   ========================================================= */

.vote-share-study__intro {
    margin-bottom: 0.55rem;
}


.vote-share-study__eyebrow {
    color: var(
        --dashboard-text-soft,
        #98a2b3
    );

    font-size: 0.42rem;
    font-weight: 750;

    letter-spacing: 0.04em;

    text-transform: uppercase;
}


.vote-share-study__intro h3 {
    margin:
        0.08rem
        0
        0;

    font-size: 0.72rem;
    font-weight: 850;
}


.vote-share-study__period {
    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.52rem;
    font-weight: 800;
}


/* =========================================================
   Summary
   ========================================================= */

.vote-share-study__summary {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(
                0,
                1fr
            )
        );

    gap: 0.45rem;

    margin-bottom: 0.65rem;
}


.vote-share-study__summary-card {
    display: grid;

    gap: 0.12rem;

    min-width: 0;

    padding:
        0.5rem
        0.58rem;

    background: var(
        --dashboard-surface,
        #ffffff
    );

    border: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );

    border-radius: 0.46rem;
}


.vote-share-study__summary-card span {
    overflow: hidden;

    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.4rem;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.vote-share-study__summary-card strong {
    color: var(
        --dashboard-text,
        #344054
    );

    font-size: 0.62rem;
    font-weight: 850;
}


.vote-share-study__summary-card small {
    color: var(
        --dashboard-text-soft,
        #98a2b3
    );

    font-size: 0.38rem;
}


.vote-share-study__text--jlp {
    color: #16875d !important;

    font-weight: 800;
}


.vote-share-study__text--pnp {
    color: #f47a23 !important;

    font-weight: 800;
}


/* =========================================================
   Composition Card
   ========================================================= */

.vote-share-study__composition-card {
    overflow: hidden;

    background: var(
        --dashboard-surface,
        #ffffff
    );

    border: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );

    border-radius: 0.5rem;
}


.vote-share-study__section-head {
    padding:
        0.5rem
        0.6rem;

    background: var(
        --dashboard-background,
        #f7f9fb
    );

    border-bottom: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );
}


.vote-share-study__section-head strong {
    font-size: 0.52rem;
}


.vote-share-study__section-head > div > span,
.vote-share-study__section-head > span {
    font-size: 0.4rem;
}


.vote-share-study__composition-list {
    display: grid;

    gap: 0.7rem;

    padding: 0.7rem;
}


/* =========================================================
   Composition Rows
   ========================================================= */

.vote-share-study__composition-row {
    display: grid;

    gap: 0.35rem;
}


.vote-share-study__composition-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;

    gap: 0.5rem;
}


.vote-share-study__composition-head strong {
    color: var(
        --dashboard-text,
        #344054
    );

    font-size: 0.48rem;
}


.vote-share-study__composition-head span {
    color: var(
        --dashboard-text-soft,
        #98a2b3
    );

    font-size: 0.38rem;
}


.vote-share-study__composition-bar {
    display: flex;

    width: 100%;
    height: 18px;

    overflow: hidden;

    background: var(
        --dashboard-background,
        #eef2f6
    );

    border-radius: 999px;
}


.vote-share-study__composition-segment {
    height: 100%;
}


.vote-share-study__composition-segment--jlp {
    background: #16875d;
}


.vote-share-study__composition-segment--pnp {
    background: #f47a23;
}


.vote-share-study__composition-segment--other {
    background: #9aa6b6;
}


.vote-share-study__composition-values {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 0.65rem;
}


.vote-share-study__party-value {
    display: inline-flex;
    align-items: baseline;

    gap: 0.2rem;

    color: var(
        --dashboard-text-muted,
        #667085
    );

    font-size: 0.39rem;
    font-weight: 700;
}


.vote-share-study__party-value strong {
    font-size: 0.46rem;
}


.vote-share-study__party-value--jlp strong {
    color: #16875d;
}


.vote-share-study__party-value--pnp strong {
    color: #f47a23;
}


.vote-share-study__party-value--other strong {
    color: var(
        --dashboard-text,
        #344054
    );
}


/* =========================================================
   Accordion
   ========================================================= */

.vote-share-study__accordion {
    margin-top: 0.8rem;

    overflow: hidden;

    border: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );

    border-radius: 0.5rem;
}


.vote-share-study__accordion-button {
    display: grid;

    grid-template-columns:
        18px
        auto
        1fr;

    align-items: center;

    gap: 0.4rem;

    width: 100%;

    padding:
        0.62rem
        0.7rem;

    color: var(
        --dashboard-text,
        #344054
    );

    background: var(
        --dashboard-background,
        #f7f9fb
    );

    border: 0;

    cursor: pointer;

    font: inherit;

    text-align: left;
}


.vote-share-study__accordion-button strong {
    font-size: 0.51rem;
}


.vote-share-study__accordion-note {
    justify-self: end;

    color: var(
        --dashboard-text-soft,
        #98a2b3
    );

    font-size: 0.4rem;
}


.vote-share-study__accordion-arrow {
    display: inline-block;

    transition:
        transform
        120ms
        ease;
}


.vote-share-study__accordion.is-open
.vote-share-study__accordion-arrow {
    transform:
        rotate(
            90deg
        );
}


.vote-share-study__accordion-content {
    min-width: 0;

    background: var(
        --dashboard-surface,
        #ffffff
    );
}


/* =========================================================
   Tables
   ========================================================= */

.vote-share-study__table-wrap {
    width: 100%;

    overflow-x: auto;
}


.vote-share-study__table {
    width: 100%;

    min-width: 720px;

    border-collapse: collapse;

    color: var(
        --dashboard-text,
        #344054
    );

    font-size: 0.47rem;
}


.vote-share-study__table--compare {
    min-width: 1120px;
}


.vote-share-study__table th,
.vote-share-study__table td {
    padding:
        0.52rem
        0.58rem;

    border-bottom: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );

    text-align: right;

    white-space: nowrap;
}


.vote-share-study__table th:first-child,
.vote-share-study__table td:first-child {
    text-align: left;
}


.vote-share-study__table thead th {
    color: var(
        --dashboard-text-muted,
        #667085
    );

    background: var(
        --dashboard-background,
        #f7f9fb
    );

    font-size: 0.4rem;
    font-weight: 750;
}


.vote-share-study__table tbody tr:last-child td {
    border-bottom: 0;
}


.vote-share-study__table tbody tr:hover {
    background: var(
        --dashboard-background,
        #f8fafc
    );
}


.vote-share-study__year-head {
    color: var(
        --dashboard-text,
        #344054
    ) !important;

    text-align: center !important;

    border-left: 1px solid
        var(
            --dashboard-border,
            #e5e9ef
        );
}


/* =========================================================
   Winner Chips
   ========================================================= */

.vote-share-study__winner {
    display: inline-flex;

    padding:
        0.13rem
        0.28rem;

    border-radius: 0.28rem;

    font-size: 0.37rem;
    font-weight: 800;
}


.vote-share-study__winner--jlp {
    color: #14704c;

    background: #dff3e9;
}


.vote-share-study__winner--pnp {
    color: #b55719;

    background: #fff0e5;
}


.vote-share-study__winner--other {
    color: #667085;

    background: #eef1f5;
}


/* =========================================================
   Definition / Mock Note
   ========================================================= */

.vote-share-study__definition {
    margin-top: 0.6rem;

    padding:
        0.48rem
        0.58rem;

    color: var(
        --dashboard-text-muted,
        #667085
    );

    background: var(
        --dashboard-background,
        #f7f9fb
    );

    border-radius: 0.42rem;

    font-size: 0.4rem;
    line-height: 1.45;
}


.vote-share-study__mock-note {
    margin-top: 0.3rem;

    color: var(
        --dashboard-text-soft,
        #8a95a6
    );

    font-size: 0.39rem;
    line-height: 1.45;
}


/* =========================================================
   Dark Mode
   ========================================================= */

[data-theme="dark"]
.vote-share-study__scope,

[data-theme="dark"]
.vote-share-study__section-head,

[data-theme="dark"]
.vote-share-study__accordion-button,

[data-theme="dark"]
.vote-share-study__definition {
    background: #111927;

    border-color: #2d394c;
}


[data-theme="dark"]
.vote-share-study__scope-head strong,

[data-theme="dark"]
.vote-share-study__intro h3,

[data-theme="dark"]
.vote-share-study__summary-card strong,

[data-theme="dark"]
.vote-share-study__section-head strong,

[data-theme="dark"]
.vote-share-study__composition-head strong,

[data-theme="dark"]
.vote-share-study__party-value--other strong {
    color: #f4f7fb;
}


[data-theme="dark"]
.vote-share-study__segmented,

[data-theme="dark"]
.vote-share-study__scope-select,

[data-theme="dark"]
.vote-share-study__scope-readonly {
    color: #f4f7fb;

    background: #172033;

    border-color: #344054;
}


[data-theme="dark"]
.vote-share-study__scope-button {
    color: #aab4c3;
}


[data-theme="dark"]
.vote-share-study__scope-button.is-active {
    color: #f4f7fb;

    background: #253146;
}


[data-theme="dark"]
.vote-share-study__summary-card,

[data-theme="dark"]
.vote-share-study__composition-card,

[data-theme="dark"]
.vote-share-study__accordion,

[data-theme="dark"]
.vote-share-study__accordion-content {
    background: #172033;

    border-color: #2d394c;
}


[data-theme="dark"]
.vote-share-study__composition-bar {
    background: #253146;
}


[data-theme="dark"]
.vote-share-study__table {
    color: #dce3ec;

    background: #172033;
}


[data-theme="dark"]
.vote-share-study__table th,

[data-theme="dark"]
.vote-share-study__table td {
    border-color: #2d394c;
}


[data-theme="dark"]
.vote-share-study__table thead th {
    color: #aab4c3;

    background: #111927;
}


[data-theme="dark"]
.vote-share-study__year-head {
    color: #f4f7fb !important;

    border-left-color: #344054;
}


[data-theme="dark"]
.vote-share-study__table tbody tr:hover {
    background: #111927;
}


[data-theme="dark"]
.vote-share-study__winner--jlp {
    color: #72d5ab;

    background: #183c31;
}


[data-theme="dark"]
.vote-share-study__winner--pnp {
    color: #f1ad7d;

    background: #4a2e1d;
}


[data-theme="dark"]
.vote-share-study__winner--other {
    color: #aab4c3;

    background: #253146;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1000px) {

    .vote-share-study__summary {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );
    }

}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 700px) {

    .vote-share-study__scope-head,

    .vote-share-study__intro,

    .vote-share-study__composition-head {
        align-items: flex-start;
        flex-direction: column;
    }


    .vote-share-study__scope-controls,

    .vote-share-study__scope-compare {
        align-items: stretch;
        flex-direction: column;
    }


    .vote-share-study__segmented,

    .vote-share-study__scope-select,

    .vote-share-study__scope-readonly {
        width: 100%;
    }


    .vote-share-study__scope-button {
        flex: 1;
    }


    .vote-share-study__scope-vs {
        height: auto;
    }


    .vote-share-study__summary {
        grid-template-columns: 1fr;
    }


    .vote-share-study__accordion-button {
        grid-template-columns:
            18px
            1fr;
    }


    .vote-share-study__accordion-note {
        display: none;
    }

}

.vote-share-study__drill {
    padding: 0;

    border: 0;

    background: transparent;

    color: inherit;

    font: inherit;

    font-weight: 700;

    cursor: pointer;
}


.vote-share-study__drill:hover {
    text-decoration: underline;
}