

/* ===== Виджет «Что нового» — самостоятельный блок, не зависит от первого баннера ===== */

:root {
	--news-bg: #F1F2F6;
	--news-icon-bg: #2F4258;
	--news-accent: #B23A3A;
	--news-title: #1F2430;
	--news-text: #5B6270;
	--news-date: #9AA0AC;
}

/* Как и у первого баннера: показываем только там, где есть левое меню */
.gc-main-content:not(.with-left-menu) .top-news-wrapper {
	display: none;
}

.news-widget-wrapper.news-widget--hidden {
	display: none !important;
}

/* На странице-источнике (редактор) — обычный поток, без fixed */
.info-wrapper-news .news-widget-wrapper {
	position: relative !important;
	top: auto !important;
	right: auto !important;
}

.news-widget-wrapper {
	position: fixed !important;
	top: 85px !important;
	right: 20px !important;
	z-index: 998 !important;
	width: 335px !important;
	font-family: inherit !important;
	box-sizing: border-box !important;
}

.news-widget-wrapper *,
.news-widget-wrapper *::before,
.news-widget-wrapper *::after {
	box-sizing: border-box;
}

.news-widget-wrapper a {
	text-decoration: none !important;
	cursor: pointer;
}

/* --- Свёрнутая карточка --- */
.news-widget__head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px;
	background: var(--news-bg);
	border-radius: 4px;
	cursor: pointer;
}

.news-widget__icon {
	flex: 0 0 70px;
	width: 70px;
	height: 70px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--news-icon-bg);
	border-radius: 12px;
}

.news-widget__title {
	flex: 1 1 auto;
	font-size: 16px;
	line-height: 1.4;
	color: var(--news-title);
}

.news-widget__badge {
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--news-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
}

/* --- Крестик --- */
.news-widget__close {
	position: absolute;
	top: -8px;
	right: -6px;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
	color: #000 !important;
	font-size: 16px;
	font-weight: bold;
	line-height: 1;
}

/* --- Раскрывающийся список --- */
.news-widget__list {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.35s ease;
}

.news-widget.is-open .news-widget__list {
	max-height: 900px;
}

.news-widget__body {
	margin-top: 8px;
	padding: 6px 0 4px;
	background: var(--news-bg);
	border-radius: 4px;
}

.news-item {
	display: block;
	padding: 14px 20px 12px;
	color: inherit !important;
}

.news-item:hover .news-item__title {
	color: var(--news-accent);
}

.news-item__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.news-item__title {
	display: block;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--news-title);
	transition: color 0.15s;
}

.news-item__dot {
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	margin-top: 6px;
	border-radius: 50%;
	background: var(--news-accent);
}

.news-item__text {
	display: block;
	margin-top: 4px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--news-text);
}

.news-item__date {
	display: block;
	margin-top: 6px;
	text-align: right;
	font-size: 13px;
	color: var(--news-date);
}

/* --- Стрелка «свернуть» --- */
.news-widget__collapse {
	display: flex;
	justify-content: center;
	padding: 8px 0 6px;
	color: var(--news-date);
	cursor: pointer;
}

.news-widget__collapse:hover {
	color: var(--news-title);
}

/* --- Адаптив --- */
@media (max-width: 768px) {
	.news-widget-wrapper {
		top: 60px !important;
		right: 8px !important;
		width: 300px !important;
		max-width: calc(100vw - 16px) !important;
	}
}

@media (max-width: 560px) {
	.news-widget__head {
		padding: 10px;
		gap: 10px;
	}

	.news-widget__icon {
		flex-basis: 52px;
		width: 52px;
		height: 52px;
	}

	.news-widget__title {
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.news-widget__list {
		transition: none;
	}
}
