/*
Theme Name: VeloTrain
Description: Минималистичная тема для BuddyPress: профиль и лента участника, регистрация. Кабинет тренировок, календарь и загрузку FIT-файлов добавляет плагин «Велотренировки» — тема задаёт ему цвета через переменные --vt-*.
Version: 1.22.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: velotrain
Tags: buddypress, minimal, one-column, custom-menu, custom-logo
*/

/* Шрифты подключаются в inc/customizer.php — только выбранные в настройках, из assets/fonts. */

:root {
	--vt-bg: #ffffff;
	--vt-ground: #f1f3f4;
	--vt-ink: #1b2026;
	--vt-muted: #5c6670;
	--vt-line: #dce1e5;
	--vt-field: #bcc4cb;
	--vt-accent: #1f5fa6;
	--vt-accent-hover: #174a82;
	--vt-danger: #b3261e;

	/* Зоны интенсивности — главный цветовой код темы. */
	--vt-z0: #c5ccd2;
	--vt-z1: #8ea2b2;
	--vt-z2: #2f7fc1;
	--vt-z3: #2e9a5f;
	--vt-z4: #e09c0b;
	--vt-z5: #cf412a;

	--vt-on-accent: #ffffff;

	/* Типографика: значения по умолчанию, настройки темы их переопределяют. */
	--vt-font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--vt-font-head: var(--vt-font);
	--vt-scale: 1;
	--vt-leading: 1.55;
	--vt-h1: clamp(1.75rem, 1.25rem + 1.8vw, 2.5rem);
	--vt-h2: 1.5rem;
	--vt-h3: 1.1875rem;
	--vt-h4: 1.0625rem;
	--vt-logo-h: 40px;
	--vt-glass: rgb(255 255 255 / .58);
	--vt-glass-border: rgb(255 255 255 / .7);
	--vt-wrap: 70rem;
	--vt-text: 42rem;
	--vt-radius: 6px;
}

/* Тёмная тема. Цвета кабинета тренировок берутся отсюда же через --vt-*. */
:root[data-theme="dark"] {
	color-scheme: dark;
	--vt-bg: #15181c;
	--vt-ground: #1e2328;
	--vt-ink: #e4e8ec;
	--vt-muted: #9aa5b0;
	--vt-line: #2d343b;
	--vt-field: #48515b;
	--vt-accent: #5d9de6;
	--vt-accent-hover: #7db1ec;
	--vt-on-accent: #0f1720;
	--vt-danger: #f08b80;
	--vt-z0: #4a535c;
	--vt-z1: #8197a8;
	--vt-z2: #4a95d6;
	--vt-z3: #3fb577;
	--vt-z4: #e8ad2c;
	--vt-z5: #e5664f;
	--vt-glass: rgb(24 28 33 / .55);
	--vt-glass-border: rgb(255 255 255 / .08);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; font-size: calc(100% * var(--vt-scale)); }

body {
	margin: 0;
	background: var(--vt-bg);
	color: var(--vt-ink);
	font: 400 1.0625rem/var(--vt-leading) var(--vt-font);
	font-variant-numeric: tabular-nums;
}

img, video { max-width: 100%; height: auto; }

a { color: var(--vt-accent); text-underline-offset: .15em; }
a:hover { color: var(--vt-accent-hover); text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--vt-accent); outline-offset: 2px; }

h1, h2, h3, h4 { margin: 0 0 .6em; font-family: var(--vt-font-head); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: var(--vt-h1); }
h2 { font-size: var(--vt-h2); }
h3 { font-size: var(--vt-h3); }
h4 { font-size: var(--vt-h4); }
p, ul, ol, blockquote, figure { margin: 0 0 1em; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto; clip-path: none;
	width: auto; height: auto;
	top: .5rem; left: .5rem; z-index: 1000;
	padding: .5rem 1rem;
	background: var(--vt-bg);
}

.wrap { max-width: var(--vt-wrap); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Каркас: боковая панель слева, контент справа ---------- */

:root { --vt-sidebar-w: 16.5rem; --vt-top: var(--wp-admin--admin-bar--height, 0px); }

.site-shell { display: grid; grid-template-columns: calc(var(--vt-sidebar-w) + .75rem) minmax(0, 1fr); min-height: 100vh; }
.site-column { display: flex; flex-direction: column; min-width: 0; }
.site-column .site-content { flex: 1; }

.site-sidebar {
	position: sticky;
	top: calc(var(--vt-top) + .75rem);
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	height: calc(100vh - var(--vt-top) - 1.5rem);
	height: calc(100dvh - var(--vt-top) - 1.5rem);
	margin: .75rem 0 .75rem .75rem;
	padding: 1.5rem 1.25rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	border: 1px solid var(--vt-line);
	border-radius: 18px;
	background: var(--vt-bg);
	scrollbar-width: thin;
}

/* Размытый фон: полупрозрачная панель + backdrop-filter. Сквозь неё виден фон страницы
   (пятна или картинка), а на телефоне — прокручиваемый контент. */
.vt-glass .site-sidebar, .vt-glass .site-mobilebar {
	border-color: var(--vt-glass-border);
	background: var(--vt-glass);
	box-shadow: 0 .5rem 2rem rgb(15 23 32 / .08);
	-webkit-backdrop-filter: blur(22px) saturate(1.6);
	backdrop-filter: blur(22px) saturate(1.6);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.vt-glass .site-sidebar, .vt-glass .site-mobilebar { background: var(--vt-bg); }
}

/* Фон страницы. */
.vt-bg-glow::before, .vt-bg-image::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.vt-bg-glow::before {
	background:
		radial-gradient(38rem 30rem at -4% -6%, color-mix(in srgb, var(--vt-accent) 30%, transparent), transparent 70%),
		radial-gradient(30rem 26rem at 8% 92%, color-mix(in srgb, var(--vt-z3) 22%, transparent), transparent 70%),
		radial-gradient(34rem 26rem at 30% 45%, color-mix(in srgb, var(--vt-z4) 12%, transparent), transparent 70%),
		radial-gradient(40rem 30rem at 104% 0%, color-mix(in srgb, var(--vt-accent) 12%, transparent), transparent 70%);
}
.vt-bg-image::before { background: var(--vt-page-image) center / cover no-repeat; }
.vt-bg-image .site-content > .wrap, .vt-bg-image .site-footer > .wrap { border-radius: 18px; background: color-mix(in srgb, var(--vt-bg) 94%, transparent); }
.vt-bg-image .site-content > .wrap { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.vt-bg-image .site-footer { border-top: 0; }
/* Блоки панели не сжимаются: при нехватке высоты панель прокручивается, а не сплющивает логотип и меню. */
.site-sidebar > * { flex-shrink: 0; }
.site-sidebar__top { position: relative; display: flex; align-items: center; justify-content: center; min-height: 2.25rem; text-align: center; }
.site-sidebar__top .site-logo__img { object-position: center; }
.vt-logo-left .site-sidebar__top { justify-content: flex-start; text-align: left; }
.vt-logo-left .site-sidebar__top .site-logo__img { object-position: left center; }
.site-sidebar__close { display: none; position: absolute; top: 50%; right: -.35rem; transform: translateY(-50%); }
.site-sidebar__bottom { margin: auto -.75rem 0; padding-top: 1rem; border-top: 1px solid var(--vt-line); }
.site-mobilebar, .site-backdrop { display: none; }

.site-title { color: var(--vt-ink); font-family: var(--vt-font-head); font-size: 1.125rem; font-weight: 700; line-height: 1.25; text-decoration: none; }
.site-logo { display: block; line-height: 0; }
.site-logo__img { display: block; width: auto; max-width: 100%; height: var(--vt-logo-h); object-fit: contain; object-position: left center; }
.site-logo__img--dark { display: none; }
[data-theme="dark"] .has-dark-logo .site-logo__img--light { display: none; }
[data-theme="dark"] .site-logo__img--dark { display: block; }

/* Карточка пользователя */
.vt-me { display: flex; flex-direction: column; gap: .9rem; }
.vt-me__head { display: flex; align-items: center; gap: .75rem; min-width: 0; color: var(--vt-ink); text-decoration: none; }
.vt-me__avatar { flex: none; width: 3.5rem; height: 3.5rem; overflow: hidden; border-radius: 50%; background: var(--vt-ground); box-shadow: 0 0 0 2px var(--vt-bg), 0 0 0 3px var(--vt-line); }
.vt-me__avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.vt-me__who { display: flex; flex-direction: column; min-width: 0; }
.vt-me__name { display: flex; align-items: center; min-width: 0; font-weight: 600; line-height: 1.3; }
/* Обрезается только имя; бейджи плагинов после него (например, «Тренер») остаются видны. */
.vt-me__name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-me__name > :not(.vt-me__name-text), .vt-member__name > :not(.vt-me__name-text) { flex: none; }
/* Левая панель: имя целиком — перенос по пробелам, длинное слово — по слогам (мягкие переносы vt_hyphenate_ru), иначе — по краю. */
.vt-me__name { align-items: flex-start; }
.vt-me__name { display: block; }
.vt-me__badges { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3rem; }
.vt-me__badges > * { margin: 0 !important; }
.vt-me__name .vt-me__name-text { overflow: visible; white-space: normal; text-overflow: clip; overflow-wrap: break-word; -webkit-hyphens: manual; hyphens: manual; }
.vt-me__handle { overflow: hidden; color: var(--vt-muted); font-size: .875rem; text-overflow: ellipsis; white-space: nowrap; }
.vt-me__head:hover .vt-me__name { color: var(--vt-accent); }

.vt-me__totals { display: flex; flex-direction: column; gap: .3rem; margin-top: -.25rem; color: var(--vt-ink); text-decoration: none; }
.vt-me__totals-head { color: var(--vt-muted); font-size: .6875rem; letter-spacing: .02em; }
.vt-me__totals-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem .6rem; }
.vt-me__total { display: flex; align-items: center; gap: .25rem; min-width: 0; font-size: .75rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.vt-me__total svg { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vt-me__total-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-me__total--road svg { color: var(--vt-accent); }
.vt-me__total--peak svg { color: #2e9a5f; }
.vt-me__total--clock svg { color: var(--vt-muted); }
.vt-me__total--fire svg { color: #e8772e; }
.vt-me__total--bolt svg { color: #d9a400; }
.vt-me__total--heart svg { color: #d6453d; }
.vt-me__totals:hover .vt-me__totals-head { color: var(--vt-accent); }
.vt-me__week { display: flex; flex-direction: column; gap: .35rem; color: var(--vt-muted); font-size: .8125rem; text-decoration: none; }
.vt-me__week:hover { color: var(--vt-ink); }
.vt-me__bar { display: block; height: 4px; overflow: hidden; border-radius: 2px; background: var(--vt-line); }
.vt-me__bar i { display: block; height: 100%; border-radius: 2px; background: var(--vt-z3); }

.vt-mnav ul, .vt-subnav { margin: 0; padding: 0; list-style: none; }
.vt-mnav { margin: 0 -.75rem; }
.vt-mnav a {
	display: flex;
	align-items: center;
	gap: .4rem;
	padding: .4rem .75rem;
	border-radius: var(--vt-radius);
	color: var(--vt-ink);
	font-size: .9375rem;
	text-decoration: none;
}
.vt-mnav a:hover { background: color-mix(in srgb, var(--vt-ink) 6%, transparent); color: var(--vt-ink); }
.vt-mnav .is-current > a { background: color-mix(in srgb, var(--vt-accent) 12%, transparent); box-shadow: inset 3px 0 0 var(--vt-accent); font-weight: 600; }
.vt-subnav { margin: .15rem 0 .35rem .9rem; padding-left: .5rem; border-left: 1px solid var(--vt-line); }
.vt-subnav a { padding: .3rem .6rem; color: var(--vt-muted); font-size: .875rem; }
/* Меню из «Внешний вид → Меню» в тех же стилях */
.vt-mnav .current-menu-item > a { background: color-mix(in srgb, var(--vt-accent) 12%, transparent); box-shadow: inset 3px 0 0 var(--vt-accent); font-weight: 600; }
.vt-mnav .sub-menu { margin: .15rem 0 .35rem .9rem; padding-left: .5rem; border-left: 1px solid var(--vt-line); list-style: none; }
.vt-mnav .sub-menu a { padding: .3rem .6rem; color: var(--vt-muted); font-size: .875rem; }
.vt-mnav .sub-menu .current-menu-item > a { background: none; box-shadow: none; color: var(--vt-accent); }
.site-nav--extra { padding-top: .75rem; border-top: 1px solid var(--vt-line); }
.site-nav--extra a { padding: .35rem .75rem; color: var(--vt-muted); font-size: .9375rem; font-weight: 400; }
.site-nav--extra a:hover { color: var(--vt-ink); }
.site-nav .vt-badge, .site-nav .vt-count { margin-left: .4rem; }
.vt-subnav .is-current > a { background: none; box-shadow: none; color: var(--vt-accent); font-weight: 600; }
.vt-count { margin-left: auto; color: var(--vt-muted); font-size: .8125rem; font-weight: 400; }
.vt-mnav .vt-badge { margin-left: auto; }

/* Профиль другого участника в панели */
.vt-member { display: flex; flex-direction: column; gap: .9rem; padding-top: 1.25rem; border-top: 1px solid var(--vt-line); }
.vt-member__head { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.vt-member__avatar { width: 4rem; height: 4rem; }
.vt-member__name { display: flex; align-items: center; min-width: 0; margin: 0; font-size: 1.0625rem; line-height: 1.3; }
.vt-member__active { color: var(--vt-muted); font-size: .8125rem; }
.vt-member__actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.vt-member__actions .generic-button { margin: 0; }
.vt-member__actions .generic-button a, .vt-member__actions .generic-button button {
	display: inline-block;
	padding: .4rem .75rem;
	border: 0;
	border-radius: var(--vt-radius);
	background: var(--vt-accent);
	color: var(--vt-on-accent);
	font: inherit;
	font-size: .875rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.vt-member__actions .generic-button + .generic-button a, .vt-member__actions .generic-button + .generic-button button {
	background: transparent;
	box-shadow: inset 0 0 0 1px var(--vt-field);
	color: var(--vt-ink);
}

/* Шапка профиля убрана шаблоном; подменю и фильтр ленты теперь в панели — на странице их прячем. */
.bp-user #buddypress #subnav,
.bp-user #buddypress .bp-subnavs,
.bp-user.activity #buddypress .subnav-filters { display: none; }

/* Виджеты в левой панели */
.site-sidebar__widgets { display: flex; flex-direction: column; gap: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--vt-line); font-size: .9375rem; }
.site-sidebar__widgets .widget { margin: 0; min-width: 0; }
.site-sidebar__widgets .widget-title,
.site-sidebar__widgets .widget h2,
.site-sidebar__widgets .widget h3 { margin: 0 0 .6rem; color: var(--vt-muted); font-family: var(--vt-font); font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.site-sidebar__widgets p { margin: 0 0 .6em; }
.site-sidebar__widgets ul, .site-sidebar__widgets ol { margin: 0; padding: 0; list-style: none; }
.site-sidebar__widgets li { margin: 0 0 .45rem; }
.site-sidebar__widgets li ul { margin: .35rem 0 0 .75rem; }
.site-sidebar__widgets a { color: var(--vt-ink); text-decoration: none; }
.site-sidebar__widgets a:hover { color: var(--vt-accent); text-decoration: underline; }
.site-sidebar__widgets img { max-width: 100%; height: auto; border-radius: var(--vt-radius); }
.site-sidebar__widgets img.avatar { border-radius: 50%; }
.site-sidebar__widgets p a, .site-sidebar__widgets .textwidget a { color: var(--vt-accent); text-decoration: underline; text-underline-offset: .15em; }
.site-sidebar__widgets .wp-block-search__inside-wrapper, .site-sidebar__widgets .search-form { display: flex; gap: .4rem; }
.site-sidebar__widgets .search-form label { flex: 1; min-width: 0; margin: 0; }
.site-sidebar__widgets .search-submit { flex: none; margin: 0; padding: .45rem .7rem; font-size: .875rem; }
.site-sidebar__widgets .wp-block-search__input, .site-sidebar__widgets input[type="search"] { min-width: 0; padding: .45rem .6rem; font-size: .9375rem; }
.site-sidebar__widgets .wp-block-search__button { margin: 0; padding: .45rem .7rem; border: 0; border-radius: var(--vt-radius); background: var(--vt-accent); color: var(--vt-on-accent); font: inherit; font-size: .875rem; cursor: pointer; }
.site-sidebar__widgets .wp-block-latest-posts__post-date, .site-sidebar__widgets .post-date { display: block; color: var(--vt-muted); font-size: .8125rem; }
.site-sidebar__widgets table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.site-sidebar__widgets th, .site-sidebar__widgets td { padding: .2rem; text-align: center; }
.site-sidebar__widgets .item-avatar img { width: 32px; height: 32px; }

.vt-badge { min-width: 1.25rem; padding: 0 .35rem; border-radius: 999px; background: var(--vt-z5); color: #fff; font-size: .75rem; font-weight: 600; line-height: 1.25rem; text-align: center; }

.vt-me--guest .vt-me__hello { margin: 0; color: var(--vt-muted); font-size: .9375rem; }
.vt-me__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.vt-button.vt-button--quiet, .vt-button.vt-button--quiet:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--vt-field); color: var(--vt-ink); }
.vt-button.vt-button--quiet:hover { box-shadow: inset 0 0 0 1px var(--vt-ink); }

/* Меню */
.site-nav { margin: 0 -.75rem; }
.site-nav ul { margin: 0; padding: 0; list-style: none; }
.site-nav a {
	display: block;
	padding: .5rem .75rem;
	border-radius: var(--vt-radius);
	color: var(--vt-ink);
	font-weight: 500;
	text-decoration: none;
}
.site-nav a:hover { background: var(--vt-ground); color: var(--vt-ink); }
.site-nav :is(.current-menu-item, .current-menu-ancestor, .current_page_item) > a {
	background: var(--vt-ground);
	box-shadow: inset 3px 0 0 var(--vt-accent);
	color: var(--vt-ink);
	font-weight: 600;
}
.site-nav .sub-menu { margin: .15rem 0 .35rem .75rem; padding-left: .5rem; border-left: 1px solid var(--vt-line); }
.site-nav .sub-menu a { padding: .35rem .6rem; font-size: .9375rem; font-weight: 400; }

/* Переключатель темы */
.vt-theme-toggle {
	display: inline-grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--vt-ink);
	font: inherit;
	cursor: pointer;
}
.vt-theme-toggle:hover { background: var(--vt-ground); }
.vt-theme-toggle--labeled { display: flex; align-items: center; gap: .6rem; width: 100%; height: auto; padding: .5rem .75rem; border-radius: var(--vt-radius); color: var(--vt-muted); font-size: .9375rem; text-align: left; }
.vt-theme-toggle--labeled:hover { color: var(--vt-ink); }
.vt-theme-toggle__sun, [data-theme="dark"] .vt-theme-toggle__moon { display: none; }
[data-theme="dark"] .vt-theme-toggle__sun { display: block; }

/* Узкие экраны: верхняя полоса и выезжающая панель */
@media (max-width: 960px) {
	.site-shell { display: block; }

	.site-mobilebar {
		position: sticky;
		top: var(--vt-top);
		z-index: 20;
		display: flex;
		align-items: center;
		gap: .75rem;
		height: 3.5rem;
		padding: 0 1rem;
		border-bottom: 1px solid var(--vt-line);
		background: var(--vt-bg);
	}
	.site-mobilebar .site-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.site-mobilebar .site-logo__img { max-height: 2.25rem; }
	.site-mobilebar__me img { display: block; width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; }
	.site-menu-button { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .6rem .4rem .35rem; border: 0; border-radius: var(--vt-radius); background: transparent; color: var(--vt-ink); font: inherit; font-size: .9375rem; font-weight: 500; cursor: pointer; }
	.site-menu-button:hover { background: var(--vt-ground); }
	html:not(.js) .site-menu-button { display: none; }

	.js .site-sidebar {
		position: fixed;
		top: var(--vt-top);
		bottom: 0;
		left: 0;
		z-index: 100001; /* Выше панели WordPress (99999). */
		width: min(20rem, 86vw);
		height: auto;
		border-right: 0;
		box-shadow: 0 0 2rem rgb(0 0 0 / .25);
		transform: translateX(-100%);
		visibility: hidden;
		transition: transform .25s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .25s;
		margin: 0;
		border-width: 0 1px 0 0;
		border-radius: 0 18px 18px 0;
	}
	.vt-nav-open .site-sidebar { transform: none; visibility: visible; transition: transform .25s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
	.js .site-sidebar__close { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--vt-ink); cursor: pointer; }
	.site-sidebar__close:hover { background: var(--vt-ground); }
	.js .site-sidebar__top { padding: 0 2.5rem; }
	.js .vt-logo-left .site-sidebar__top { padding-left: 0; }
	.vt-nav-open .site-backdrop { display: block; position: fixed; inset: 0; z-index: 100000; background: rgb(0 0 0 / .3); }
	.vt-nav-open body { overflow: hidden; }

	/* Без JavaScript панель просто стоит над контентом. */
	html:not(.js) .site-sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--vt-line); }
}
/* Страница без боковой панели (настройка записи, страницы входа): панель выезжает по кнопке «Меню». */
.vt-no-sidebar .site-shell { display: block; }

.vt-no-sidebar .site-mobilebar {
	position: sticky;
	top: var(--vt-top);
	z-index: 20;
	display: flex;
	align-items: center;
	gap: .75rem;
	height: 3.5rem;
	padding: 0 1rem;
	border-bottom: 1px solid var(--vt-line);
	background: var(--vt-bg);
}
.vt-no-sidebar .site-mobilebar .site-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-no-sidebar .site-mobilebar .site-logo__img { max-height: 2.25rem; }
.vt-no-sidebar .site-mobilebar__me img { display: block; width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; }
.vt-no-sidebar .site-menu-button { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .6rem .4rem .35rem; border: 0; border-radius: var(--vt-radius); background: transparent; color: var(--vt-ink); font: inherit; font-size: .9375rem; font-weight: 500; cursor: pointer; }
.vt-no-sidebar .site-menu-button:hover { background: var(--vt-ground); }
html:not(.js) .vt-no-sidebar .site-menu-button { display: none; }

.js .vt-no-sidebar .site-sidebar {
	position: fixed;
	top: var(--vt-top);
	bottom: 0;
	left: 0;
	z-index: 100001; /* Выше панели WordPress (99999). */
	width: min(20rem, 86vw);
	height: auto;
	border-right: 0;
	box-shadow: 0 0 2rem rgb(0 0 0 / .25);
	transform: translateX(-100%);
	visibility: hidden;
	transition: transform .25s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .25s;
	margin: 0;
		border-width: 0 1px 0 0;
		border-radius: 0 18px 18px 0;
	}
.vt-nav-open .vt-no-sidebar .site-sidebar { transform: none; visibility: visible; transition: transform .25s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.js .vt-no-sidebar .site-sidebar__close { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--vt-ink); cursor: pointer; }
.js .vt-no-sidebar .site-sidebar__top { padding: 0 2.5rem; }
.js .vt-no-sidebar.vt-logo-left .site-sidebar__top { padding-left: 0; }
.vt-no-sidebar .site-sidebar__close:hover { background: var(--vt-ground); }
.vt-nav-open .vt-no-sidebar .site-backdrop { display: block; position: fixed; inset: 0; z-index: 100000; background: rgb(0 0 0 / .45); }
.vt-nav-open body.vt-no-sidebar { overflow: hidden; }

/* Без JavaScript панель просто стоит над контентом. */
html:not(.js) .vt-no-sidebar .site-sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--vt-line); }
.vt-no-sidebar .site-content { padding-left: 0; padding-right: 0; }

@media (max-width: 600px) {
	/* Панель WordPress на телефоне прокручивается вместе со страницей. */
	.site-mobilebar, .vt-no-sidebar .site-mobilebar { top: 0; }
	.js .site-sidebar, .js .vt-no-sidebar .site-sidebar { top: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.js .site-sidebar, .vt-nav-open .site-sidebar, .js .vt-no-sidebar .site-sidebar { transition: none; }
}

/* Аватары пользователей — всегда круглые. */
img.avatar, .vt-avatar { border-radius: 50%; }

/* ---------- Контент ---------- */

.site-content { padding: 2.5rem 1rem 4rem; }
@media (max-width: 960px) { .site-content { padding: 1.75rem 0 3rem; } }

.page-title, .entry-title { margin-bottom: .5em; }
.entry-content, .entry .entry-meta { max-width: var(--vt-text); }

/* Ширина содержимого страницы («Оформление» → «Ширина содержимого»). */
.vt-width-wide { --vt-wrap: 82rem; --vt-text: 80rem; }
.vt-width-full { --vt-wrap: none; --vt-text: none; }
/* Таблицы и медиа в широком содержимом — не шире колонки, прокрутка у таблиц внутри себя. */
.vt-width-wide .entry-content .wp-block-table, .vt-width-full .entry-content .wp-block-table { overflow-x: auto; }
.entry-content > * { max-width: 100%; }
.entry-meta { color: var(--vt-muted); font-size: .9375rem; }
.entry-thumb { margin: 1.5rem 0; }

.posts-list { max-width: var(--vt-text); }
.post-card { padding: 1.5rem 0; border-top: 1px solid var(--vt-line); }
.post-card__title { margin-bottom: .25rem; font-size: 1.375rem; }
.post-card__title a { color: var(--vt-ink); text-decoration: none; }
.post-card__title a:hover { color: var(--vt-accent); }
.post-card__excerpt p { margin: 0; }
.post-card__more { margin: .75rem 0 0; }
.post-card__more .vt-button { text-decoration: none; }

.pagination .nav-links, .post-navigation .nav-links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 2rem; }

.comments { max-width: var(--vt-text); margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--vt-line); }
.comment-list { padding-left: 0; list-style: none; }
.comment-list .children { list-style: none; }

.site-footer { border-top: 1px solid var(--vt-line); color: var(--vt-muted); font-size: .9375rem; }
.site-footer .wrap { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.site-footer p { margin: 0; }
.site-footer__info { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1.5rem; }
.site-footer__note p { margin: 0; }
.site-footer__note a { color: inherit; }
.site-footer__note a:hover { color: var(--vt-accent); }

/* ---------- Формы ---------- */

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="url"], input[type="search"], input[type="tel"], select, textarea {
	width: 100%;
	max-width: 100%;
	padding: .55rem .7rem;
	border: 1px solid var(--vt-field);
	border-radius: var(--vt-radius);
	background: var(--vt-bg);
	color: inherit;
	font: inherit;
	font-size: 1rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--vt-accent); outline: none; box-shadow: 0 0 0 1px var(--vt-accent); }
input[type="file"] { font: inherit; font-size: .9375rem; }

.vt-button, button[type="submit"]:not(.vt-link), input[type="submit"] {
	display: inline-block;
	padding: .6rem 1.1rem;
	border: 0;
	border-radius: var(--vt-radius);
	background: var(--vt-accent);
	color: var(--vt-on-accent);
	font: 600 .9375rem/1.2 var(--vt-font);
	text-decoration: none;
	cursor: pointer;
}
.vt-button:hover, button[type="submit"]:not(.vt-link):hover, input[type="submit"]:hover { background: var(--vt-accent-hover); color: var(--vt-on-accent); }

/* ---------- BuddyPress (шаблоны Nouveau) ---------- */

.buddypress-wrap { font-size: 1rem; }

.buddypress-wrap .bp-navs { background: transparent; }
.buddypress-wrap .bp-navs ul li a { color: var(--vt-ink); }
.buddypress-wrap .bp-navs ul li a:hover,
.buddypress-wrap .bp-navs ul li.current a,
.buddypress-wrap .bp-navs ul li.selected a { color: var(--vt-accent); background: transparent; opacity: 1; }
.buddypress-wrap .main-navs:not(.dir-navs) li.current a,
.buddypress-wrap .main-navs:not(.dir-navs) li.selected a { box-shadow: inset 0 -2px 0 var(--vt-accent); }
.buddypress-wrap .bp-navs li:not(.current) .count,
.buddypress-wrap .bp-navs li.current .count { background: var(--vt-ground); border: 0; color: var(--vt-muted); }
.buddypress-wrap .bp-subnavs li.current a, .buddypress-wrap .bp-subnavs li.selected a { font-weight: 600; }

.buddypress-wrap .activity-list.item-list,
.buddypress-wrap .bp-list { border: 0; background: transparent; }
.buddypress-wrap .activity-list .activity-item { border-bottom: 1px solid var(--vt-line); box-shadow: none; }
.buddypress-wrap .activity-list .activity-item .activity-content .activity-inner,
.buddypress-wrap .activity-list .activity-item .activity-content blockquote { background: transparent; border: 0; padding-left: 0; }
.buddypress-wrap .item-avatar img.avatar, .buddypress-wrap .activity-avatar img.avatar { border-radius: 50%; }

#buddypress .activity-list li.vt_workout_done .activity-inner { color: var(--vt-ink); font-weight: 500; }

.buddypress-wrap .standard-form label, .buddypress-wrap .standard-form span.label { font-weight: 500; }
.buddypress-wrap .standard-form input[type="text"], .buddypress-wrap .standard-form input[type="email"],
.buddypress-wrap .standard-form input[type="password"], .buddypress-wrap .standard-form textarea,
.buddypress-wrap .standard-form select { border-color: var(--vt-field); border-radius: var(--vt-radius); background: var(--vt-bg); }

.buddypress-wrap .button, .buddypress-wrap button, .buddypress-wrap input[type="submit"],
.buddypress-wrap .generic-button a { border-radius: var(--vt-radius); }
.buddypress-wrap input[type="submit"], .buddypress-wrap .standard-form button[type="submit"] { background: var(--vt-accent); border-color: var(--vt-accent); color: var(--vt-on-accent); }

#buddypress .register-page .register-section { float: none; width: 100%; max-width: 32rem; }

/* ---------- BuddyPress в тёмной теме ----------
   Nouveau задаёт белые фоны с высокой специфичностью, поэтому здесь !important. */

[data-theme="dark"] .buddypress-wrap :is(
	.bp-list, .bp-list > li, .activity-list .activity-item, .activity-update-form, #whats-new-form,
	.bp-navs, .bp-subnavs, .subnav-filters, .select-wrap, .bp-feedback, .bp-tables-user, table, th, td,
	.profile .bp-widget, .item-list-tabs, .activity-comments, .ac-reply-content, .bp-messages-content,
	.standard-form input, .standard-form textarea, .standard-form select, input[type="text"], input[type="search"],
	input[type="email"], textarea, select
) {
	background-color: var(--vt-bg) !important;
	border-color: var(--vt-line) !important;
	color: var(--vt-ink);
}
[data-theme="dark"] .buddypress-wrap :is(.bp-feedback, .activity-inner, .activity-read-more a, .item-meta, .activity-header, .activity-header a, .time-since, .description) { color: var(--vt-ink) !important; }
[data-theme="dark"] .buddypress-wrap :is(.item-meta, .time-since, .description, .activity-header .time-since) { color: var(--vt-muted) !important; }
[data-theme="dark"] .buddypress-wrap .bp-navs li:not(.current):not(.selected) a { color: var(--vt-ink); }
[data-theme="dark"] .buddypress-wrap :is(.button, .generic-button a, button):not([type="submit"]):not(.vt-link):not(.vt-theme-toggle) {
	background: var(--vt-ground) !important;
	border-color: var(--vt-line) !important;
	color: var(--vt-ink) !important;
}
[data-theme="dark"] #buddypress .bp-feedback .bp-icon { background-color: var(--vt-ground); }

/* ---------- Вход, регистрация, восстановление пароля ---------- */

.vt-auth-main { display: flex; justify-content: center; padding: clamp(.5rem, 5vh, 3.5rem) 0; }
.vt-auth-card { width: 100%; max-width: 25rem; }
.vt-auth__title { margin-bottom: .4rem; font-size: var(--vt-h2); }
.vt-auth__lead { margin: 0 0 1.5rem; color: var(--vt-muted); }
.vt-auth__title + .vt-auth-form, .vt-auth__title + .vt-auth-notice { margin-top: 1.25rem; }

.vt-auth-notice { margin: 0 0 1.25rem; padding: .75rem 1rem; border-left: 3px solid var(--vt-z3); border-radius: 0 var(--vt-radius) var(--vt-radius) 0; background: var(--vt-ground); font-size: .9375rem; }
.vt-auth-notice--error { border-left-color: var(--vt-danger); }
.vt-auth-notice ul { margin: 0; padding-left: 1.1rem; }

.vt-auth-form { display: grid; gap: 1.1rem; }
.vt-auth-form p { margin: 0; }
.vt-auth-field { display: grid; gap: .35rem; }
.vt-auth-field label { font-size: .9375rem; font-weight: 500; }
.vt-auth-field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.vt-auth-field__row a { font-size: .875rem; }
.vt-auth-hint { color: var(--vt-muted); font-size: .8125rem; }
.vt-auth-form [aria-invalid="true"] { border-color: var(--vt-danger); }

.vt-pass { position: relative; display: block; }
.vt-pass input { padding-right: 5.5rem; }
.vt-pass__toggle { position: absolute; top: 50%; right: .3rem; padding: .3rem .5rem; border: 0; border-radius: var(--vt-radius); background: transparent; color: var(--vt-accent); font: inherit; font-size: .875rem; cursor: pointer; transform: translateY(-50%); }
.vt-pass__toggle:hover { background: var(--vt-ground); }

.vt-auth-check { display: flex; align-items: flex-start; gap: .55rem; font-size: .9375rem; }
.vt-auth-check input { flex: none; margin: .3rem 0 0; }
.vt-auth-consents { display: grid; gap: .55rem; }
.vt-auth-consents .vt-auth-check { font-size: .875rem; line-height: 1.45; }
.vt-auth-req { color: var(--vt-danger, #cf412a); font-weight: 700; }
.vt-auth-req-note { margin: 0; }
.vt-auth-submit .vt-button { display: block; width: 100%; padding: .8rem 1rem; font-size: 1rem; text-align: center; }

.vt-auth-resend { margin-top: 1rem; color: var(--vt-muted); font-size: .9375rem; }
.vt-link-button { padding: 0; border: 0; background: none; color: var(--vt-accent); font: inherit; text-decoration: underline; cursor: pointer; }
.vt-auth-alt { margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--vt-line); color: var(--vt-muted); font-size: .9375rem; text-align: center; }
.vt-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Сворачиваемые вложенные пункты меню (настройки темы → «Левая панель») */
.vt-fold { position: relative; }
.vt-fold > a { padding-right: 2.5rem; }
.vt-fold__btn {
	position: absolute;
	top: .2rem;
	right: .25rem;
	display: inline-grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: var(--vt-radius);
	background: none;
	color: var(--vt-muted);
	cursor: pointer;
}
.vt-fold .sub-menu .vt-fold__btn { top: .05rem; width: 1.75rem; height: 1.75rem; }
.vt-fold__btn:hover, .vt-fold__btn:focus-visible { background: color-mix(in srgb, var(--vt-ink) 8%, transparent); color: var(--vt-ink); }
.vt-fold__btn:focus-visible { outline: 2px solid var(--vt-accent); outline-offset: 1px; }
.vt-fold__btn svg { transition: transform .15s ease; }
.vt-fold.is-open > .vt-fold__btn svg { transform: rotate(180deg); }
html.js .vt-fold:not(.is-open) > .sub-menu { display: none; }
html:not(.js) .vt-fold__btn { display: none; }
html:not(.js) .vt-fold > a { padding-right: .75rem; }
@media (prefers-reduced-motion: reduce) { .vt-fold__btn svg { transition: none; } }
.vt-subnav .vt-badge + .vt-count, .vt-mnav .vt-badge + .vt-count { margin-left: .35rem; }

/* Приложение (PWA): кнопка установки, плашка-предложение, режим «во весь экран» */
.vt-pwa-install { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .75rem; border: 0; border-radius: var(--vt-radius); background: none; color: var(--vt-muted); font: inherit; font-size: .9375rem; text-align: left; cursor: pointer; }
.vt-pwa-install:hover, .vt-pwa-install:focus-visible { background: var(--vt-ground); color: var(--vt-ink); }
.vt-pwa-install[hidden] { display: none; }
.vt-pwa-banner { position: fixed; left: max(.75rem, env(safe-area-inset-left)); right: max(5.25rem, env(safe-area-inset-right)); bottom: max(.75rem, env(safe-area-inset-bottom)); z-index: 99995; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; max-width: 34rem; padding: .85rem 1rem; border: 1px solid var(--vt-line); border-radius: calc(var(--vt-radius) * 2); background: var(--vt-bg); color: var(--vt-ink); box-shadow: 0 12px 36px rgb(0 0 0 / .2); }
.vt-pwa-banner__body { display: flex; flex: 1 1 14rem; flex-direction: column; gap: .15rem; min-width: 0; }
.vt-pwa-banner__title { font-size: .9375rem; }
.vt-pwa-banner__text { color: var(--vt-muted); font-size: .8125rem; line-height: 1.4; }
.vt-pwa-banner__actions { display: flex; gap: .5rem; }
.vt-pwa-banner button { min-height: 2.5rem; padding: .45rem .9rem; border-radius: var(--vt-radius); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
.vt-pwa-banner__yes { border: 0; background: var(--vt-accent); color: var(--vt-on-accent, #fff); }
.vt-pwa-banner__no { border: 1px solid var(--vt-line); background: none; color: var(--vt-muted); }
.vt-pwa-banner__no:hover { color: var(--vt-ink); }
.vt-nav-open .vt-pwa-banner { display: none; }
@media (display-mode: standalone) { .vt-pwa-install, .vt-pwa-banner { display: none !important; } }
@media print { .vt-pwa-banner { display: none; } }

/* ---------- Окно «Выйти из аккаунта?» (inc/logout.php) ---------- */
.vt-logout { width: min(26rem, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--vt-line); border-radius: calc(var(--vt-radius) * 2); background: var(--vt-bg); color: var(--vt-ink); box-shadow: 0 20px 60px rgb(0 0 0 / .25); }
.vt-logout::backdrop { background: rgb(15 20 25 / .45); backdrop-filter: blur(2px); }
.vt-logout[open] { animation: vt-logout-in .18s ease-out; }
@keyframes vt-logout-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.vt-logout__box { margin: 0; padding: 1.5rem; }
.vt-logout__title { margin: 0 0 .5rem; font-family: var(--vt-font-head); font-size: 1.1875rem; font-weight: 600; }
.vt-logout__text { margin: 0 0 1.25rem; color: var(--vt-muted); }
.vt-logout__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.vt-logout__go, .vt-logout__stay { flex: 1 1 8rem; display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .5rem 1rem; border-radius: var(--vt-radius); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.vt-logout__go { border: 1px solid var(--vt-danger); background: var(--vt-danger); color: #fff; }
.vt-logout__go:hover, .vt-logout__go:focus-visible { filter: brightness(1.08); color: #fff; }
:root[data-theme="dark"] .vt-logout__go { color: #1b0f0e; }
.vt-logout__go[aria-busy="true"] { opacity: .7; pointer-events: none; }
.vt-logout__stay { border: 1px solid var(--vt-field); background: transparent; color: var(--vt-ink); }
.vt-logout__stay:hover { border-color: var(--vt-ink); }
@media (prefers-reduced-motion: reduce) { .vt-logout[open] { animation: none; } }

/* ---------- Иконки подпунктов «Тренировки» (inc/nav-icons.php) ---------- */
.vt-nav-ico { flex: none; width: 1rem; height: 1rem; opacity: .75; }
.vt-subnav--icons a, .vt-menu-has-icon > a { display: flex; align-items: center; gap: .55rem; }
.vt-subnav .is-current > a .vt-nav-ico, .vt-mnav .current-menu-item > a .vt-nav-ico, .vt-subnav a:hover .vt-nav-ico, .vt-mnav a:hover .vt-nav-ico { opacity: 1; }
.vt-nav-text { min-width: 0; }
