/* Общие размеры повторяют существующий сайдбар: заголовки 16px, текст 13px, числа 17px. */
.votings-sidebar { display: flex;flex-direction: column; height: 100%; gap: 18px; min-width: 0; }
.poll-hub-sidebar-widget { min-width: 0; margin: 0; }

/* На планшетах и телефонах виджеты остаются в обычном потоке. */
.sticky-widget { position: static; top: auto; }
@media (min-width: 1101px) {
    .admin-bar .sticky-widget { position: sticky; top: 238px; align-self: start; flex-shrink: 0; width: 100%; }
    .sticky-widget { position: sticky; top: 206px; align-self: start; flex-shrink: 0; width: 100%; }
}

.poll-hub-widget {
    padding: 23px 20px 20px;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-dark);
    font-family: var(--font-base);
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.poll-hub-widget .poll-hub-widget__title { margin: 0 0 19px; color: #000; font: 700 16px/1.35 var(--font-montserrat); }
.poll-calendar__navigation strong, .poll-guide strong, .poll-calendar__day { font-family: var(--font-montserrat); }
.poll-hub-widget__text { margin: 0 0 16px; }
.poll-hub-widget__muted { color: var(--color-soft); font-size: 12px; margin: 8px 0; }
.poll-hub-widget .poll-hub-widget__button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 43px; margin-top: 16px; padding: 10px 12px; font-size: 13px; line-height: 1.4; text-decoration: none; }
.poll-hub-widget__button .icon{fill: #087345 !important;}
.poll-hub-widget .icon { flex: 0 0 auto; width: 18px; height: 18px; fill: #fff; }
.poll-hub-widget a:focus-visible, .poll-hub-widget button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.poll-hub-widget [hidden] { display: none !important; }

/* Статистика, перенесённая из жёсткой разметки секции в WordPress-виджет. */
.votings-statistics__list { display: grid; gap: 16px; }
.votings-statistics__list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.votings-statistics__list span { color: #565d57; font-size: 13px; }
.votings-statistics__list strong { color: #327a3c; font-size: 17px; font-weight: 600; }
.votings-statistics__chart { height: 78px; margin: 20px 0 7px; overflow: hidden; }
.votings-statistics__chart svg { display: block; width: 100%; height: 100%; }
.votings-statistics__chart-area { pointer-events: none; }
.votings-statistics__chart-line { fill: none; stroke: #2f9b50; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 3px 4px rgba(47,155,80,.24)); vector-effect: non-scaling-stroke; }

/* Личная статистика: четыре статуса доступных голосований и ответы текущего пользователя. */
/*.poll-hub-widget--personal { background: linear-gradient(135deg, var(--color-surface), #f0f7f1); }*/
.poll-personal-summary { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 12px; align-items: center; margin: -4px 0 16px; }
.poll-personal-summary__total { font-size: 22px; line-height: 1.35; color: var(--color-ink); }
.poll-personal-ring { display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; background: conic-gradient(#15925f var(--poll-progress), #dbeade 0); position: relative; }
.poll-personal-ring::before { content: ''; position: absolute; inset: 12px; background: #f5faf6; border-radius: 50%; }
.poll-personal-ring strong { position: relative; color: var(--color-primary-dark); font-size: 24px; font-weight: 700; }
.poll-personal-counts { display: grid; }
.poll-personal-counts__row { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 13px 0; border-top: 1px solid var(--color-border); color: var(--color-text); text-decoration: none; }
.poll-personal-counts__row strong { font-size: 17px; font-weight: 600; }
.poll-personal-counts__row.is-active { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }
.poll-personal-counts__icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: var(--radius); }
.poll-personal-counts__icon--voted { color: #137447; background: #d9efdf; }
.poll-personal-counts__icon--pending { color: #946710; background: #fff2d0; }
.poll-personal-counts__icon--upcoming { color: #086888; background: rgba(0, 192, 255, 0.2); }
.poll-personal-counts__icon--missed { color: #b33737; background: #ffadad; }
.poll-personal-counts__icon .icon { width: 15px; height: 15px; }
.poll-personal-counts__icon--voted .icon{fill: #15925f;}
.poll-personal-counts__icon--pending .icon{fill: #ad7b17;}
.poll-personal-counts__icon--upcoming .icon{fill: #008dbb;}
.poll-personal-counts__icon--missed .icon{fill: #f44336; }
/* Календарь: привычная неделя с понедельника, статусы не зависят только от цвета. */
.poll-calendar__navigation { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 14px; min-height: 34px; }
.poll-calendar__navigation strong { font-size: 14px; text-align: center; flex: 1; }
.poll-calendar__arrow { display: grid; place-items: center; padding: 8px; width: 34px; height: 34px; border: 0; border-radius: var(--radius); background: var(--color-muted); color: var(--color-primary); cursor: pointer; }
.poll-calendar__arrow .icon { width: 10px; height: 14px; fill: #000; }
.poll-calendar__arrow[data-calendar-previous] .icon { transform: rotate(180deg); }
.poll-calendar__arrow:disabled { opacity: .4; cursor: default; }
.poll-calendar__weekdays, .poll-calendar__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.poll-calendar__weekdays { margin-bottom: 7px; color: var(--color-soft); font-size: 11px; }
.poll-calendar__day { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border: 2px solid transparent; border-radius: 50%; color: var(--color-ink); text-decoration: none; font-size: 12px; }
.poll-calendar__day.has-finished { background: radial-gradient(#6c6c6c, #858585 ); color: #fff; }
.poll-calendar__day.has-upcoming { background: radial-gradient(#47d2ff, rgb(0 192 255)); color: #15536c; }
.poll-calendar__day.has-active { background: radial-gradient(#15925f, #087345); color: #fff; font-weight: 700; }
.poll-calendar__day.is-today { border-color: #70a84c; box-shadow: inset 0 0 0 2px var(--color-surface); }
.poll-calendar__day.is-selected { outline: 2px solid var(--color-primary-dark); outline-offset: 1px; font-weight: 700; }
.poll-calendar__legend { display: grid; gap: 8px; margin-top: 16px; color: var(--color-soft); font-size: 12px; }
.poll-calendar__legend > span { display: flex; gap: 10px; align-items: center; }
.poll-calendar__key { width: 13px; height: 13px; flex: 0 0 13px; border-radius: 50%; background: radial-gradient(#6c6c6c, #858585); }
.poll-calendar__key--today { background: #91c66b; }
.poll-calendar__key--active { background: radial-gradient(#15925f, #087345); }
.poll-calendar__key--upcoming { background: radial-gradient(#47d2ff, rgb(0 192 255)); }
.poll-calendar__reset { display: inline-block; margin-top: 12px; color: var(--color-primary); }

/* Пунктир идёт от центра первого номера до центра последнего при любой высоте текста. */
.poll-guide { --poll-guide-gap: 18px; display: grid; gap: var(--poll-guide-gap); margin: 0; padding: 0; list-style: none; }
.poll-guide li { display: grid; grid-template-columns: 21px 44px minmax(0, 1fr); gap: 9px; position: relative; }
.poll-guide li:not(:last-child)::after { content: ''; position: absolute; left: 10px; top: 19px; height: calc(100% + var(--poll-guide-gap)); border-left: 1px dashed var(--color-border); }
.poll-guide__number { display: grid; place-items: center; width: 21px; height: 21px; margin-top: 9px; border-radius: 50%; background: #d4eac8; color: #285d32; font-size: 12px; font-weight: 700; position: relative; z-index: 1; }
.poll-guide__icon { display: grid; place-items: center; width: 44px; height: 44px; background: #e8f2e7; color: var(--color-primary); border-radius: 50%; }
.poll-guide__icon .icon { width: 23px; height: 23px; fill: #087244;}
.poll-guide strong { font-size: 13px; font-weight: 700; color: var(--color-ink); }
.poll-guide p { margin: 4px 0 0; color: var(--color-soft); font-size: 12px; }

/* Итоги: длина полосы соответствует доле ответивших на единственный вопрос. */
.poll-hub-widget__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.poll-hub-widget__heading .poll-hub-widget__title { margin: 0; }
.poll-hub-widget__more { display: inline-flex; align-items: center; gap: 4px; color: var(--color-primary); font-size: 11px; font-weight: 600; text-decoration: none; }
.poll-hub-widget__more .icon { width: 13px; height: 13px; }
.poll-widget-result + .poll-widget-result { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--color-border); }
.poll-widget-result h4 { margin: 0 0 12px; font-size: 14px; line-height: 1.4; font-weight: 700; }
.poll-widget-result h4 a { color: var(--color-ink); text-decoration: none; }
.poll-widget-result__row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr) 34px; gap: 8px; align-items: center; margin: 8px 0; font-size: 12px; }
.poll-widget-result__row strong { text-align: right; font-size: 12px; font-weight: 600; }
.poll-widget-result__track { height: 9px; border-radius: var(--radius); background: var(--color-muted); overflow: hidden; }
.poll-widget-result__bar { display: block; height: 100%; border-radius: inherit; background: #219553; }
.poll-widget-result__bar--1 { background: #cf6464; }
.poll-widget-result__bar--2 { background: #8a9690; }
.poll-widget-result__bar--3 { background: #6f9caa; }
.poll-widget-result__meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 13px; color: var(--color-soft); font-size: 11px; }
.poll-widget-result__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.poll-widget-result__meta .icon { width: 13px; height: 13px; }

@media (max-width: 1100px) {
    .votings-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .votings-sidebar { grid-template-columns: minmax(0, 1fr); }
    .poll-hub-widget { padding: 20px; }
    .poll-calendar__days, .poll-calendar__weekdays { gap: 5px; }
    .poll-calendar__day { max-height: 42px; }
}
