﻿.pollsContainer {
    display: grid;
    grid-template-columns: 1fr;
}

.poll-item {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    background: var(--background-17) !important;
    flex: none;
    order: 0;
    flex-grow: 0;
    overflow: hidden;
}

.more-options {
    color: var(--text-medium);
    font-size: 14px;
    margin: 0;
    line-height: 150%;
    letter-spacing: 0.0025em;
}

.more-options > a {
    text-decoration: underline;
}

.no-poll-header {
    margin: 0;
}

.text-container {
    max-width: 500px;
    z-index: 100;
    margin-top: -40px;
}

.transfer-finished {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}

.transfer-error {
    margin-top: 20px !important;
    margin-bottom: 20px !important;
}

@media (hover: hover) and (pointer: fine) {
    .poll-item:hover {
        background: var(--background-21) !important;
    }
}

.poll-item > h2 {
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.0015em;
    color: var(--text-high);
    margin-bottom: 16px;
}

.poll-item > p {
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    letter-spacing: 0.0025em;
    color: var(--text-medium);
    margin: 0px;
}

.poll-item > .answers {
    margin-bottom: 16px;
}

.poll-item:nth-child(2) {
    border-radius: 5px 5px 0px 0px;
    margin-top: 48px;
}

.poll-item:last-child {
    border-end-start-radius: 5px;
    border-end-end-radius: 5px;
}

.poll-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.poll-item p.answers {
    margin-top: auto;
}

p.answers {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Desktop styles */
@media (min-width: 1024px) {
    .pollsContainer {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 20px;
    }

    .poll-item {
        border-radius: 5px !important;
        border-bottom: none !important;
        margin-top: 0px !important;
    }

    .new-link > button {
        height: 100% !important;
        min-height: 48px;
    }

    .pollsContainer:has(.poll-item:nth-child(3)) {
        grid-template-columns: repeat(3, 1fr);
    }

    .pollsContainer:not(:has(.poll-item:nth-child(3))) {
        grid-template-columns: repeat(2, 1fr);
    }

    .pollsContainer:not(:has(.poll-item:nth-child(2))) {
        grid-template-columns: 1fr;
    }
}

.flash-container {
    position: relative;
    margin-top: 16px;
}

    .flash-container > .content {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
    }

    .flash-container > .panel {
        position: absolute;
        bottom: 0;
        width: 100%;
        height: 56px;
        background-color: var(--background-7);
    }

.flashlight {
    transform-origin: 80px 40px;
    animation: flashlightAnimation 4500ms;
}

.flashlight-bulb {
    opacity: 0;
    animation: flashlightBulbAnimation 4500ms;
}

@keyframes flashlightAnimation {
    0%, 12.5%, 18.75% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    37.5% { transform: rotate(20deg); }
    50% { transform: rotate(-20deg); }
    62.5% { transform: rotate(-20deg); }
    77.5% {
        transform: rotate(8deg);
        animation-timing-function: ease-in-out;
    }
    87.5% {
        transform: rotate(-8deg);
        animation-timing-function: ease-in-out;
    }
}

@keyframes flashlightBulbAnimation {
    0%, 6.25% {
        animation-timing-function: ease-in;
        opacity: 0;
    }
    12.5% { opacity: 1; }
    60% {
        opacity: 1;
        animation-timing-function: ease-in;
    }
    61% {
        opacity: 0;
        animation-timing-function: ease-in;
    }
    100% {
        opacity: 0;
        animation-timing-function: ease-out;
    }
}