/* Planera → Röster: kortet för en omröstning, arkivet och formuläret (PollCard, PollOptionRow, NewPollView). */

.polls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poll-grid {
    --grid-gap: 12px;
}

.poll-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poll-card {
    padding-top: 16px;
    padding-bottom: 16px;
    -webkit-touch-callout: none;
}

.poll-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.poll-head h3 {
    flex: 1;
    font: var(--headline);
    overflow-wrap: anywhere;
}

.poll-head .more {
    margin: -5px -6px -5px 0;
}

@media (hover: hover) {
    .poll-card .more {
        opacity: 0;
        transition: opacity 0.12s;
    }

    .poll-card:hover .more,
    .poll-card .more:focus-visible,
    .poll-card .more[aria-expanded="true"] {
        opacity: 1;
    }
}

.poll-meta {
    padding: 2px 0 12px;
    font: var(--footnote);
    color: var(--secondary);
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Ett alternativ: andelen som en tonad stapel bakom, och en ram runt det jag valt. */
.poll-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 4px 14px;
    border-radius: 12px;
    background: linear-gradient(to right, var(--accent-tint) var(--share, 0%), var(--tag-bg) var(--share, 0%));
    border: 2px solid transparent;
    text-align: left;
    transition:
        transform 0.12s var(--ease),
        background 0.4s;
}

.poll-option:not(:disabled):active {
    transform: scale(0.985);
}

.poll-option.mine {
    border-color: var(--accent);
}

.poll-option .title {
    flex: 1;
    min-width: 0;
    font: var(--subheadline);
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Bocken vid mitt val: fylld cirkel, som appens checkmark.circle.fill. */
.poll-option .mine-mark {
    width: 18px;
    height: 18px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-fill);
    color: #fff;
    font-size: 11px;
}

.poll-option .mine-mark .icon {
    stroke-width: 3.4;
}

.poll-option .voters {
    display: flex;
}

.poll-option .voters .avatar + .avatar {
    margin-left: -6px;
}

.poll-option .voters .avatar {
    box-shadow: 0 0 0 2px var(--card);
}

.poll-option .percent {
    min-width: 40px;
    text-align: right;
    font: var(--footnote);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--secondary);
    white-space: nowrap;
}

.poll-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
