/* =============================================
   VOTES — страница каталога опросов
   ============================================= */

.votes-page {
    padding: 40px 0 60px;
}

.votes-page__title {
    margin-bottom: 32px;
}

.votes-page__empty {
    color: #7a7a7a;
    font-size: 16px;
    padding: 24px 0;
}

.votes-page__items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 1100px) {
    .votes-page__items {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .votes-page__items {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   VOTE-CARD — карточка опроса в листинге
   ============================================= */

.vote-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    height: 100%;
    transition: box-shadow 0.2s ease;
}

.vote-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.vote-card__img {
    display: block;
    width: 100%;
    aspect-ratio: 560 / 300;
    overflow: hidden;
    flex-shrink: 0;
}

.vote-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.vote-card:hover .vote-card__img img {
    transform: scale(1.03);
}

.vote-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    flex: 1;
}

.vote-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vote-card__status {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    line-height: 1.4;
}

.vote-card__status_active {
    background: #e6f4ea;
    color: #1e7e34;
}

.vote-card__status_ended {
    background: #f2f2f2;
    color: #7a7a7a;
}

.vote-card__count {
    font-size: 13px;
    color: #7a7a7a;
}

.vote-card__title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    text-decoration: none;
    flex: 1;
}

.vote-card__title:hover {
    color: #e8272a;
}

.vote-card__date {
    font-size: 13px;
    color: #7a7a7a;
}

.vote-card__link {
    align-self: flex-start;
    margin-top: 4px;
    font-size: 14px;
}

/* =============================================
   SINGLE-VOTE — страница одного опроса
   ============================================= */

.single-vote {
    padding: 40px 0 60px;
}

.single-vote__top {
    margin-bottom: 32px;
}

.single-vote__title {
    margin-bottom: 8px;
}

.single-vote__date {
    font-size: 14px;
    color: #7a7a7a;
}

.single-vote__row {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.single-vote__left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.single-vote__right {
    width: 300px;
    flex-shrink: 0;
}

.single-vote__content {
    font-size: 16px;
    line-height: 1.7;
    color: #1a1a1a;
}

.single-vote__content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.single-vote__widget {
    /* виджет на странице опроса — без дополнительных отступов */
}

@media (max-width: 900px) {
    .single-vote__row {
        flex-direction: column;
    }

    .single-vote__right {
        width: 100%;
    }
}

/* =============================================
   OTHER-VOTES — сайдбар «Другие опросы»
   ============================================= */

.other-votes {
    background: #f7f7f7;
    border-radius: 12px;
    padding: 20px;
}

.other-votes__title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.other-votes__items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.other-votes__item {
    padding-bottom: 14px;
    border-bottom: 1px solid #e8e8e8;
}

.other-votes__item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.other-votes__link {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 6px;
}

.other-votes__link:hover {
    color: #e8272a;
}

.other-votes__meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.other-votes__status {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

.other-votes__status_active {
    background: #e6f4ea;
    color: #1e7e34;
}

.other-votes__status_ended {
    background: #f2f2f2;
    color: #7a7a7a;
}

.other-votes__count {
    font-size: 12px;
    color: #7a7a7a;
}

/* =============================================
   VOTE-WIDGET — виджет голосования
   ============================================= */

.vote-widget {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Хедер */
.vote-widget__header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.vote-widget__question {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 12px;
}

/* Таймер */
.vote-widget__timer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vote-widget__timer-label {
    font-size: 13px;
    color: #7a7a7a;
}

.vote-widget__timer-countdown {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vote-widget__timer-part {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.vote-widget__timer-value {
    font-size: 16px;
    font-weight: 700;
    color: #04223c;
    /* min-width: 24px; */
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.vote-widget__timer-unit {
    font-size: 12px;
    color: #7a7a7a;
}

.vote-widget__timer-sep {
    font-size: 16px;
    font-weight: 700;
    color: #ccc;
    margin: 0 2px;
}

/* Тело */
.vote-widget__body {
    padding: 20px 24px;
}

/* Варианты — голосование */
.vote-widget__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.vote-widget__option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
    user-select: none;
}

.vote-widget__option:hover {
    border-color: #052742;
    background: #f2f9ff;
}

.vote-widget__radio {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s ease;
    cursor: pointer;
}

.vote-widget__radio:checked {
    border-color: #04223c;
}

.vote-widget__radio:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #052742;
}

.vote-widget__option:has(.vote-widget__radio:checked) {
    border-color: #052742;
    background: #f2f9ff;
}

.vote-widget__option-text {
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.4;
}

.vote-widget__error {
    font-size: 13px;
    color: #e8272a;
    margin-bottom: 12px;
}

.vote-widget__submit {
    width: 100%;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* Результаты */
.vote-widget__results_hidden {
    display: none;
}

.vote-widget__results {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.vote-widget__result-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vote-widget__result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.vote-widget__result-title {
    font-size: 14px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    line-height: 1.4;
}

.vote-widget__result-check {
    flex-shrink: 0;
    color: #1e7e34;
}

.vote-widget__result-percent {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
}

.vote-widget__result-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.vote-widget__result-bar-fill {
    height: 100%;
    background: #fde335;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.vote-widget__result-item_chosen .vote-widget__result-bar-fill {
    background: #d0bc35;
}

.vote-widget__result-item_chosen .vote-widget__result-title {
    font-weight: 600;
}

/* Футер */
.vote-widget__footer {
    padding: 14px 24px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.vote-widget__total {
    font-size: 13px;
    color: #7a7a7a;
    flex: 1;
}

.vote-widget__more {
    font-size: 13px;
    font-weight: 600;
    color: #e8272a;
    text-decoration: none;
    white-space: nowrap;
}

.vote-widget__more:hover {
    text-decoration: underline;
}

.vote-widget__ended-label {
    font-size: 13px;
    color: #7a7a7a;
    font-style: italic;
}

/* Состояние «загрузка» */
.vote-widget_loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Анимация появления результатов */
.vote-widget__results {
    animation: voteResultsFadeIn 0.3s ease;
}

@keyframes voteResultsFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптив виджета */
@media (max-width: 480px) {
    .vote-widget__header,
    .vote-widget__body,
    .vote-widget__footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .vote-widget__question {
        font-size: 16px;
    }

    .vote-widget__timer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

.vote-card__link.btn.btn_padding.btn_gray {
    padding: 10px;
}

.vote-widget__submit {
    background: color(srgb 0.9929 0.8945 0.1967);
    padding: 10px;
    border: none;
}

.vote-widget__submit:hover {
    background: color(srgb 0.84 0.7469 0.084);
}

.single-vote__left img {
    max-width: 100%;
    height: auto;
}
