/* ========================================= */
/* POLL.CSS - Голосование в новостях */
/* ========================================= */

/* ========================================= */
/* КОНТЕЙНЕР */
/* ========================================= */

.turbo-poll-block {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(16, 185, 129, 0.05));
    border: 2px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 16px;
    padding: 1.75rem;
    margin: 2rem 0;
    box-shadow: 0 4px 16px var(--shadow);
}

/* ========================================= */
/* HEADER */
/* ========================================= */

.turbo-poll-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--border);
}

.turbo-poll-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.turbo-poll-icon svg {
    color: white;
}

.turbo-poll-question {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    line-height: 1.4;
    padding-top: 0.375rem;
}

.turbo-poll-all-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.turbo-poll-all-link:hover {
    background: rgba(59, 130, 246, 0.1);
}

.turbo-poll-all-link svg {
    flex-shrink: 0;
}

/* ========================================= */
/* ВАРИАНТЫ ГОЛОСОВАНИЯ */
/* ========================================= */

/* ========================================= */
/* ВАРИАНТЫ ГОЛОСОВАНИЯ */
/* ========================================= */

.turbo-poll-options {
    margin-bottom: 1.5rem;
}

/* Каждый вариант ответа */
.pollanswer {
    display: block;
    margin-bottom: 0.75rem;
}

.pollanswer:last-child {
    margin-bottom: 0;
}

/* Label */
.pollanswer .form-check-label {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    margin: 0;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    color: var(--text);
    width: 100%;
}

.pollanswer .form-check-label:hover {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--primary);
    transform: translateX(4px);
}

/* Radio/Checkbox */
.pollanswer .form-check-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
    margin: 0 !important;
}

/* Текст варианта */
.pollanswer .form-check-label span {
    flex: 1;
}

/* Результаты голосования (прогресс-бары) */
.pollresult {
    margin-bottom: 1rem;
}

.pollresult:last-child {
    margin-bottom: 0;
}

/* Название варианта в результатах */
.pollresult > span:first-child {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

/* Прогресс-бар обёртка */
.pollresult > div {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

/* Заполнение прогресс-бара */
.pollresult > div > div {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Dark Theme */
[data-theme="dark"] .pollanswer .form-check-label {
    background: var(--dark);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

[data-theme="dark"] .pollanswer .form-check-label:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

[data-theme="dark"] .pollresult > div {
    background: rgba(255, 255, 255, 0.1);
}

/* Результаты голосования (прогресс-бары) */
.turbo-poll-options > div {
    margin-bottom: 1rem;
}

.turbo-poll-options > div:last-child {
    margin-bottom: 0;
}

/* Название варианта в результатах */
.turbo-poll-options > div > span {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

/* Прогресс-бар обёртка */
.turbo-poll-options > div > div {
   
    background: var(--border);
    border-radius: 4px;
  
}

/* Заполнение прогресс-бара */
.turbo-poll-options > div > div > div {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ========================================= */
/* ИНФОРМАЦИЯ О ГОЛОСОВАНИИ */
/* ========================================= */

.turbo-poll-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-white);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: var(--text);
    border: 1px solid var(--border);
}

.turbo-poll-info svg {
    color: var(--primary);
    flex-shrink: 0;
}

.turbo-poll-info strong {
    font-weight: 700;
    color: var(--dark);
}

/* ========================================= */
/* ОПРОС ЗАКРЫТ */
/* ========================================= */

.turbo-poll-closed {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: var(--danger);
    font-weight: 600;
}

.turbo-poll-closed svg {
    flex-shrink: 0;
}

/* ========================================= */
/* КНОПКИ */
/* ========================================= */

.turbo-poll-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.turbo-btn-poll-vote,
.turbo-btn-poll-results {
    flex: 1;
    min-width: 150px;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s;
    font-family: inherit;
}

.turbo-btn-poll-vote {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.turbo-btn-poll-vote:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.turbo-btn-poll-results {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.turbo-btn-poll-results:hover {
    background: var(--primary);
    color: white;
}

.turbo-btn-poll-vote svg,
.turbo-btn-poll-results svg {
    flex-shrink: 0;
}

/* ========================================= */
/* RESPONSIVE */
/* ========================================= */

@media (max-width: 768px) {
    .turbo-poll-block {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .turbo-poll-header {
        flex-direction: column;
        gap: 1rem;
    }

    .turbo-poll-icon {
        width: 40px;
        height: 40px;
    }

    .turbo-poll-question {
        font-size: 1.1rem;
        padding-top: 0;
    }

    .turbo-poll-all-link {
        align-self: flex-start;
    }

    .turbo-poll-options label {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .turbo-poll-actions {
        flex-direction: column;
    }

    .turbo-btn-poll-vote,
    .turbo-btn-poll-results {
        width: 100%;
        min-width: auto;
    }

    .turbo-btn-poll-results span {
        display: inline; /* Показываем текст на мобильных */
    }
}

/* ========================================= */
/* DARK THEME */
/* ========================================= */

[data-theme="dark"] .turbo-poll-block {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(16, 185, 129, 0.08));
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .turbo-poll-header {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .turbo-poll-options label {
    background: var(--dark);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

[data-theme="dark"] .turbo-poll-options label:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

[data-theme="dark"] .turbo-poll-info {
    background: var(--dark);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .turbo-poll-closed {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

[data-theme="dark"] .turbo-poll-options > div > div {
    background: rgba(255, 255, 255, 0.1);
}
/* ПРИНУДИТЕЛЬНОЕ ИСПРАВЛЕНИЕ ДЛЯ DLE */
.turbo-poll-options .pollanswer {
    display: block !important;
    margin-bottom: 0.75rem !important;
}

.turbo-poll-options .pollanswer label {
    display: flex !important;
    align-items: center !important;
    padding: 1rem 1.25rem !important;
    background: var(--bg-white) !important;
    border: 2px solid var(--border) !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    width: 100% !important;
}

.turbo-poll-options .pollanswer input {
    margin-right: 0.875rem !important;
    flex-shrink: 0 !important;
}