/* =========================================================
   Рейтинг записей: стрелки «нравится / не нравится»
   (reboot-child / inc/votes.php)
   ========================================================= */

.vote {
    --vote-up: #1a9e52;
    --vote-down: #e0475a;
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-family: 'Inter', sans-serif;
    line-height: 1;
    vertical-align: middle;
}
.vote__btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #8a9099;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease, background .15s ease, transform .15s ease;
}
.vote__btn svg { display: block; }
.vote__btn--up:hover { color: var(--vote-up); background: color-mix(in srgb, var(--vote-up) 10%, transparent); }
.vote__btn--down:hover { color: var(--vote-down); background: color-mix(in srgb, var(--vote-down) 10%, transparent); }
.vote__btn:active { transform: scale(.88); }
.vote__btn--up.is-active { color: #fff; background: var(--vote-up); }
.vote__btn--down.is-active { color: #fff; background: var(--vote-down); }
.vote__btn.is-pop svg { animation: votePop .35s cubic-bezier(.3, 1.6, .5, 1); }
.vote__btn--up.is-pop svg { animation-name: votePopUp; }
.vote__btn--down.is-pop svg { animation-name: votePopDown; }
@keyframes votePopUp { 0% { transform: none; } 45% { transform: translateY(-3px) scale(1.15); } 100% { transform: none; } }
@keyframes votePopDown { 0% { transform: none; } 45% { transform: translateY(3px) scale(1.15); } 100% { transform: none; } }

.vote__count {
    min-width: 22px;
    padding: 0 2px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #6b7280;
    transition: color .2s ease;
}
.vote.is-pos .vote__count { color: var(--vote-up); }
.vote.is-neg .vote__count { color: var(--vote-down); }

/* в футере карточки ленты — слева от комментариев */
.vc-card__actions .vote--card { margin: -6px 6px -6px -6px; }

/* в шапке записи */
.vc-entry-stats .vote--single { margin: -6px 0; }
.vc-entry-stats .vote--single .vote__btn { width: 30px; height: 30px; }

/* блок после текста записи */
.vote-bottom {
    display: flex;
    justify-content: center;
    margin: 28px 0 8px;
}
.vote--big {
    gap: 6px;
    padding: 8px 10px 8px 18px;
    border-radius: 40px;
    background: #f5f7fa;
    border: 1px solid #eceff3;
}
.vote--big .vote__ask {
    margin-right: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1c1c1c;
}
.vote--big .vote__btn {
    width: 40px;
    height: 40px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.vote--big .vote__btn--up.is-active { background: var(--vote-up); }
.vote--big .vote__btn--down.is-active { background: var(--vote-down); }
.vote--big .vote__count { min-width: 34px; font-size: 18px; font-weight: 700; }

/* всплывашка с ошибкой */
.vote-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 10003;
    max-width: calc(100vw - 32px);
    padding: 11px 16px;
    border-radius: 12px;
    font: 500 14px/1.35 'Inter', sans-serif;
    color: #fff;
    background: rgba(28, 30, 34, .94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity .22s ease, transform .22s ease;
    pointer-events: none;
}
.vote-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 768px) {
    .vote-toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
    .vote__count { font-size: 14px; min-width: 20px; }
}

/*
 * Лента в 2 колонки на телефоне: футер в две строки, ничего не прячем.
 *   1-я строка: время ………… 🔖
 *   2-я строка: ↑ 0 ↓ ……… 💬 3  👁 120
 */
@media (max-width: 599px) {
    #main .post-cards > .post-card .vc-card__footer {
        flex-wrap: wrap;
        align-items: center;
        row-gap: 2px;
        column-gap: 0;
        padding: 2px 6px 8px 10px;
    }
    #main .post-cards > .post-card .vc-card__actions { display: contents; }
    #main .post-cards > .post-card .vc-card__time {
        order: 1;
        flex: 1 1 0;
        min-width: 0;
    }
    #main .post-cards > .post-card .vc-card__btn--fav {
        order: 2;
        flex: 0 0 auto;
        width: 30px;
        height: 30px;
        margin: 0 -2px 0 4px;
        padding: 0;
    }
    #main .post-cards > .post-card .vc-card__btn--fav svg { width: 18px; height: 18px; }
    #main .post-cards > .post-card .vote--card {
        order: 3;
        flex: 0 0 auto;
        margin: 0 auto 0 -5px;
    }
    #main .post-cards > .post-card .vote--card .vote__btn { width: 26px; height: 26px; }
    #main .post-cards > .post-card .vote--card .vote__btn svg { width: 16px; height: 16px; }
    #main .post-cards > .post-card .vote--card .vote__count { min-width: 16px; font-size: 13px; }
    #main .post-cards > .post-card .vc-card__btn--comments {
        order: 4;
        display: inline-flex !important;
        height: 26px;
        padding: 0 4px;
        gap: 3px;
        font-size: 12px;
    }
    #main .post-cards > .post-card .vc-card__btn--comments svg { width: 16px; height: 16px; }
    #main .post-cards > .post-card .vc-card__views {
        order: 5;
        display: inline-flex !important;
        height: 26px;
        padding: 0 2px 0 4px;
        gap: 3px;
        font-size: 12px;
    }
    #main .post-cards > .post-card .vc-card__views svg { width: 15px; height: 15px; }
}
@media (max-width: 599px) {
    /* флажок и время занимают всю первую строку → голосование уходит на вторую */
    #main .post-cards > .post-card .vc-card__time { flex-basis: calc(100% - 36px); }
}

/* ---------- в записи: флажок заметнее (тема красит .vc-entry-stat серым через !important) ---------- */
.vc-entry-stats .vc-entry-stat--fav { color: #2d81e0 !important; }
.vc-entry-stats .vc-entry-stat--fav.is-active { color: #fff !important; }
.vc-entry-stats .vc-entry-stat--link { padding: 4px 0; }

/* ---------- панель после текста записи ---------- */
.entry-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 8px;
    padding: 14px 0 0;
    border-top: 1px solid #f0f2f5;
    font-family: 'Inter', sans-serif;
}
.entry-actions__side {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.entry-actions__btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #eceff3;
    border-radius: 40px;
    background: #f5f7fa;
    font: 600 15px/1 'Inter', sans-serif;
    color: #1c1c1c !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.entry-actions__btn b { margin-left: 2px; color: #2d81e0; }
.entry-actions__btn:hover { background: #eef4fd; border-color: #d9e6f8; }
.entry-actions__btn--fav { color: #2d81e0 !important; }
.entry-actions__btn--fav.is-active { color: #fff !important; background: #2d81e0; border-color: #2d81e0; }
.entry-actions .vote--big { margin: 0; }

@media (max-width: 599px) {
    .entry-actions { flex-direction: column; align-items: stretch; }
    .entry-actions .vote--big { justify-content: center; }
    .entry-actions__side { display: grid; grid-template-columns: 1fr 1fr; }
    .entry-actions__btn { justify-content: center; padding: 0 10px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .vote__btn.is-pop svg { animation: none; }
}
