/* ============================================================
   MPC Sidebar — единые стили боковой колонки
   Расположение: wp-content/themes/kv/css/mpc-sidebar.css

   Покрывает блоки:
     .mpc-sidebar-block       — обёртка карточки в сайдбаре
     .mpc-recent-list         — "Последние новости"
     .mpc-calendar-wrap       — встроенный календарь WP
     .mpc-archive-picker      — селектор архива (месяц/год → URL)

   Контейнеры (.mpc-*-sidebar) задают позицию sticky и поведение
   на мобильных. У разных шаблонов разные имена контейнера —
   поддерживаем все.
   ============================================================ */

/* Контейнеры сайдбара */
.mpc-cat-sidebar,
.mpc-page-sidebar,
.mpc-arch-sidebar,
.mpc-rasp-sidebar,
.mpc-single-sidebar {
	position: sticky;
	top: 20px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
@media (max-width: 1024px) {
	.mpc-cat-sidebar,
	.mpc-page-sidebar,
	.mpc-arch-sidebar,
	.mpc-rasp-sidebar,
	.mpc-single-sidebar {
		position: static;
		margin-top: 32px;
	}
}
@media (max-width: 767px) {
	.mpc-cat-sidebar,
	.mpc-page-sidebar,
	.mpc-arch-sidebar,
	.mpc-rasp-sidebar,
	.mpc-single-sidebar {
		display: none;
	}
}

/* Блок-карточка */
.mpc-sidebar-block {
	background: var(--mpc-paper);
	border: 1px solid var(--mpc-line);
	border-radius: 16px;
	padding: 18px 18px 16px;
	box-shadow: 0 4px 14px rgba(57, 38, 21, .04);
}

/* Заголовок блока */
.mpc-sidebar-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 22px;
	font-weight: 600;
	color: var(--mpc-blue);
	line-height: 1;
}
.mpc-sidebar-title::before {
	content: "";
	display: block;
	width: 4px;
	height: 18px;
	background: var(--mpc-yellow);
	border-radius: 2px;
}

/* Последние новости */
.mpc-recent-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.mpc-recent-list li {
	margin: 0 0 12px;
}
.mpc-recent-list li:last-child {
	margin-bottom: 0;
}
.mpc-recent-list a {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 12px;
	text-decoration: none;
	color: var(--mpc-ink);
	padding: 6px;
	margin: -6px;
	border-radius: 10px;
	transition: background .15s;
}
.mpc-recent-list a:hover {
	background: rgba(18, 63, 97, .04);
}
.mpc-recent-list .thumb {
	width: 64px;
	height: 64px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--mpc-paper-warm);
}
.mpc-recent-list .thumb img,
.mpc-recent-list .thumb svg {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.mpc-recent-list .info {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}
.mpc-recent-list .ttl {
	font-size: 13.5px;
	line-height: 1.3;
	color: var(--mpc-blue);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.mpc-recent-list .date {
	margin-top: 4px;
	font-size: 11.5px;
	color: var(--mpc-muted);
}

/* Календарь */
.mpc-calendar-wrap table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
.mpc-calendar-wrap caption {
	caption-side: top;
	text-align: left;
	padding: 0 0 10px;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 18px;
	color: var(--mpc-blue);
	font-weight: 600;
}
.mpc-calendar-wrap thead th {
	padding: 6px 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--mpc-muted);
	border-bottom: 1px solid var(--mpc-line);
}
.mpc-calendar-wrap tbody td {
	padding: 6px 0;
	text-align: center;
	color: var(--mpc-muted);
}
.mpc-calendar-wrap tbody td a {
	display: inline-block;
	min-width: 26px;
	padding: 3px 0;
	color: var(--mpc-blue);
	font-weight: 600;
	text-decoration: none;
	border-radius: 6px;
	transition: background .15s;
}
.mpc-calendar-wrap tbody td a:hover {
	background: var(--mpc-yellow);
	color: #fff;
}
.mpc-calendar-wrap tbody td#today {
	font-weight: 700;
	color: var(--mpc-burgundy);
}
.mpc-calendar-wrap tfoot td {
	padding-top: 12px;
	border-top: 1px solid var(--mpc-line);
	font-size: 12px;
}
.mpc-calendar-wrap tfoot td a {
	color: var(--mpc-blue);
	text-decoration: none;
}
.mpc-calendar-wrap tfoot td a:hover {
	color: var(--mpc-burgundy);
}
.mpc-calendar-wrap tfoot td#prev {
	text-align: left;
}
.mpc-calendar-wrap tfoot td#next {
	text-align: right;
}

/* Селектор архива */
.mpc-archive-picker {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.mpc-archive-picker label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--mpc-muted);
	margin-bottom: 4px;
}
.mpc-archive-picker select {
	width: 100%;
	padding: 8px 10px;
	font-family: inherit;
	font-size: 14px;
	color: var(--mpc-ink);
	background: #fff;
	border: 1px solid var(--mpc-line);
	border-radius: 8px;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23123f61' d='M6 8L0 0h12z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 10px center;
	padding-right: 28px;
	cursor: pointer;
}
.mpc-archive-picker select:focus {
	outline: none;
	border-color: var(--mpc-blue);
}
.mpc-archive-picker button {
	grid-column: 1 / -1;
	padding: 10px 14px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
	color: #fff;
	background: var(--mpc-blue);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	transition: background .15s, transform .1s;
}
.mpc-archive-picker button:hover {
	background: var(--mpc-blue-2);
}
.mpc-archive-picker button:active {
	transform: scale(.97);
}