/* Assembly module — voting.
   Serves two very different screens: the chair's panel, read from across a
   room while the vote runs, and the associate's ballot, read on a phone. */

/* ---- Chair's live panel ---- */

.assembly-voting-live {
    border-left: 3px solid #84c529;
}

.assembly-vote-counter {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    border-radius: 4px;
    background: #f7f7f7;
}

.assembly-vote-number {
    display: block;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
}

.assembly-vote-counter-yes .assembly-vote-number { color: #84c529; }
.assembly-vote-counter-no .assembly-vote-number { color: #fc2d42; }
.assembly-vote-counter-abstain .assembly-vote-number { color: #9e9e9e; }

/* The bar answers "did it reach the bar", so the threshold marker has to stay
   legible over both the filled and the empty part of it. */
.assembly-vote-progress {
    position: relative;
    height: 22px;
    margin-bottom: 0;
    overflow: visible;
}

.assembly-vote-bar {
    background-color: #84c529;
    transition: width 0.4s ease;
}

.assembly-vote-threshold-mark {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background: #33383e;
}

.assembly-vote-threshold-mark::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    border: 4px solid transparent;
    border-top-color: #33383e;
}

.assembly-vote-verdict-reached {
    background-color: #84c529;
}

.assembly-vote-verdict-pending {
    background-color: #9e9e9e;
}

/* ---- Associate's ballot ---- */

.assembly-vote-card {
    border-left: 3px solid #ff9800;
}

.assembly-vote-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Deliberately large: this is tapped once, under time pressure, often on a
   phone held in one hand. */
.assembly-vote-button {
    flex: 1 1 140px;
    min-height: 52px;
    font-size: 16px;
    font-weight: 600;
}

@media (max-width: 480px) {
    .assembly-vote-actions {
        flex-direction: column;
    }

    .assembly-vote-button {
        width: 100%;
    }
}

/* ---- Agenda table ---- */

/* A bylaw amendment is pages long. Four lines is enough to recognise which
   matter this is; the rest is one click away. */
.assembly-matter-description {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}

.assembly-matter-description.assembly-matter-expanded {
    display: block;
    overflow: visible;
}

/* Keeps the agenda column narrow enough that the buttons stay where the eye
   expects them, whatever the length of the text. */
.assembly-matters-table td:first-child {
    max-width: 620px;
}

.assembly-matters-table td:last-child {
    white-space: nowrap;
}

.assembly-matter-status.assembly-matter-draft { background-color: #9e9e9e; }
.assembly-matter-status.assembly-matter-open { background-color: #84c529; }
.assembly-matter-status.assembly-matter-closed { background-color: #33383e; }
