/*
	Карточка публикации (block write): шапка автора, текст, вложения, действия
	и комментарии. Один источник стилей для ленты, стены профиля и страницы записи.
	Подключается глобально и перекрывает прежнее оформление ленты.
*/

.block.write,
.block.Note {
	--pw-surface: #fff;
	--pw-soft: #f6f7fb;
	--pw-border: #e7e9f1;
	--pw-text: #212734;
	--pw-muted: #737d90;
	--pw-accent: #6d5ce6;
	--pw-accent-soft: rgba(109, 92, 230, .1);
	--pw-danger: #d9534f;
	position: relative;
	margin: 0 0 20px 0;
	padding: 0;
	border: 1px solid var(--pw-border);
	border-radius: 22px;
	background: var(--pw-surface);
	box-shadow: 0 10px 26px rgba(33, 39, 52, .05);
	outline: 0;
	transition: box-shadow .18s ease, border-color .18s ease;
}

.block.write:hover,
.block.Note:hover {
	box-shadow: 0 14px 34px rgba(33, 39, 52, .08);
}

html[data-bs-theme="dark"] .block.write,
html[data-bs-theme="dark"] .block.Note {
	--pw-surface: #171b26;
	--pw-soft: #1e2331;
	--pw-border: #2b3243;
	--pw-text: #e8ecf5;
	--pw-muted: #97a1b5;
	--pw-accent-soft: rgba(124, 108, 255, .16);
	box-shadow: 0 14px 30px rgba(6, 9, 16, .34);
}

/* ------------------------------------------------------------------ */
/* Шапка автора                                                        */
/* ------------------------------------------------------------------ */

.block.write .top_panel,
.block.Note .Top-Panel-Profile {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 14px 15px 13px;
}

.block.write .top_panel .avatar {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
	margin: 0;
	border-radius: 50%;
	background: var(--pw-soft);
	box-shadow: inset 0 0 0 1px var(--pw-border);
}

.block.write .top_panel .avatar img {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	object-fit: cover;
}

.block.write .top_panel .avatar.online {
	background: var(--pw-soft);
	box-shadow: inset 0 0 0 2px #25c07a;
}

.block.write .top_panel .avatar.online::after {
	content: '';
	position: absolute;
	right: 1px;
	bottom: 1px;
	width: 12px;
	height: 12px;
	border: 2px solid var(--pw-surface);
	border-radius: 50%;
	background: #25c07a;
}

.block.write .top_panel .info {
	display: grid;
	gap: 2px;
	min-width: 0;
	margin: 0;
}

.block.write .top_panel .info .name {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px;
	color: var(--pw-text);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
}

.block.write .top_panel .info .name a,
.block.write .top_panel .info .name span {
	color: inherit;
	text-decoration: none;
}

.block.write .top_panel .info .name a:hover {
	color: var(--pw-accent);
}

.block.write .top_panel .info .date {
	color: var(--pw-muted);
	font-size: 12px;
	font-weight: 500;
}

.block.write .top_panel .right {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	margin: 0 0 0 auto;
	border: 1px solid transparent;
	border-radius: 12px;
	color: var(--pw-muted);
	cursor: pointer;
	transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.block.write .top_panel .right:hover {
	border-color: var(--pw-border);
	background: var(--pw-soft);
	color: var(--pw-text);
}

/* ------------------------------------------------------------------ */
/* Текст публикации                                                    */
/* ------------------------------------------------------------------ */

.block.write .post-content-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.block.write .content,
.page_write .Note .Content {
	padding: 14px 15px 13px;
	color: var(--pw-text);
	font-size: 15.5px;
	line-height: 1.62;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

.block.write .content p,
.page_write .Note .Content p {
	margin: 0 0 10px;
}

.block.write .content p:last-child,
.page_write .Note .Content p:last-child {
	margin-bottom: 0;
}

.block.write .content a,
.page_write .Note .Content a {
	color: var(--pw-accent);
	text-decoration: none;
	border-bottom: 1px solid color-mix(in srgb, var(--pw-accent) 35%, transparent);
}

.block.write .content img {
	max-width: 100%;
	height: auto;
	border-radius: 16px;
}

/* ------------------------------------------------------------------ */
/* Сворачивание и разворачивание длинного текста (post-expand-toggle) */
/* ------------------------------------------------------------------ */

.block.write > .content.is-collapsed,
.block.write > .post-content-link.is-collapsed .content,
.block.write > a.post-content-link.is-collapsed {
	position: relative !important;
	max-height: 460px !important;
	overflow: hidden !important;
}

.block.write > .content.is-collapsed::after,
.block.write > .post-content-link.is-collapsed .content::after,
.block.write > a.post-content-link.is-collapsed .content::after {
	content: "" !important;
	position: absolute !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	height: 96px !important;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, var(--pw-surface, #ffffff) 92%) !important;
	pointer-events: none !important;
	z-index: 2 !important;
}

html[data-bs-theme="dark"] .block.write > .content.is-collapsed::after,
html[data-bs-theme="dark"] .block.write > .post-content-link.is-collapsed .content::after,
html[data-bs-theme="dark"] .block.write > a.post-content-link.is-collapsed .content::after {
	background: linear-gradient(to bottom, rgba(23, 27, 38, 0) 0%, var(--pw-surface, #171b26) 92%) !important;
}

.block.write > .content.is-expanded,
.block.write > .post-content-link.is-expanded .content,
.block.write > a.post-content-link.is-expanded {
	max-height: none !important;
	overflow: visible !important;
}

.block.write > .content.is-expanded::after,
.block.write > .post-content-link.is-expanded .content::after,
.block.write > a.post-content-link.is-expanded .content::after {
	display: none !important;
}

.block.write .post-expand-toggle,
.feed .list .block.write .post-expand-toggle {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	margin: 2px 16px 14px 16px !important;
	padding: 8px 20px !important;
	border: 1px solid rgba(109, 92, 230, 0.22) !important;
	border-radius: 999px !important;
	background: rgba(109, 92, 230, 0.08) !important;
	color: var(--pw-accent, #6d5ce6) !important;
	font-family: inherit !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: 0.15px !important;
	cursor: pointer !important;
	text-decoration: none !important;
	box-shadow: 0 2px 8px rgba(109, 92, 230, 0.08) !important;
	transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
	position: relative !important;
	z-index: 3 !important;
	user-select: none !important;
	-webkit-tap-highlight-color: transparent !important;
}

.block.write .post-expand-toggle:hover,
.feed .list .block.write .post-expand-toggle:hover {
	background: var(--pw-accent, #6d5ce6) !important;
	border-color: var(--pw-accent, #6d5ce6) !important;
	color: #ffffff !important;
	transform: translateY(-1px) !important;
	box-shadow: 0 6px 18px rgba(109, 92, 230, 0.28) !important;
}

.block.write .post-expand-toggle:hover i,
.feed .list .block.write .post-expand-toggle:hover i {
	color: #ffffff !important;
	transform: translateY(1.5px);
}

.block.write .post-expand-toggle:active,
.feed .list .block.write .post-expand-toggle:active {
	transform: scale(0.97) !important;
	box-shadow: 0 2px 6px rgba(109, 92, 230, 0.2) !important;
}

.block.write .post-expand-toggle:focus-visible,
.feed .list .block.write .post-expand-toggle:focus-visible {
	outline: 2px solid var(--pw-accent, #6d5ce6) !important;
	outline-offset: 3px !important;
	border-radius: 999px !important;
}

.block.write .post-expand-toggle i,
.feed .list .block.write .post-expand-toggle i {
	font-size: 13px !important;
	line-height: 1 !important;
	transition: transform 0.2s ease, color 0.2s ease !important;
	color: currentColor !important;
}

/* Состояние: когда пост развернут (кнопка 'Свернуть') */
.block.write .post-expand-toggle[aria-expanded="true"],
.feed .list .block.write .post-expand-toggle[aria-expanded="true"] {
	background: rgba(115, 125, 144, 0.08) !important;
	border-color: rgba(115, 125, 144, 0.2) !important;
	color: var(--pw-muted, #737d90) !important;
	box-shadow: none !important;
}

.block.write .post-expand-toggle[aria-expanded="true"]:hover,
.feed .list .block.write .post-expand-toggle[aria-expanded="true"]:hover {
	background: var(--pw-soft, #f6f7fb) !important;
	border-color: var(--pw-muted, #737d90) !important;
	color: var(--pw-text, #212734) !important;
	box-shadow: 0 4px 12px rgba(33, 39, 52, 0.08) !important;
}

.block.write .post-expand-toggle[aria-expanded="true"]:hover i,
.feed .list .block.write .post-expand-toggle[aria-expanded="true"]:hover i {
	transform: translateY(-1.5px);
}

/* Dark mode */
html[data-bs-theme="dark"] .block.write .post-expand-toggle,
html[data-bs-theme="dark"] .feed .list .block.write .post-expand-toggle {
	background: rgba(124, 108, 255, 0.14) !important;
	border-color: rgba(124, 108, 255, 0.28) !important;
	color: #a594fd !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

html[data-bs-theme="dark"] .block.write .post-expand-toggle:hover,
html[data-bs-theme="dark"] .feed .list .block.write .post-expand-toggle:hover {
	background: #7c6cff !important;
	border-color: #7c6cff !important;
	color: #ffffff !important;
	box-shadow: 0 6px 20px rgba(124, 108, 255, 0.35) !important;
}

html[data-bs-theme="dark"] .block.write .post-expand-toggle[aria-expanded="true"],
html[data-bs-theme="dark"] .feed .list .block.write .post-expand-toggle[aria-expanded="true"] {
	background: rgba(151, 161, 181, 0.1) !important;
	border-color: rgba(151, 161, 181, 0.22) !important;
	color: var(--pw-muted, #97a1b5) !important;
}

html[data-bs-theme="dark"] .block.write .post-expand-toggle[aria-expanded="true"]:hover,
html[data-bs-theme="dark"] .feed .list .block.write .post-expand-toggle[aria-expanded="true"]:hover {
	background: #252e42 !important;
	border-color: #97a1b5 !important;
	color: var(--pw-text, #e8ecf5) !important;
}

/* ------------------------------------------------------------------ */
/* Вложения                                                           */
/* ------------------------------------------------------------------ */

.block.write .Attachment,
.page_write .Note .Attachment {
	margin-top: 14px;
}

.block.write .Attachment .carousel-item,
.page_write .Note .Attachment .carousel-item {
	height: auto;
	max-height: 520px;
	border-radius: 18px;
	overflow: hidden;
	background: var(--pw-soft);
}

.block.write .Attachment .carousel-item img,
.page_write .Note .Attachment .carousel-item img {
	width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: cover;
	border: 0;
	border-radius: 18px;
}

.block.write .Attachment .carousel-control-prev,
.block.write .Attachment .carousel-control-next {
	width: 12%;
	opacity: .75;
}

.block.write .Attachment .carousel-indicators [data-bs-target] {
	height: 5px;
	border-radius: 999px;
	background: #fff;
}

/* ------------------------------------------------------------------ */
/* Панель действий                                                    */
/* ------------------------------------------------------------------ */

.block.write .content_bottom.post-actions,
.page_write .Note .bottom.post-detail-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 16px;
	padding: 14px 0 0;
	border-top: 1px solid var(--pw-border);
	background: none;
}

.block.write .content_bottom .btn,
.block.write .post-actions .btn,
.page_write .Note .bottom .btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid var(--pw-border);
	border-radius: 13px;
	background: var(--pw-surface);
	color: var(--pw-muted);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.block.write .content_bottom .btn:hover,
.block.write .post-actions .btn:hover,
.page_write .Note .bottom .btn:hover {
	border-color: color-mix(in srgb, var(--pw-accent) 45%, var(--pw-border));
	background: var(--pw-accent-soft);
	color: var(--pw-accent);
	transform: translateY(-1px);
}

.block.write .content_bottom .btn i,
.page_write .Note .bottom .btn i {
	font-size: 15px;
}

/* Активная реакция (лайк/дизлайк/репост) */
.block.write .content_bottom .btn.active,
.block.write .content_bottom .btn.is-active,
.block.write .post-actions .btn.active,
.block.write .post-actions .btn.is-active,
.block.write .content_bottom .btn[data-liked="1"],
.page_write .Note .bottom .btn.active {
	border-color: var(--pw-accent);
	background: var(--pw-accent);
	color: #fff;
}

.block.write .content_bottom .btn.active:hover,
.page_write .Note .bottom .btn.active:hover {
	background: color-mix(in srgb, var(--pw-accent) 88%, #000);
	color: #fff;
}

/* Просмотры — справа, отдельной приглушённой подписью */
.block.write .content_bottom .views {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-left: auto;
	padding: 8px 12px;
	border-radius: 13px;
	background: var(--pw-soft);
	color: var(--pw-muted);
	font-size: 12.5px;
	font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Комментарии к публикации                                            */
/* ------------------------------------------------------------------ */

.block.write .comments {
	margin-top: 14px;
	padding: 16px 0 0;
	border-top: 1px solid var(--pw-border);
	background: none;
}

.block.write .comments .comment {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 10px 0;
}

.block.write .comments .comment + .comment {
	border-top: 1px dashed color-mix(in srgb, var(--pw-border) 80%, transparent);
}

.block.write .comments .comment .avatar img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}

.block.write .comments .comment .info {
	flex: 1;
	min-width: 0;
	display: grid;
	gap: 3px;
}

.block.write .comments .comment .info .name {
	display: flex;
	align-items: center;
	gap: 8px;
}

.block.write .comments .comment .info .name span,
.block.write .comments .comment .info .name a {
	color: var(--pw-text);
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none;
}

.block.write .comments .comment .info .date {
	color: var(--pw-muted);
	font-size: 11.5px;
}

.block.write .comments .comment .text,
.block.write .comments .comment .content {
	color: var(--pw-text);
	font-size: 14px;
	line-height: 1.55;
	overflow-wrap: anywhere;
}

.block.write .comments .comment .right {
	margin-left: auto;
	color: var(--pw-muted);
	font-size: 12px;
}

/* ------------------------------------------------------------------ */
/* Служебные состояния                                                 */
/* ------------------------------------------------------------------ */

/* Закреплённая публикация */
.block.write.is-pinned,
.block.write.pinned {
	border-color: color-mix(in srgb, var(--pw-accent) 40%, var(--pw-border));
	background:
		linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 6%, transparent), transparent 120px),
		var(--pw-surface);
}

.block.write.is-pinned::before,
.block.write.pinned::before {
	content: '';
	position: absolute;
	top: 22px;
	bottom: 22px;
	left: 0;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: var(--pw-accent);
}

/* Подсветка публикации (VIP) */
.block.write.account-profile-highlight,
.block.write.highlight {
	border-color: color-mix(in srgb, var(--pw-accent) 45%, var(--pw-border));
	box-shadow: 0 12px 30px color-mix(in srgb, var(--pw-accent) 14%, transparent);
}

/* ------------------------------------------------------------------ */
/* Мобильная версия                                                    */
/* ------------------------------------------------------------------ */

@media (max-width: 767.98px) {
	.block.write,
	.block.Note {
		padding: 16px 16px 14px;
		border-radius: 18px;
	}

	.block.write .top_panel .avatar {
		flex-basis: 44px;
		width: 44px;
		height: 44px;
	}

	.block.write .top_panel .avatar img {
		width: 38px;
		height: 38px;
	}

	.block.write .content,
	.page_write .Note .Content {
		font-size: 15px;
		line-height: 1.58;
	}

	.block.write .Attachment .carousel-item,
	.block.write .Attachment .carousel-item img {
		max-height: 360px;
		border-radius: 15px;
	}

	.block.write .content_bottom.post-actions {
		gap: 8px;
	}

	.block.write .content_bottom .btn,
	.page_write .Note .bottom .btn {
		flex: 1 1 auto;
		justify-content: center;
		min-height: 44px;
		padding: 10px 12px;
	}

	.block.write .content_bottom .views {
		flex: 1 1 100%;
		justify-content: center;
		margin-left: 0;
	}
}


/* ------------------------------------------------------------------ */
/* Раскладка стены профиля и ленты: отступы задаются изнутри           */
/* ------------------------------------------------------------------ */

.profile-main .block.write {
	padding: 0;
}

.profile-main .block.write .content_bottom {
	padding: 14px 15px 13px;
}

.feed .list .block.write > a.post-content-link .content {
	padding: 14px 15px 13px;
}

/* Шапка автора внутри такой карточки — с теми же боковыми полями */
.profile-main .block.write .top_panel {
	padding: 15px 15px 0;
	margin-bottom: 0;
}

.profile-main .block.write .content,
.feed .list .block.write > a.post-content-link .content {
	margin: 0;
}

.profile-main .block.write .Attachment,
.feed .list .block.write .Attachment {
	padding: 0 15px;
}

.profile-main .block.write .comments {
	padding: 14px 15px 0;
}

/* Пустой текст публикации не занимает места */
.block.write .content:empty,
.block.write .Content:empty,
.page_write .Note .Content:empty,
.feed .list .block.write > a.post-content-link .content:empty {
	display: none;
}


/* ------------------------------------------------------------------ */
/* Отступы частей карточки (заданы изнутри)                             */
/* ------------------------------------------------------------------ */

.block.write .content_bottom.post-actions,
.page_write .Note .bottom.post-detail-actions {
	padding: 14px 15px 13px;
}

.block.write .content,
.page_write .Note .Content {
	padding: 14px 15px 13px;
}

.block.write .top_panel,
.block.Note .Top-Panel-Profile {
	padding: 14px 15px 13px;
	margin: 0;
}

/* Карточка на странице записи не прилипает к следующему блоку */
.block.Note {
	margin-bottom: 1rem;
}

/* VIP-подсветка золотом: собственные отступы не нужны */
.block.Note.vip-hl-gold {
	padding: 0;
}

.block.write .Attachment,
.block.write .comments,
.block.write .post-repost-notice,
.block.write .post-repost-source,
.block.write .gift-shelf {
	margin-left: 15px;
	margin-right: 15px;
}
/* Единый вид метки VIP во всех контекстах */
/* Профиль: .profile-vip-badge (в VIP-теме перекрашивался акцентом)                */
/* Лента и запись: .vip-chip (start.css), причём .name span задавал подписи 16px.  */
/* Селекторы подобраны по специфичности, чтобы обойти оба случая без !important.   */

.feed .list .block.write .top_panel .info .name span.vip-chip,
.block.write .top_panel .info .name span.vip-chip,
.block.Note .Data .Name span.vip-chip,
.block.Profile .Info .Name span.profile-vip-badge,
.account-profile.is-vip[data-vip-theme] .content .info .name span.profile-vip-badge,
.account-profile .content .info .name span.profile-vip-badge,
.block.write span.vip-chip,
.block.Note span.vip-chip,
.page_write .Note span.vip-chip,
.feed .list .block span.vip-chip,
span.vip-chip,
span.profile-vip-badge {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	margin-left: 6px;
	padding: 3px 7px 3px 6px;
	border: 1px solid rgba(190, 137, 23, .42);
	border-radius: 999px;
	background: #f7d777;
	box-shadow: 0 2px 6px rgba(138, 99, 16, .18);
	color: #6d4b08;
	font-size: 9px;
	font-weight: 850;
	letter-spacing: .07em;
	line-height: 1;
	vertical-align: .12em;
	white-space: nowrap;
	overflow: visible;
	text-overflow: clip;
	flex: 0 0 auto;
	text-shadow: none;
	opacity: 1;
}

.feed .list .block.write .top_panel .info .name span.vip-chip > span,
.account-profile.is-vip[data-vip-theme] .content .info .name span.profile-vip-badge > span,
span.vip-chip > span,
span.profile-vip-badge > span {
	display: inline;
	overflow: visible;
	color: #6d4b08;
	font-size: 9px;
	font-weight: 850;
	letter-spacing: .07em;
	line-height: 1;
	white-space: nowrap;
	text-overflow: clip;
	opacity: 1;
}

.feed .list .block.write .top_panel .info .name span.vip-chip > i,
.feed .list .block.write .top_panel .info .name span.vip-chip > .bi,
.account-profile.is-vip[data-vip-theme] .content .info .name span.profile-vip-badge > .bi,
span.vip-chip > i,
span.vip-chip > .bi,
span.profile-vip-badge > i,
span.profile-vip-badge > .bi {
	color: #8d6410;
	opacity: 1;
	font-size: 10px;
	line-height: 1;
}

html[data-bs-theme="dark"] .feed .list .block.write .top_panel .info .name span.vip-chip,
html[data-bs-theme="dark"] .account-profile.is-vip[data-vip-theme] .content .info .name span.profile-vip-badge,
html[data-bs-theme="dark"] .block.write span.vip-chip,
html[data-bs-theme="dark"] span.vip-chip,
html[data-bs-theme="dark"] span.profile-vip-badge {
	border-color: rgba(226, 186, 82, .38);
	background: #6f5313;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
	color: #ffe6a3;
}

html[data-bs-theme="dark"] .feed .list .block.write .top_panel .info .name span.vip-chip > span,
html[data-bs-theme="dark"] .account-profile.is-vip[data-vip-theme] .content .info .name span.profile-vip-badge > span,
html[data-bs-theme="dark"] span.vip-chip > span,
html[data-bs-theme="dark"] span.profile-vip-badge > span,
html[data-bs-theme="dark"] span.vip-chip > i,
html[data-bs-theme="dark"] span.vip-chip > .bi,
html[data-bs-theme="dark"] span.profile-vip-badge > .bi {
	color: #ffd980;
	opacity: 1;
}


/* ------------------------------------------------------------------ */
/* Гарантированные боковые поля для текста постов, тегов и репостов    */
/* ------------------------------------------------------------------ */

.block.write > .content,
.block.write .content,
.page_write .Note .Content,
.feed .list .block.write .content,
.feed .list .block.write > .content,
.feed .list .block.write > a.post-content-link .content,
.tag-feed-page .block.write .content,
.tag-feed-page #feeds .block.write .content,
.profile-main .block.write .content {
	padding: 14px 18px 14px !important;
	box-sizing: border-box !important;
	margin: 0 !important;
}

.block.write > .content[data-write-url],
.post-repost-source-text[data-repost-url] {
	cursor: pointer;
}

.block.write a,
.block.write > .content a,
.block.write > .content[data-write-url] a,
.post-repost-source a,
.post-repost-source-text a,
.post-repost-source-text[data-repost-url] a,
.post-repost-source-text a[href],
.post-card a,
.game-post-embed a {
	cursor: pointer !important;
}

.block.write button,
.block.write .btn,
.post-repost-source-text button {
	cursor: pointer;
}

.block.write .post-repost-source,
.post-repost-source {
	margin-left: 18px !important;
	margin-right: 18px !important;
	padding: 14px 18px !important;
	box-sizing: border-box !important;
}

.post-repost-chain {
	margin-left: 18px !important;
	margin-right: 18px !important;
}

.post-repost-chain-comment {
	padding: 12px 16px !important;
	margin: 0 0 12px !important;
	box-sizing: border-box !important;
}

@media (max-width: 576px) {
	.block.write > .content,
	.block.write .content,
	.page_write .Note .Content,
	.feed .list .block.write .content,
	.feed .list .block.write > .content,
	.feed .list .block.write > a.post-content-link .content,
	.tag-feed-page .block.write .content,
	.tag-feed-page #feeds .block.write .content,
	.profile-main .block.write .content {
		padding: 12px 14px 12px !important;
	}
	.block.write .post-repost-source,
	.post-repost-source {
		margin-left: 12px !important;
		margin-right: 12px !important;
		padding: 12px 14px !important;
	}
	.post-repost-chain {
		margin-left: 12px !important;
		margin-right: 12px !important;
	}
}

/* ------------------------------------------------------------------ */
/* Визуальная карточка репоста игры в посте/ленте/чате                 */
/* ------------------------------------------------------------------ */

.game-post-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 4px 0 8px;
	font-weight: 750;
	color: var(--pw-accent, #6d5ce6) !important;
	text-decoration: none !important;
}

.game-post-link:hover {
	text-decoration: underline !important;
}

.game-post-embed {
	display: flex;
	gap: 16px;
	margin: 14px 0 10px;
	padding: 14px;
	border: 1px solid var(--pw-border, #e3e6ee);
	border-radius: 18px;
	background:
		radial-gradient(ellipse at top right, rgba(109, 92, 230, .08), transparent 55%),
		linear-gradient(135deg, rgba(109, 92, 230, .04), transparent 40%),
		var(--pw-card, #fff);
	box-shadow: 0 10px 24px rgba(33, 39, 52, .05);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
	text-decoration: none !important;
	overflow: hidden;
	box-sizing: border-box;
}

.game-post-embed:hover {
	transform: translateY(-2px);
	border-color: rgba(109, 92, 230, .35);
	box-shadow: 0 14px 30px rgba(109, 92, 230, .14);
}

.game-post-embed-cover {
	position: relative;
	flex: 0 0 140px;
	width: 140px;
	min-height: 120px;
	max-height: 140px;
	border-radius: 14px;
	overflow: hidden;
	display: block;
	background: #11141c;
	text-decoration: none !important;
}

.game-post-embed-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .25s ease;
}

.game-post-embed:hover .game-post-embed-cover img {
	transform: scale(1.06);
}

.game-post-embed-play-pill {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(109, 92, 230, .88);
	color: #fff;
	display: grid;
	place-items: center;
	font-size: 22px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
	transition: transform .18s ease, background .18s ease;
}

.game-post-embed:hover .game-post-embed-play-pill {
	transform: scale(1.12);
	background: #6d5ce6;
}

.game-post-embed-tag {
	position: absolute;
	top: 8px;
	left: 8px;
	padding: 3px 8px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .6);
	backdrop-filter: blur(4px);
	color: #fff;
	font-size: 10.5px;
	font-weight: 750;
	letter-spacing: .02em;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.game-post-embed-content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.game-post-embed-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
	flex-wrap: wrap;
}

.game-post-embed-cat {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	border-radius: 6px;
	background: rgba(109, 92, 230, .10);
	color: var(--pw-accent, #6d5ce6);
	font-size: 11.5px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.game-post-embed-score {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #e5a112;
	font-size: 12.5px;
	font-weight: 750;
}

.game-post-embed-score small {
	color: var(--pw-muted, #737d90);
	font-size: 11px;
	font-weight: 500;
}

.game-post-embed-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.3;
}

.game-post-embed-title a {
	color: var(--pw-text, #212734) !important;
	text-decoration: none !important;
	border: 0 !important;
}

.game-post-embed-title a:hover {
	color: var(--pw-accent, #6d5ce6) !important;
}

.game-post-embed-text {
	margin: 0 0 10px;
	color: var(--pw-muted, #737d90);
	font-size: 12.5px;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.game-post-embed-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
}

.game-post-embed-play-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 16px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 750;
	background: linear-gradient(135deg, #6d5ce6, #8b7cf0);
	border: 0;
	color: #fff !important;
	box-shadow: 0 4px 12px rgba(109, 92, 230, .32);
	text-decoration: none !important;
	transition: transform .16s ease, box-shadow .16s ease;
}

.game-post-embed-play-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(109, 92, 230, .45);
	color: #fff !important;
}

.game-post-embed-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--pw-muted, #737d90);
	font-size: 11.5px;
	font-weight: 600;
}

@media (max-width: 576px) {
	.game-post-embed {
		flex-direction: column;
		gap: 12px;
		padding: 12px;
	}
	.game-post-embed-cover {
		flex: none;
		width: 100%;
		height: 140px;
	}
	.game-post-embed-play-btn {
		width: 100%;
		justify-content: center;
	}
}

.chat-message .game-post-embed {
	flex-direction: column;
	max-width: 280px;
	margin: 6px 0 0;
	padding: 10px;
}

.chat-message .game-post-embed-cover {
	width: 100%;
	height: 120px;
}

html[data-bs-theme="dark"] .game-post-embed {
	background:
		radial-gradient(ellipse at top right, rgba(139, 124, 240, .12), transparent 55%),
		linear-gradient(135deg, rgba(139, 124, 240, .05), transparent 40%),
		var(--pw-card, #1e2430);
	border-color: var(--pw-border, #2d3648);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}

html[data-bs-theme="dark"] .game-post-embed-title a {
	color: #eef1f7 !important;
}

html[data-bs-theme="dark"] .game-post-embed-title a:hover {
	color: #a496f8 !important;
}

html[data-bs-theme="dark"] .game-post-embed-text {
	color: #9ba4b5;
}
