:root {
    /* Top - flex-start  Bottom - flex-end */
    --widget-grow-position: flex-start;
    --background-color: #0e0e10;
    --timer-color: #9146FF;
    --timer-background: #1f1f23;
    --font-family: 'Roboto', sans-serif;
    --font-size: 16px;
    --choice-1-color: #4ca3ff;
    --choice-2-color: #f763ed;
    --choice-3-color: #f7c863;
    --choice-4-color: #68f763;
    --choice-5-color: #f76363;
    --choice-6-color: #63edf7;
    --choice-7-color: #8b63f7;
    --choice-8-color: #f7ed63;
    --choice-9-color: #6392f7;
    --choice-10-color: #f76363;
    --choice-winner-color: #20961c;
    --choice-no-votes-color: #d6452c;
    --choice-background: #18181b;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size);
    display: flex;
    height: 100vh;
    width: 100vw;
    padding: 0;
    margin: 0;
}

#poll {
    background-color: var(--background-color);
    color: #fff;
    padding: 1rem;
    border-radius: 1rem;
    display: none;
    transition: visibility 0s, opacity 0.5s linear;
    height: fit-content;
    width: 100%;
    align-self: var(--widget-grow-position)
}

#poll.show {
    display: block;
}

#time {
    height: 5px;
    background-color: var(--timer-background);
}

#timeleft {
    height: 100%;
    background-color: var(--timer-color);
}

#timeleft.animate {
    animation-duration: var(--timer);
    animation-name: timer;
    animation-timing-function: linear;
}

@keyframes timer {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

#poll-title {
    font-size: 1.8rem;
}

#choices {
    display: flex;
    flex-direction: column;
}

#choices.vs {
    flex-direction: row;
}

.choice {
    background-color: var(--choice-background);
    margin: .5rem;
    border-radius: 1rem;
    padding: .2rem 0;
    position: relative;
    flex: 1;
}

.vs .choice-1 .info {
    flex-direction: row-reverse;
}

.vs .choice-1 .percent {
    right: 0;
}

.vs .choice-1 strong {
    text-align: right;
}

.vs .choice-1 span {
    text-align: left;
}

.info {
    position: relative;
    padding: 0 0.4rem;
    display: flex;
}

.choice strong,
.choice span {
    z-index: 999;
    position: relative;
    flex: 1;
}

.choice span {
    text-align: right;
}

.percent {
    border-radius: 1rem;
    width: var(--percent);
    position: absolute;
    height: 100%;
    top: 0;
    transition: all .5s linear;
}

.choice-1 .percent {
    background-color: var(--choice-1-color);
}

.choice-2 .percent {
    background-color: var(--choice-2-color);
}

.choice-3 .percent {
    background-color: var(--choice-3-color);
}

.choice-4 .percent {
    background-color: var(--choice-4-color);
}

.choice-5 .percent {
    background-color: var(--choice-5-color);
}

.choice-6 .percent {
    background-color: var(--choice-6-color);
}

.choice-7 .percent {
    background-color: var(--choice-7-color);
}

.choice-8 .percent {
    background-color: var(--choice-8-color);
}

.choice-9 .percent {
    background-color: var(--choice-9-color);
}

.choice-10 .percent {
    background-color: var(--choice-10-color);
}

#choices.showWinner .choice .percent {
    background-color: var(--choice-background);
}

.choice.winner {
    background-color: var(--choice-winner-color);
}

.choice.winner #trophy {
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-image: url('../img/trophy.svg');
    display: inline-block;
    position: relative;
    z-index: 1;
    top: 2px;
    left: 2px;
    ;
    margin: 0 10px;
}

#choices.showWinner .choice.winner .percent {
    background-color: var(--choice-winner-background);
}


#choices.noVotes .choice .percent {
    background-color: var(--choice-no-votes-color);
}