/* =====================================================================
   onlybet.ru — карточка «Прогноз эксперта» на странице прогноза
   НОВЫЙ ФАЙЛ. Подключить ПОСЛЕ main.min.css (или дописать в конец main.css).

   ЧТО МЕНЯЕТСЯ НА САЙТЕ:
   1. [ИЗМЕНЕНИЕ] Отступ от текста прогноза до карточки — 32px вместо ~74px.
   2. [НОВОЕ]     Стили карточки .expert-card (вместо .prognoz_block + .prognoz_rating).
   3. [ИЗМЕНЕНИЕ] Внешний вид штатного голосования «Да / Нет» ВНУТРИ карточки
                  (разметку и JS виджета не трогаем, только CSS).
   4. [НОВОЕ]     Ссылка «Все прогнозы автора →» у заголовка «Следующие прогнозы».

   Подход mobile-first: основные стили — для телефона,
   блок @media (min-width: 768px) в конце — для планшета и десктопа.
   ===================================================================== */

/* [1. ИЗМЕНЕНИЕ] Отступ от текста прогноза до карточки — ровно 32px.
   Было: 25.6px (отступ последнего абзаца) + 48px (отступ блока текста) ≈ 74px.
   Действует только на страницах прогнозов (.prognozy_item). */
.prognozy_item .f_content { margin-bottom: 0; }
.prognozy_item .f_content .value > :last-child { margin-bottom: 0; }

/* [2. НОВОЕ] ---------- Каркас карточки (телефон: одна колонка) ---------- */
.expert-card {
    display: grid;
    grid-template-columns: 1fr;
    margin: 24px 0 32px;
    background: #fff;
    color: #2c2c2c;
    font-family: "DIN Pro", sans-serif;
    box-shadow: 0 3px 30px rgba(0, 0, 0, .08);
}
.expert-card a { color: inherit; }

/* [2. НОВОЕ] ---------- Автор: компактная строка сверху ---------- */
.expert-card__author {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
    column-gap: 12px;
    row-gap: 2px;
    padding: 14px 16px;
    background: #f5f6f8;
    text-decoration: none;
}
.expert-card__photo {
    grid-row: span 2;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.expert-card__name { font-size: 16px; line-height: 1.25; }
.expert-card__role { font-size: 13px; line-height: 1.3; color: #9a9a9a; }
.expert-card__author:hover .expert-card__name,
.expert-card__author:focus-visible .expert-card__name { color: #f6151d; }

/* [2. НОВОЕ] ---------- Основная часть: ставка, кнопка ---------- */
.expert-card__main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 18px 16px 16px;
}

/* Ставка и коэффициент */
.expert-card__label {
    font-size: 12px;
    color: #9a9a9a;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.expert-card__bet {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    margin-top: -10px;
}
.expert-card__outcome { font-size: 28px; line-height: 1.05; white-space: nowrap; }
.expert-card__coef {
    font-size: 19px;
    color: #6b6b6b;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Кнопка на всю ширину, букмекер — подписью под ней по центру */
.expert-card__action {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eceef1;
}
.expert-card .expert-card__btn {
    display: block;
    width: 100%;
    padding: 0 28px;
    line-height: 46px;
    background: #f6151d;
    color: #fff;
    font-size: 15px;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}
.expert-card .expert-card__btn:hover,
.expert-card .expert-card__btn:focus-visible { background: #d0080f; color: #fff; }
.expert-card__bk { font-size: 13px; color: #9a9a9a; text-align: center; }

/* [3. ИЗМЕНЕНИЕ] ---------- Голосование «Да / Нет» ----------
   Было: большие зелёная и красная плашки, крупные проценты, круговая диаграмма.
   Стало: компактные серые кнопки с иконками 👍/👎, процент справа, диаграмма скрыта.
   Внутри — штатный виджет InstantCMS (.rating_widget). Его разметку не трогаем:
   после голоса сервер заменяет виджет целиком. Меняем только внешний вид.
   Селекторы начинаются с .prognozy_item, чтобы быть сильнее штатных правил сайта
   (.prognozy_item .prognoz_rating .rating_widget …), в т.ч. мобильных — без !important. */
.prognozy_item .expert-card .expert-card__vote {
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
}
.prognozy_item .expert-card .expert-card__vote .rating_title {
    margin: 0 0 8px;
    font-size: 15px;
    text-transform: none;
    text-align: center;
    color: #2c2c2c;
}
.prognozy_item .expert-card .expert-card__vote .rating_widget {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    max-width: none;
    margin: 0;
    padding: 0;
}
.prognozy_item .expert-card .expert-card__vote .rating_widget .arrow {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    margin: 0;
}
.prognozy_item .expert-card .expert-card__vote .rating_widget .arrow .percent { order: 2; } /* процент всегда справа от кнопки, и у «Да», и у «Нет» */
.prognozy_item .expert-card .expert-card__vote .rating_widget .arrow .percent {
    min-width: 0;
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    color: #828282;
    font-variant-numeric: tabular-nums;
}
.prognozy_item .expert-card .expert-card__vote .rating_widget .diagram { display: none; } /* круговая диаграмма в карточке не нужна */
.prognozy_item .expert-card .expert-card__vote .rating_widget .btn-vote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 0;
    height: 36px;
    padding: 0 14px;
    background: #f1f3f6;
    color: #2c2c2c;
    border: 1px solid #d3d8df;
    border-radius: 0;
    box-shadow: none;
    font-size: 14px;
    text-transform: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
.prognozy_item .expert-card .expert-card__vote .rating_widget .btn-vote .icon,
.prognozy_item .expert-card .expert-card__vote .rating_widget .btn-vote svg { display: inline-flex; width: 16px; height: 16px; margin: 0; fill: currentColor; }
.prognozy_item .expert-card .expert-card__vote .rating_widget .btn-vote-up .icon { color: #00b26f; }
.prognozy_item .expert-card .expert-card__vote .rating_widget .btn-vote-down .icon { color: #eb4847; }
.prognozy_item .expert-card .expert-card__vote .rating_widget .btn-vote-up:hover,
.prognozy_item .expert-card .expert-card__vote .rating_widget .btn-vote-up:focus-visible { background: #e6f7f0; border-color: #00b26f; color: #2c2c2c; }
.prognozy_item .expert-card .expert-card__vote .rating_widget .btn-vote-down:hover,
.prognozy_item .expert-card .expert-card__vote .rating_widget .btn-vote-down:focus-visible { background: #fdecec; border-color: #eb4847; color: #2c2c2c; }

/* [2. НОВОЕ] ---------- Строка «Проверено» и 18+ ---------- */
.expert-card__note {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.5;
    color: #9a9a9a;
    text-align: center;
}
.expert-card__note a { text-decoration: underline; text-decoration-color: #ddd; text-underline-offset: 3px; }

/* =====================================================================
   [2–3] Планшет и десктоп (от 768px): автор колонкой слева,
   справа ставка, кнопка, голосование — всё выровнено влево
   ===================================================================== */
@media (min-width: 768px) {
    .expert-card { grid-template-columns: 200px 1fr; margin: 32px 0 40px; }

    .expert-card__author {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 28px 20px;
        text-align: center;
    }
    .expert-card__photo { width: 88px; height: 88px; margin-bottom: 6px; }
    .expert-card__name { font-size: 17px; }

    .expert-card__main { gap: 16px; padding: 28px 32px 22px; }
    .expert-card__label { font-size: 13px; }
    .expert-card__bet { gap: 4px 14px; margin-top: -8px; }
    .expert-card__outcome { font-size: 44px; }
    .expert-card__coef { font-size: 28px; }

    .expert-card__action { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px; padding-bottom: 20px; }
    .expert-card .expert-card__btn { display: inline-block; width: auto; line-height: 52px; font-size: 16px; }
    .expert-card__bk { font-size: 14px; text-align: left; }

    .prognozy_item .expert-card .expert-card__vote { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
    .prognozy_item .expert-card .expert-card__vote .rating_title { margin: 0; font-size: 16px; text-align: left; }
    .prognozy_item .expert-card .expert-card__vote .rating_widget { justify-content: flex-start; gap: 12px; }
    .prognozy_item .expert-card .expert-card__vote .rating_widget .arrow { gap: 8px; }
    .prognozy_item .expert-card .expert-card__vote .rating_widget .arrow .percent { font-size: 14px; }
    .prognozy_item .expert-card .expert-card__vote .rating_widget .btn-vote { min-width: 92px; height: 42px; padding: 0 18px; font-size: 15px; }
    .prognozy_item .expert-card .expert-card__vote .rating_widget .btn-vote .icon,
    .prognozy_item .expert-card .expert-card__vote .rating_widget .btn-vote svg { width: 18px; height: 18px; }

    .expert-card__note { font-size: 12px; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    .prognozy_item .expert-card .expert-card__vote .rating_widget .btn-vote { transition: none; }
}

/* =====================================================================
   [4. НОВОЕ] «Следующие прогнозы» + ссылка «Все прогнозы автора →» справа
   ===================================================================== */
.next_title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.next_title .h3 { margin-bottom: 0; }
.next_title a { font-family: "DIN Pro", sans-serif; font-size: 15px; color: #828282; text-decoration: none; }
.next_title a:hover,
.next_title a:focus-visible { color: #f6151d; }
