.pbchat {
	--pbchat-width: 50%;
	--pbchat-accent: #4fea9f;
	--pbchat-accent-2: #22b877;
	--pbchat-accent-soft: rgba(79, 234, 159, 0.16);
	--pbchat-accent-line: rgba(79, 234, 159, 0.45);
	--pbchat-panel: rgba(18, 20, 29, 0.72);
	--pbchat-panel-2: rgba(12, 14, 20, 0.55);
	--pbchat-border: rgba(255, 255, 255, 0.09);
	--pbchat-text: #e8e8ef;
	--pbchat-muted: #aeb6d2;
}

.pbchat--hidden {
	display: none !important;
}

/* ==================== Язычок ==================== */

.pbchat__tab {
	position: fixed;
	z-index: 9998;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	border: 1px solid rgba(79, 234, 159, 0.4);
	background: linear-gradient(135deg, var(--pbchat-accent), var(--pbchat-accent-2));
	color: #08150f;
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 0 20px rgba(79, 234, 159, 0.4);
	transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.pbchat__tab:hover {
	box-shadow: 0 0 30px rgba(79, 234, 159, 0.65);
}

.pbchat__tab i {
	font-size: 19px;
}

.pbchat--right .pbchat__tab {
	right: 0;
	border-radius: 14px 0 0 14px;
}

.pbchat--left .pbchat__tab {
	left: 0;
	border-radius: 0 14px 14px 0;
}

.pbchat--right .pbchat__tab:hover {
	transform: translateX(-3px);
}

.pbchat--left .pbchat__tab:hover {
	transform: translateX(3px);
}

.pbchat--top .pbchat__tab {
	top: 90px;
}

.pbchat--middle .pbchat__tab {
	top: 50%;
	transform: translateY(-50%);
}

.pbchat--middle.pbchat--right .pbchat__tab:hover {
	transform: translateY(-50%) translateX(-3px);
}

.pbchat--middle.pbchat--left .pbchat__tab:hover {
	transform: translateY(-50%) translateX(3px);
}

.pbchat--bottom .pbchat__tab {
	bottom: 24px;
}

.pbchat.is-open .pbchat__tab {
	opacity: 0;
	pointer-events: none;
}

/* ==================== Стили язычка ==================== */

.pbchat__tab--glass {
	background: rgba(18, 20, 29, 0.6);
	backdrop-filter: blur(16px) saturate(180%);
	-webkit-backdrop-filter: blur(16px) saturate(180%);
	border-color: rgba(79, 234, 159, 0.3);
	color: #fff;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.pbchat__tab--glass:hover {
	background: rgba(18, 20, 29, 0.8);
	border-color: var(--pbchat-accent);
	box-shadow: 0 0 20px rgba(79, 234, 159, 0.35);
}

.pbchat__tab--solid {
	background: var(--pbchat-accent-2);
	border-color: transparent;
	color: #04140d;
	box-shadow: 0 8px 22px rgba(34, 184, 119, 0.32);
}

.pbchat__tab--solid:hover {
	background: var(--pbchat-accent);
}

.pbchat__tab--outline {
	background: rgba(18, 20, 29, 0.75);
	backdrop-filter: blur(12px);
	border: 1.5px solid var(--pbchat-accent);
	color: var(--pbchat-accent);
	box-shadow: 0 0 15px rgba(79, 234, 159, 0.2);
}

.pbchat__tab--outline:hover {
	background: var(--pbchat-accent-soft);
	box-shadow: 0 0 22px rgba(79, 234, 159, 0.4);
}

.pbchat__tab--neon {
	background: rgba(8, 21, 15, 0.85);
	backdrop-filter: blur(12px);
	border: 1.5px solid var(--pbchat-accent);
	color: var(--pbchat-accent);
	box-shadow: 0 0 16px rgba(79, 234, 159, 0.5), inset 0 0 12px rgba(79, 234, 159, 0.2);
	text-shadow: 0 0 8px rgba(79, 234, 159, 0.6);
}

.pbchat__tab--neon:hover {
	box-shadow: 0 0 26px rgba(79, 234, 159, 0.8), inset 0 0 18px rgba(79, 234, 159, 0.3);
}

.pbchat__tab--minimal {
	background: rgba(18, 20, 29, 0.85);
	backdrop-filter: blur(12px);
	border-color: rgba(255, 255, 255, 0.12);
	color: #aeb6d2;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.pbchat__tab--minimal:hover {
	color: #fff;
	border-color: var(--pbchat-accent-line);
	box-shadow: 0 0 15px rgba(79, 234, 159, 0.25);
}

/* ==================== Форма ==================== */

.pbchat--right .pbchat__tab--shape-pill { border-radius: 999px 0 0 999px; }
.pbchat--left .pbchat__tab--shape-pill { border-radius: 0 999px 999px 0; }
.pbchat__tab--shape-square { border-radius: 0 !important; }

/* ==================== Размер ==================== */

.pbchat__tab--sm {
	padding: 9px 12px;
	font-size: 12px;
	gap: 6px;
}

.pbchat__tab--sm i {
	font-size: 16px;
}

.pbchat__tab--lg {
	padding: 15px 20px;
	font-size: 14.5px;
	gap: 10px;
}

.pbchat__tab--lg i {
	font-size: 22px;
}

.pbchat__tab--vertical {
	flex-direction: column;
	gap: 9px;
	padding: 16px 11px;
}

.pbchat__tab--vertical.pbchat__tab--sm { padding: 13px 9px; gap: 7px; }
.pbchat__tab--vertical.pbchat__tab--lg { padding: 20px 14px; gap: 11px; }

.pbchat__tab--vertical .pbchat__tab-label {
	writing-mode: vertical-rl;
	text-orientation: mixed;
	letter-spacing: 0.06em;
	white-space: nowrap;
}

.pbchat--left .pbchat__tab--vertical .pbchat__tab-label {
	transform: rotate(180deg);
}

.pbchat__tab-dot {
	display: none;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 10.5px;
	font-weight: 800;
	line-height: 19px;
	text-align: center;
}

.pbchat__tab-dot.is-visible {
	display: inline-block;
	animation: pbchatPulse 1.8s ease-in-out infinite;
}

@keyframes pbchatPulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
	50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* ==================== Оверлей и панель ==================== */

.pbchat__overlay {
	position: fixed;
	inset: 0;
	z-index: 9998;
	background: rgba(6, 6, 10, 0.65);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s;
}

.pbchat.is-open .pbchat__overlay {
	opacity: 1;
	visibility: visible;
}

.pbchat__panel {
	position: fixed;
	top: 0;
	bottom: 0;
	z-index: 9999;
	width: var(--pbchat-width);
	max-width: 100%;
	display: flex;
	flex-direction: column;
	background: var(--pbchat-panel);
	backdrop-filter: blur(24px) saturate(180%);
	-webkit-backdrop-filter: blur(24px) saturate(180%);
	border-left: 1px solid var(--pbchat-border);
	box-shadow: -18px 0 50px rgba(0, 0, 0, 0.6);
	transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
	color: var(--pbchat-text);
}

.pbchat--right .pbchat__panel {
	right: 0;
	transform: translateX(100%);
}

.pbchat--left .pbchat__panel {
	left: 0;
	border-left: none;
	border-right: 1px solid var(--pbchat-border);
	box-shadow: 18px 0 50px rgba(0, 0, 0, 0.6);
	transform: translateX(-100%);
}

.pbchat.is-open .pbchat__panel {
	transform: translateX(0);
}

/* ==================== Шапка ==================== */

.pbchat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--pbchat-border);
	background: var(--pbchat-panel-2);
	backdrop-filter: blur(12px);
	flex: 0 0 auto;
}

.pbchat__head-main {
	display: flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
}

.pbchat__head-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--pbchat-accent), var(--pbchat-accent-2));
	color: #08150f;
	font-size: 20px;
	flex: 0 0 auto;
	box-shadow: 0 0 15px rgba(79, 234, 159, 0.4);
}

.pbchat__head-title {
	font-size: 15px;
	font-weight: 800;
	color: #ffffff;
}

.pbchat__head-sub {
	font-size: 11.5px;
	color: var(--pbchat-muted);
	margin-top: 1px;
}

.pbchat__head-actions {
	display: flex;
	gap: 6px;
	flex: 0 0 auto;
}

.pbchat__icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid var(--pbchat-border);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--pbchat-muted);
	font-size: 17px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.pbchat__icon-btn:hover {
	background: rgba(79, 234, 159, 0.15);
	border-color: rgba(79, 234, 159, 0.35);
	color: #fff;
	box-shadow: 0 0 10px rgba(79, 234, 159, 0.2);
}

.pbchat__icon-btn.is-off {
	color: rgba(255, 255, 255, 0.3);
}

/* ==================== Вкладки комнат ==================== */

.pbchat__rooms {
	display: flex;
	gap: 6px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--pbchat-border);
	background: rgba(0, 0, 0, 0.15);
	overflow-x: auto;
	flex: 0 0 auto;
	scrollbar-width: thin;
}

.pbchat__rooms::-webkit-scrollbar {
	height: 3px;
}

.pbchat__rooms::-webkit-scrollbar-thumb {
	background: rgba(79, 234, 159, 0.25);
	border-radius: 3px;
}

.pbchat__room {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid var(--pbchat-border);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.03);
	color: var(--pbchat-muted);
	font-size: 12.5px;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	transition: all 0.2s ease;
}

.pbchat__room:hover {
	color: #fff;
	background: rgba(79, 234, 159, 0.08);
	border-color: rgba(79, 234, 159, 0.3);
}

.pbchat__room.is-active {
	background: linear-gradient(135deg, rgba(79, 234, 159, 0.25), rgba(34, 184, 119, 0.18));
	border-color: var(--pbchat-accent-line);
	color: #fff;
	box-shadow: 0 0 12px rgba(79, 234, 159, 0.25);
}

/* ==================== Закреп ==================== */

.pbchat__pinned {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 11px 14px;
	border-bottom: 1px solid var(--pbchat-border);
	background: rgba(79, 234, 159, 0.07);
	backdrop-filter: blur(8px);
	flex: 0 0 auto;
}

.pbchat__pinned-icon {
	color: var(--pbchat-accent);
	font-size: 16px;
	flex: 0 0 auto;
	filter: drop-shadow(0 0 6px rgba(79, 234, 159, 0.6));
}

.pbchat__pinned-body {
	min-width: 0;
	flex: 1;
}

.pbchat__pinned-author {
	display: block;
	font-size: 11.5px;
	font-weight: 800;
	color: var(--pbchat-accent);
}

.pbchat__pinned-text {
	display: block;
	font-size: 12.5px;
	color: rgba(255, 255, 255, 0.85);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pbchat__pinned-close {
	width: 26px;
	height: 26px;
	font-size: 14px;
	color: var(--pbchat-accent);
}

/* ==================== Лента ==================== */

.pbchat__feed {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 16px 16px 8px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	scrollbar-width: thin;
}

.pbchat__feed::-webkit-scrollbar {
	width: 4px;
}

.pbchat__feed::-webkit-scrollbar-thumb {
	background: rgba(79, 234, 159, 0.25);
	border-radius: 4px;
}

.pbchat__empty {
	margin: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	color: var(--pbchat-muted);
	font-size: 13px;
	text-align: center;
}

.pbchat__empty i {
	font-size: 40px;
	color: var(--pbchat-accent);
	opacity: 0.5;
	filter: drop-shadow(0 0 10px rgba(79, 234, 159, 0.4));
}

.pbchat__msg {
	display: flex;
	gap: 10px;
	max-width: 85%;
	animation: pbchatIn 0.22s ease;
}

@keyframes pbchatIn {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.pbchat__msg--own {
	margin-left: auto;
	flex-direction: row-reverse;
}

.pbchat__msg-avatar {
	position: relative;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pbchat__msg-avatar-img {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	background: rgba(0, 0, 0, 0.3);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.pbchat__msg-frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
}

.pbchat__msg-main {
	min-width: 0;
	position: relative;
}

.pbchat__msg-head {
	display: flex;
	align-items: baseline;
	gap: 7px;
	margin-bottom: 4px;
	flex-wrap: wrap;
}

.pbchat__msg--own .pbchat__msg-head {
	flex-direction: row-reverse;
}

.pbchat__msg-login {
	font-size: 12.5px;
	font-weight: 800;
	color: #ffffff;
	text-decoration: none;
}

.pbchat__msg-login:hover {
	color: var(--pbchat-accent);
	text-decoration: none;
}

.pbchat__msg-date,
.pbchat__msg-edited {
	font-size: 10.5px;
	color: var(--pbchat-muted);
	opacity: 0.7;
}

.pbchat__bubble {
	padding: 11px 15px;
	border-radius: 14px 14px 14px 4px;
	background: rgba(0, 0, 0, 0.25);
	border: 1px solid var(--pbchat-border);
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--pbchat-text);
	word-break: break-word;
	overflow-wrap: anywhere;
	transition: all 0.2s ease;
}

.pbchat__bubble:hover {
	background: rgba(0, 0, 0, 0.35);
	border-color: rgba(255, 255, 255, 0.15);
}

.pbchat__bubble img {
	max-width: 100%;
	border-radius: 8px;
}

.pbchat__bubble .g_sticker,
.pbchat__bubble img.g_sticker,
.pbchat__bubble video.g_sticker {
	width: auto !important;
	height: auto !important;
	max-width: var(--pbchat-sticker, 120px) !important;
	max-height: var(--pbchat-sticker, 120px) !important;
	border-radius: 10px;
	display: block;
}

.pbchat__bubble--sticker {
	padding: 0;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
}

.pbchat__msg--own .pbchat__bubble {
	border-radius: 14px 14px 4px 14px;
	background: linear-gradient(135deg, rgba(79, 234, 159, 0.18), rgba(34, 184, 119, 0.12));
	border-color: rgba(79, 234, 159, 0.35);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pbchat__msg--own .pbchat__bubble:hover {
	border-color: rgba(79, 234, 159, 0.55);
	box-shadow: 0 0 15px rgba(79, 234, 159, 0.2);
}

/* PREMIUM: неоновый контур */
.pbchat__msg--premium .pbchat__bubble {
	position: relative;
	border-color: transparent;
	box-shadow: 0 0 18px rgba(79, 234, 159, 0.3);
}

.pbchat__msg--premium .pbchat__bubble::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1.5px;
	background: conic-gradient(
		from var(--pbchat-ring, 0deg),
		#4fea9f, #22b877, #a8ffdb, #4fea9f, #22b877
	);
	-webkit-mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	mask-composite: exclude;
	pointer-events: none;
	animation: pbchatRing 4s linear infinite;
}

@property --pbchat-ring {
	syntax: '<angle>';
	initial-value: 0deg;
	inherits: false;
}

@keyframes pbchatRing {
	to { --pbchat-ring: 360deg; }
}

@supports not (background: conic-gradient(from var(--x, 0deg), red, blue)) {
	.pbchat__msg--premium .pbchat__bubble::before {
		background: linear-gradient(135deg, #4fea9f, #22b877, #a8ffdb);
	}
}

@supports not ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
	.pbchat__msg--premium .pbchat__bubble::before {
		display: none;
	}

	.pbchat__msg--premium .pbchat__bubble {
		border-color: rgba(79, 234, 159, 0.6);
	}
}

@media (prefers-reduced-motion: reduce) {
	.pbchat__msg--premium .pbchat__bubble::before {
		animation: none;
	}
}

.pbchat__msg--pending .pbchat__bubble {
	opacity: 0.55;
}

.pbchat__reactions {
	display: flex;
	gap: 5px;
	margin-top: 5px;
}

.pbchat__msg--own .pbchat__reactions {
	justify-content: flex-end;
}

.pbchat__reaction {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 9px;
	border: 1px solid var(--pbchat-border);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.25);
	color: var(--pbchat-muted);
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.5;
	cursor: pointer;
	transition: all 0.2s ease;
}

.pbchat__reaction i {
	font-size: 14px;
}

.pbchat__reaction:hover:not(:disabled) {
	background: rgba(79, 234, 159, 0.15);
	border-color: rgba(79, 234, 159, 0.3);
	color: #fff;
}

.pbchat__reaction:disabled {
	cursor: default;
	opacity: 0.75;
}

.pbchat__reaction.is-active[data-value="1"] {
	background: var(--pbchat-accent-soft);
	border-color: var(--pbchat-accent-line);
	color: var(--pbchat-accent);
	box-shadow: 0 0 10px rgba(79, 234, 159, 0.3);
}

.pbchat__reaction.is-active[data-value="-1"] {
	background: rgba(248, 113, 113, 0.14);
	border-color: rgba(248, 113, 113, 0.4);
	color: #f87171;
}

.pbchat__reaction.is-empty {
	opacity: 0;
	pointer-events: none;
}

.pbchat__msg:hover .pbchat__reaction.is-empty {
	opacity: 1;
	pointer-events: auto;
}

.pbchat__msg-tools {
	position: absolute;
	top: 20px;
	display: flex;
	gap: 4px;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.pbchat__msg:not(.pbchat__msg--own) .pbchat__msg-tools {
	right: -66px;
}

.pbchat__msg--own .pbchat__msg-tools {
	left: -66px;
}

.pbchat__msg:hover .pbchat__msg-tools {
	opacity: 1;
}

.pbchat__msg-tool {
	width: 26px;
	height: 26px;
	border: 1px solid var(--pbchat-border);
	border-radius: 8px;
	background: rgba(18, 20, 29, 0.9);
	backdrop-filter: blur(8px);
	color: var(--pbchat-muted);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.pbchat__msg-tool:hover {
	color: #fff;
	border-color: var(--pbchat-accent-line);
	background: var(--pbchat-accent-soft);
}

.pbchat__loader {
	margin: auto;
	display: flex;
	gap: 5px;
}

.pbchat__loader span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--pbchat-accent);
	box-shadow: 0 0 8px rgba(79, 234, 159, 0.8);
	animation: pbchatBounce 1s infinite ease-in-out;
}

.pbchat__loader span:nth-child(2) { animation-delay: 0.15s; }
.pbchat__loader span:nth-child(3) { animation-delay: 0.3s; }

@keyframes pbchatBounce {
	0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
	40% { transform: scale(1); opacity: 1; }
}

/* ==================== Печатает ==================== */

.pbchat__typing {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 16px;
	color: var(--pbchat-muted);
	font-size: 12px;
	flex: 0 0 auto;
}

.pbchat__typing-dots {
	display: inline-flex;
	gap: 3px;
}

.pbchat__typing-dots span {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--pbchat-accent);
	box-shadow: 0 0 6px rgba(79, 234, 159, 0.6);
	animation: pbchatTyping 1.2s infinite ease-in-out;
}

.pbchat__typing-dots span:nth-child(2) { animation-delay: 0.18s; }
.pbchat__typing-dots span:nth-child(3) { animation-delay: 0.36s; }

@keyframes pbchatTyping {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
	30% { transform: translateY(-4px); opacity: 1; }
}

/* ==================== Упоминания ==================== */

.pbchat__mentions {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 8px;
	padding: 6px;
	border: 1px solid var(--pbchat-border);
	border-radius: 12px;
	background: rgba(18, 20, 29, 0.95);
	backdrop-filter: blur(16px);
	max-height: 170px;
	overflow-y: auto;
}

.pbchat__mention {
	padding: 7px 11px;
	border: none;
	border-radius: 8px;
	background: none;
	color: var(--pbchat-muted);
	font-size: 13px;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
	transition: all 0.15s ease;
}

.pbchat__mention:hover,
.pbchat__mention.is-active {
	background: var(--pbchat-accent-soft);
	color: #fff;
}

.pbchat__mention-tag {
	color: var(--pbchat-accent);
	font-weight: 700;
}

.pbchat__mention-tag.is-me {
	padding: 1px 5px;
	border-radius: 5px;
	background: var(--pbchat-accent-soft);
	color: var(--pbchat-accent);
}

/* ==================== Окно ввода ==================== */

.pbchat__composer {
	flex: 0 0 auto;
	padding: 14px 16px 16px;
	border-top: 1px solid var(--pbchat-border);
	background: var(--pbchat-panel-2);
	backdrop-filter: blur(16px);
}

.pbchat__editing {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 8px;
	padding: 7px 12px;
	border-radius: 10px;
	background: rgba(79, 234, 159, 0.12);
	border: 1px solid rgba(79, 234, 159, 0.2);
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
}

.pbchat__editing-cancel {
	margin-left: auto;
	border: none;
	background: none;
	color: #f87171;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.pbchat__input-row {
	display: flex;
	align-items: flex-end;
	gap: 9px;
}

.pbchat__tool-btn {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border: 1px solid var(--pbchat-border);
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.25);
	color: var(--pbchat-muted);
	font-size: 20px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.pbchat__tool-btn:hover {
	background: rgba(79, 234, 159, 0.12);
	border-color: rgba(79, 234, 159, 0.3);
	color: #fff;
}

.pbchat__tool-btn.is-active {
	background: var(--pbchat-accent-soft);
	border-color: var(--pbchat-accent-line);
	color: var(--pbchat-accent);
}

.pbg-smiles-overlay {
	z-index: 10000;
}

.pbg-smiles-panel {
	z-index: 10001;
}

.pbchat__input {
	flex: 1;
	min-height: 44px;
	max-height: 120px;
	padding: 11px 14px;
	border: 1px solid var(--pbchat-border);
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.3);
	color: var(--pbchat-text);
	font-size: 14px;
	line-height: 1.45;
	resize: none;
	outline: none;
	transition: all 0.2s ease;
}

.pbchat__input::placeholder {
	color: var(--pbchat-muted);
	opacity: 0.6;
}

.pbchat__input:focus {
	border-color: var(--pbchat-accent);
	box-shadow: 0 0 15px rgba(79, 234, 159, 0.25);
	background: rgba(0, 0, 0, 0.45);
}

.pbchat__send {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--pbchat-accent), var(--pbchat-accent-2));
	color: #08150f;
	font-size: 19px;
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(79, 234, 159, 0.35);
	transition: all 0.2s ease;
}

.pbchat__send:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(79, 234, 159, 0.55);
}

.pbchat__send:disabled {
	opacity: 0.4;
	cursor: default;
	transform: none;
	box-shadow: none;
}

.pbchat__composer-meta {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-top: 8px;
	font-size: 10.5px;
	color: var(--pbchat-muted);
	opacity: 0.7;
}

.pbchat__counter.is-low {
	color: #f87171;
	font-weight: 700;
	opacity: 1;
}

.pbchat__locked {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 18px 16px;
	border-top: 1px solid var(--pbchat-border);
	background: var(--pbchat-panel-2);
	color: var(--pbchat-muted);
	font-size: 12.5px;
	text-align: center;
}

.pbchat__locked i {
	font-size: 17px;
	color: var(--pbchat-accent);
}

/* ==================== Адаптив ==================== */

@media (max-width: 1100px) {
	.pbchat__panel {
		width: 75%;
	}
}

@media (max-width: 760px) {
	.pbchat__panel {
		width: 100%;
	}

	.pbchat__msg {
		max-width: 92%;
	}

	.pbchat__msg-tools {
		position: static;
		opacity: 1;
		margin-top: 6px;
	}

	.pbchat__msg:not(.pbchat__msg--own) .pbchat__msg-tools,
	.pbchat__msg--own .pbchat__msg-tools {
		right: auto;
		left: auto;
	}

	.pbchat__msg--own .pbchat__msg-tools {
		justify-content: flex-end;
	}

	.pbchat__tab-label {
		display: none;
	}

	.pbchat__hint {
		display: none;
	}

	.pbchat__tool-btn {
		width: 38px;
		height: 42px;
		font-size: 18px;
	}
}