/* "Who should we support?" — informal vote on /registered. rem base is 10px. */

.vote {
    /* min(...,92vw), not width:100%+max-width — this sits directly in
       main.thanks (not inside a .section with its own side padding), so it
       needs its own gutter or the grid runs edge-to-edge on narrow screens. */
    width: min(108rem, 92vw);
    margin: clamp(5rem, 8vw, 7rem) auto 0;
    padding-top: clamp(4rem, 6vw, 5rem);
    border-top: 1px solid var(--rule, #e6e3dd);
    text-align: left;
}

.vote__kicker {
    margin: 0 0 1rem;
    font-family: var(--display-font);
    font-weight: 500;
    font-size: 1.4rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.vote__title {
    margin: 0 0 1.6rem;
    font-family: var(--display-font);
    font-weight: 500;
    font-size: clamp(2.6rem, 3.6vw, 3.6rem);
    color: var(--color-black);
}

.vote__intro {
    margin: 0 0 3rem;
    max-width: 76ch;
    font-size: 1.65rem;
    line-height: 1.65;
    color: var(--color-grey-dark-1);
}

.vote__locked-note {
    margin: -1.5rem 0 2rem;
    padding: 1.4rem 1.6rem;
    max-width: 76ch;
    background: var(--color-grey-light-2, #f4f2ee);
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--color-grey-dark-1);
}

.vote__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.vote-tile__btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.7rem 1.8rem;
    background: var(--color-white);
    border: 1px solid var(--color-grey-light-3);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.vote-tile__btn:hover:not(:disabled),
.vote-tile__btn:focus-visible:not(:disabled) {
    /* Override the global button:hover dark-red background — these tiles
       keep their own text colours (grey/black), which reads badly on it. */
    background: var(--color-white);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    outline: none;
}

.vote-tile__btn:disabled {
    cursor: default;
    opacity: 0.7;
}

.vote-tile--picked .vote-tile__btn {
    border: 2px solid var(--color-accent);
    background: rgba(237, 29, 39, 0.05);
}

.vote-tile__name {
    font-family: var(--display-font);
    font-weight: 500;
    font-size: 1.5rem;
    line-height: 1.3;
    color: var(--color-black);
}

.vote-tile--picked .vote-tile__name::after {
    content: " \2713";
    color: var(--color-accent);
    font-weight: 700;
}

.vote-tile__bar {
    display: block;
    width: 100%;
    height: 0.6rem;
    background: var(--color-grey-light-3);
    overflow: hidden;
}

.vote-tile__fill {
    display: block;
    height: 100%;
    width: 0;
    background: var(--color-accent);
    transition: width 0.5s ease;
}

.vote-tile__pct {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-grey-dark-2);
}

.vote__total {
    margin: 2rem 0 0;
    font-size: 1.4rem;
    color: var(--color-grey-dark-2);
}

.vote__nominate {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--color-grey-light-3);
}

.vote__nominate-title {
    margin: 0 0 1.2rem;
    font-family: var(--display-font);
    font-weight: 500;
    font-size: 1.8rem;
    color: var(--color-black);
}

.vote__nominate-label {
    display: block;
    margin-bottom: 1rem;
    font-size: 1.35rem;
    color: var(--color-grey-dark-1);
}

.vote__nominate-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.vote__nominate-row input[type="text"]:not(.vote__hp) {
    flex: 1 1 24rem;
    padding: 1.1rem 1.4rem;
    border: 1px solid var(--color-grey-light-3);
    font-size: 1.5rem;
    font-family: inherit;
    color: var(--color-black);
}

.vote__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.vote__nominate-btn {
    padding: 1.1rem 2.2rem;
    background: var(--color-black);
    color: #fff;
    border: none;
    font-family: var(--body-font);
    font-weight: 600;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.18s ease;
}

.vote__nominate-btn:hover,
.vote__nominate-btn:focus-visible {
    background: var(--color-accent);
}

.vote__nominate-note {
    margin: 1.2rem 0 0;
    font-size: 1.4rem;
    color: var(--color-grey-dark-1);
}

@media (max-width: 60rem) {
    .vote__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 40rem) {
    .vote__grid {
        grid-template-columns: 1fr;
    }

    .vote__nominate-row {
        flex-direction: column;
        align-items: stretch;
    }

    /* flex: 1 1 24rem above sizes width in the row layout above this
       breakpoint; in column layout that same basis sizes height instead,
       stretching the input tall. Reset it so it just sizes to content. */
    .vote__nominate-row input[type="text"]:not(.vote__hp) {
        flex: none;
    }
}
