/* Статистика и факты 1.2.0 — карточки фактов: архив /stats/, одиночная
   страница /stats/fact-<ID>/ и вставки шорткода [fact id]. Нейтральная
   палитра с акцентом сайта (красный) — синие/индиго не используются.
   Мобильные: карточки в столбец, бейджи и мета не ломаются.
   1.2.0: крупная цифра, реакции/просмотры, фильтры архива, «В этот день». */

.vdf-wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; }
.vdf-h1 { margin: 0 0 6px; font-size: 30px; line-height: 1.15; font-weight: 800; }
.vdf-lead { margin: 0 0 22px; color: #666; font-size: 15px; }
.vdf-empty { color: #777; padding: 30px 0; }

.vdf-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    padding: 18px 20px 16px;
    margin: 0 0 16px;
    overflow: hidden;
}

.vdf-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vdf-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.vdf-badge--number  { background: #fdeef0; color: #c2263c; }
.vdf-badge--record  { background: #fff6dd; color: #8a6d1a; }
.vdf-badge--history { background: #f0f0f0; color: #555; }
.vdf-badge--quote   { background: #eaf7ee; color: #1d7a3a; }

.vdf-card__date { color: #8a8a8a; font-size: 12.5px; }

.vdf-card__title {
    margin: 8px 0 0;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 800;
}
.vdf-card--single .vdf-card__title { font-size: 24px; }
.vdf-card__title a { color: inherit; text-decoration: none; }
.vdf-card__title a:hover { color: #c2263c; }

/* 1.2.0: крупная типографика цифры (тип «Цифра» — значение + единица) */
.vdf-num {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 10px 0 0;
    padding: 10px 14px;
    background: #fdeef0;
    border-radius: 12px;
}
.vdf-num__value {
    font-size: 44px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -.5px;
    color: #c2263c;
    font-variant-numeric: tabular-nums;
}
.vdf-num__unit { color: #8a6d1a; font-size: 15px; font-weight: 700; }
.vdf-card--single .vdf-num__value { font-size: 56px; }

/* 1.2.0: реакции + просмотры (без регистрации; JS — assets/facts.js) */
.vdf-engage {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}
.vdf-react {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    min-height: 30px;
    border-radius: 16px;
    border: 1px solid #e2e2e2;
    background: #fff;
    color: #555;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.vdf-react:hover { border-color: #c2263c; color: #c2263c; }
.vdf-react.is-voted { background: #fdeef0; border-color: #c2263c; color: #c2263c; }
.vdf-react.is-busy { opacity: .6; }
.vdf-react-ico { font-size: 14px; line-height: 1; }
.vdf-react-n { font-variant-numeric: tabular-nums; }
.vdf-views {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    color: #a0a0a0;
    font-size: 12.5px;
    font-weight: 600;
}
.vdf-views-ico { flex-shrink: 0; }

/* 1.2.0: фильтры архива (тип + сущность) */
.vdf-filters { margin: 0 0 18px; }
.vdf-filters-row { display: flex; flex-wrap: wrap; gap: 6px; }
.vdf-filter-chip {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 18px;
    border: 1px solid #e2e2e2;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.vdf-filter-chip:hover { border-color: #c2263c; color: #c2263c; }
.vdf-filter-chip.is-active { background: #c2263c; border-color: #c2263c; color: #fff; }
.vdf-filters-entity {
    margin-top: 8px;
    font-size: 13px;
    color: #555;
    display: flex;
    gap: 10px;
    align-items: baseline;
}
.vdf-filter-clear { color: #8a8a8a; font-size: 12px; text-decoration: none; }
.vdf-filter-clear:hover { color: #c2263c; }

/* 1.2.0: «В этот день» */
.vdf-onthisday {
    margin: 0 0 18px;
    padding: 14px 16px;
    background: #f6f6f6;
    border-radius: 14px;
}
.vdf-onthisday__head { font-weight: 800; font-size: 15px; margin-bottom: 8px; }
.vdf-onthisday__list { list-style: none; margin: 0; padding: 0; }
.vdf-onthisday__list li { padding: 6px 0; border-top: 1px dashed #e0e0e0; font-size: 14px; line-height: 1.45; }
.vdf-onthisday__list li:first-child { border-top: 0; }
.vdf-onthisday__list a { color: #c2263c; font-weight: 600; text-decoration: none; }
.vdf-onthisday__list a:hover { text-decoration: underline; }
.vdf-onthisday__year { color: #8a8a8a; font-size: 12px; font-weight: 600; margin-left: 8px; font-variant-numeric: tabular-nums; }

.vdf-card__body { margin-top: 8px; color: #333; font-size: 15px; line-height: 1.55; }
.vdf-card__body p { margin: 0 0 10px; }
.vdf-card__body p:last-child { margin-bottom: 0; }

/* медиа: одиночная — крупно по ширине; в ленте — компактный правый */
.vdf-card__media { margin: 12px 0 0; }
.vdf-card__media img {
    display: block;
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: 10px;
}
.vdf-card__media--thumb { margin: 12px 0 4px; }
.vdf-card__media--thumb img {
    float: right;
    width: 132px;
    height: 132px;
    max-height: none;
    margin: 0 0 10px 14px;
}

/* чипы связанных сущностей */
.vdf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; clear: both; }
.vdf-chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    background: #f1f1f1;
    color: #333;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    min-height: 24px;
    line-height: 1.4;
}
.vdf-chip:hover { background: #e5e5e5; color: #111; }
.vdf-chip--rider::before,
.vdf-chip--team::before,
.vdf-chip--race::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.vdf-chip--rider::before { background: #c2263c; }
.vdf-chip--team::before  { background: #8a6d1a; }
.vdf-chip--race::before  { background: #1d7a3a; }

/* мета: источник + постоянная ссылка */
.vdf-card__meta {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    align-items: center;
    font-size: 12px;
    color: #8a8a8a;
}
.vdf-card__meta a { color: #c2263c; text-decoration: none; }
.vdf-card__meta a:hover { text-decoration: underline; }
.vdf-source a { color: #666; }
.vdf-source a:hover { color: #c2263c; }
.vdf-permalink { margin-left: auto; }

/* вставка шорткода внутри статьи — компактнее */
.entry-content .vdf-card { padding: 14px 16px 12px; border-radius: 12px; }
.entry-content .vdf-card__title { font-size: 17px; }

/* 1.1.0: подпись фото в карточке факта — как в постах (theme .image-caption),
   локальные подгонки: в карточке она не должна центрироваться шире картинки */
.vdf-card__media .image-caption {
    text-align: left;
    font-size: 12.5px;
    color: #8a8a8a;
    margin: 8px 0 0;
    padding: 0 2px;
    clear: both;
}

/* 1.2.1: стили блока «Поделиться» переехали в assets/share.css — он ставится
   и на страницах фактов, и на ОБЫЧНЫХ ЗАПИСЯХ (тема 4.2.46+ рисует
   vdf_share_html под текстом поста, где facts.css не подключался — блок
   выглядел без стилей; share.css подключается через vdf_share_sprite()). */
.vdf-card__meta .vdf-permalink { margin-left: 0; } /* «Поделиться» в хвосте мета-строки */

/* постраничная навигация архива */
.vdf-pagination { margin: 24px 0 6px; text-align: center; }
.vdf-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 3px 2px;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    min-height: 36px;
}
.vdf-pagination .page-numbers:hover { border-color: #c2263c; color: #c2263c; }
.vdf-pagination .page-numbers.current { background: #c2263c; border-color: #c2263c; color: #fff; }
.vdf-pagination .page-numbers.dots { border: 0; background: none; }

.vdf-backlink { margin-top: 18px; }
.vdf-backlink a { color: #c2263c; text-decoration: none; font-weight: 600; }
.vdf-backlink a:hover { text-decoration: underline; }

/* мобильные */
@media (max-width: 600px) {
    .vdf-wrap { padding: 16px 12px 32px; }
    .vdf-h1 { font-size: 25px; }
    .vdf-card { padding: 14px 14px 12px; }
    .vdf-card--single .vdf-card__title { font-size: 21px; }
    .vdf-card__media--thumb img { width: 108px; height: 108px; margin: 0 0 8px 10px; }
    .vdf-permalink { margin-left: 0; }
    .vdf-num__value { font-size: 36px; }
    .vdf-card--single .vdf-num__value { font-size: 44px; }
    .vdf-views { margin-left: 0; }
}
