/* Плавающий чат генерации */
.site-chat {
	--chat-accent: #0179cd;
	--chat-accent-2: #035a9a;
	--chat-bg: #ffffff;
	--chat-soft: #f3f8fc;
	--chat-line: #d7e6f3;
	--chat-text: #1a2b3c;
	--chat-muted: #5f7388;
	position: relative;
	z-index: 12000;
	font-size: 14px;
	line-height: 1.45;
	color: var(--chat-text);
}

.site-chat__fab {
	position: fixed;
	right: 22px;
	bottom: 22px;
	width: 58px;
	height: 58px;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(145deg, var(--chat-accent), var(--chat-accent-2));
	color: #fff;
	box-shadow: 0 10px 28px rgba(1, 121, 205, 0.38);
	cursor: pointer;
	display: grid;
	place-items: center;
	z-index: 12001;
	transition: transform .18s ease, box-shadow .18s ease;
}

.site-chat__fab:hover,
.site-chat__fab:focus-visible {
	transform: translateY(-2px) scale(1.04);
	box-shadow: 0 14px 32px rgba(1, 121, 205, 0.45);
	outline: none;
}

.site-chat__fab-icon {
	display: grid;
	place-items: center;
	line-height: 0;
}

.site-chat__fab-pulse {
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid rgba(1, 121, 205, 0.35);
	animation: site-chat-pulse 2.4s ease-out infinite;
	pointer-events: none;
}

@keyframes site-chat-pulse {
	0% { transform: scale(0.92); opacity: .75; }
	70% { transform: scale(1.18); opacity: 0; }
	100% { transform: scale(1.18); opacity: 0; }
}

.site-chat__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(12, 28, 44, 0.42);
	z-index: 12002;
	backdrop-filter: blur(2px);
}

.site-chat__backdrop[hidden],
.site-chat__panel[hidden],
.site-chat__guest[hidden],
.site-chat__composer[hidden],
.site-chat__emoji[hidden],
.site-chat__attach-preview[hidden],
.site-chat__status[hidden],
.site-chat__compose-bar[hidden],
.site-chat__scroll-down[hidden],
.site-chat__ctx[hidden] {
	display: none !important;
}

.site-chat__panel {
	position: fixed;
	right: 22px;
	bottom: 92px;
	width: min(400px, calc(100vw - 24px));
	height: min(620px, calc(100vh - 120px));
	display: flex;
	flex-direction: column;
	background: var(--chat-bg);
	border: 1px solid var(--chat-line);
	border-radius: 18px;
	box-shadow: 0 22px 50px rgba(16, 48, 78, 0.22);
	overflow: hidden;
	z-index: 12003;
	animation: site-chat-in .2s ease-out;
}

.site-chat__layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	min-height: 0;
	flex: 1 1 auto;
	overflow: hidden;
}

@keyframes site-chat-in {
	from { opacity: 0; transform: translateY(12px) scale(.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.site-chat__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px 12px;
	background: #fff;
	border-bottom: 1px solid var(--chat-line);
}

.site-chat__head-text {
	min-width: 0;
	flex: 1 1 auto;
}

.site-chat__title {
	margin: 0 0 4px;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--chat-text);
	line-height: 1.25;
}

.site-chat__subtitle {
	margin: 0;
	font-size: 14px;
	color: var(--chat-muted);
	line-height: 1.45;
}

.site-chat__fullscreen {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border: 1px solid var(--chat-line);
	border-radius: 12px;
	background: #fff;
	color: var(--chat-accent-2);
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.site-chat__fullscreen:hover,
.site-chat__fullscreen:focus-visible {
	background: var(--chat-soft);
	border-color: #b7d4ea;
	color: var(--chat-accent);
	outline: none;
}

.site-chat__fullscreen:active {
	transform: scale(.96);
}

.site-chat.is-fullscreen .site-chat__fullscreen-icon--expand,
.site-chat:not(.is-fullscreen) .site-chat__fullscreen-icon--collapse {
	display: none;
}

.site-chat.is-fullscreen {
	position: fixed;
	inset: 0;
	z-index: 13000;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	background: #edf3f8;
}

.site-chat.is-fullscreen .site-chat__panel {
	height: 100%;
	max-height: none;
	border-radius: 0;
	box-shadow: none;
}

.site-chat--page.is-fullscreen .site-chat__panel {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 57px;
	height: auto;
	max-height: none;
}

body.site-chat-fullscreen {
	overflow: hidden;
}

.site-chat__close {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--chat-muted);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.site-chat__close:hover {
	background: var(--chat-soft);
	color: var(--chat-text);
}

.site-chat__rooms {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 14px;
	overflow: visible;
	border-bottom: 1px solid var(--chat-line);
	background: #fff;
	min-height: 56px;
	align-items: center;
}

.site-chat__room {
	flex: 0 0 auto;
	border: 1px solid var(--chat-line);
	background: var(--chat-soft);
	color: var(--chat-text);
	border-radius: 999px;
	padding: 8px 14px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	line-height: 1.2;
}

.site-chat__room.is-active {
	background: var(--chat-accent);
	border-color: var(--chat-accent);
	color: #fff;
}

.site-chat__body {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	background: linear-gradient(180deg, #f7fbff 0%, #ffffff 40%);
}

.site-chat__messages {
	height: 100%;
	overflow-y: auto;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.site-chat__empty,
.site-chat__loading {
	margin: auto;
	text-align: center;
	color: var(--chat-muted);
	font-size: 1rem;
	padding: 24px 12px;
}

.site-chat__msg {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr);
	gap: 8px;
	align-items: start;
	max-width: 100%;
}

.site-chat__msg.is-mine {
	grid-template-columns: minmax(0, 1fr) 34px;
}

.site-chat__msg.is-mine .site-chat__avatar {
	grid-column: 2;
	grid-row: 1;
}

.site-chat__msg.is-mine .site-chat__card {
	grid-column: 1;
	grid-row: 1;
	justify-self: end;
	background: #eef6ff;
	border-color: #c5dbef;
}

.site-chat__card {
	width: min(100%, 520px);
	background: #fff;
	border: 1px solid var(--chat-line);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 6px 18px rgba(16, 48, 78, 0.06);
	display: grid;
	gap: 0;
	min-width: 0;
}

.site-chat__card-top {
	padding: 10px 12px 8px;
}

.site-chat__card-body {
	padding: 10px 12px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--chat-text);
	word-break: break-word;
}

.site-chat__card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 12px 10px;
	border-top: 1px solid #eaf1f7;
}

.site-chat__card-time {
	flex-shrink: 0;
	font-size: 12px;
	color: var(--chat-muted);
	white-space: nowrap;
}

.site-chat__bubble-wrap {
	/* legacy: сообщения теперь в .site-chat__card */
	min-width: 0;
}

.site-chat__avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	background: #cfe6f8;
	display: grid;
	place-items: center;
	font-size: .8rem;
	font-weight: 700;
	color: var(--chat-accent-2);
	overflow: hidden;
}

.site-chat__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.site-chat__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--chat-accent-2);
	padding: 0;
}

.site-chat__meta-text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.site-chat__meta-actions {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	flex-shrink: 0;
	opacity: 0;
	transition: opacity .15s ease;
}

.site-chat__msg:hover .site-chat__meta-actions,
.site-chat__msg:focus-within .site-chat__meta-actions {
	opacity: 1;
}

@media (hover: none) {
	.site-chat__meta-actions {
		opacity: 1;
	}
}

.site-chat__msg-more,
.site-chat__msg-del {
	width: 24px;
	height: 24px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--chat-muted);
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	padding: 0;
	display: grid;
	place-items: center;
}

.site-chat__msg-more:hover {
	background: var(--chat-soft);
	color: var(--chat-accent-2);
}

.site-chat__msg-del {
	font-size: 18px;
	font-weight: 700;
}

.site-chat__msg-del:hover {
	background: #fdeaea;
	color: #c0392b;
}

.site-chat__bubble-shell {
	position: relative;
	max-width: 100%;
}

.site-chat__bubble {
	/* legacy shell — контент теперь в .site-chat__card-body */
	display: block;
}

.site-chat__msg.is-deleted .site-chat__card {
	opacity: .75;
}

.site-chat__msg.is-flash .site-chat__card {
	outline: 2px solid var(--chat-accent);
	outline-offset: 2px;
}

.site-chat__copy {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 2;
	width: 26px;
	height: 26px;
	border: 1px solid var(--chat-line);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--chat-accent-2);
	cursor: pointer;
	font-size: 13px;
	line-height: 1;
	display: grid;
	place-items: center;
	padding: 0;
}

.site-chat__copy:hover,
.site-chat__copy.is-copied {
	background: var(--chat-accent);
	border-color: var(--chat-accent);
	color: #fff;
}

.site-chat__date {
	align-self: center;
	margin: 6px 0;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid var(--chat-line);
	color: var(--chat-muted);
	font-size: 12px;
	font-weight: 600;
}

.site-chat__quote {
	display: grid;
	gap: 2px;
	width: 100%;
	margin: 0 0 8px;
	padding: 6px 8px;
	border: 0;
	border-left: 3px solid var(--chat-accent);
	border-radius: 0 8px 8px 0;
	background: rgba(1, 121, 205, 0.08);
	text-align: left;
	cursor: pointer;
	color: inherit;
	font: inherit;
}

.site-chat__quote-name {
	font-size: 12px;
	font-weight: 700;
	color: var(--chat-accent-2);
}

.site-chat__quote-text {
	font-size: 12px;
	color: var(--chat-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.site-chat__edited {
	font-size: 11px;
	color: var(--chat-muted);
	font-weight: 400;
}

.site-chat__deleted {
	color: var(--chat-muted);
	font-style: italic;
}

.site-chat__msg.is-deleted .site-chat__card-body {
	opacity: .85;
}

.site-chat__scroll-down {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 5;
	width: 40px;
	height: 40px;
	border: 1px solid var(--chat-line);
	border-radius: 50%;
	background: #fff;
	color: var(--chat-accent-2);
	box-shadow: 0 4px 14px rgba(16, 48, 78, 0.16);
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
}

.site-chat__scroll-down:hover {
	background: var(--chat-accent);
	border-color: var(--chat-accent);
	color: #fff;
}

.site-chat__ctx {
	position: absolute;
	z-index: 20;
	min-width: 160px;
	padding: 6px;
	border: 1px solid var(--chat-line);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(16, 48, 78, 0.18);
	display: grid;
	gap: 2px;
}

.site-chat__ctx-item {
	border: 0;
	background: transparent;
	text-align: left;
	padding: 9px 10px;
	border-radius: 8px;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	color: var(--chat-text);
}

.site-chat__ctx-item:hover {
	background: var(--chat-soft);
}

.site-chat__ctx-item.is-danger {
	color: #c0392b;
}

.site-chat__compose-bar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
	padding: 8px 10px;
	border-radius: 10px;
	border-left: 3px solid var(--chat-accent);
	background: #eef6ff;
}

.site-chat__compose-bar-text {
	min-width: 0;
	display: grid;
	gap: 2px;
}

.site-chat__compose-bar-text strong {
	font-size: 13px;
	color: var(--chat-accent-2);
}

.site-chat__compose-bar-text span {
	font-size: 12px;
	color: var(--chat-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.site-chat__compose-bar-close {
	border: 0;
	background: transparent;
	color: var(--chat-muted);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.site-chat__prompt {
	display: grid;
	gap: 0;
	margin: 10px 0 4px;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid #cfe0ef;
	background: linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%);
	box-shadow: inset 3px 0 0 var(--chat-accent), 0 4px 14px rgba(1, 121, 205, 0.06);
}

.site-chat__prompt-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 9px 12px;
	background: rgba(255, 255, 255, 0.72);
	border-bottom: 1px solid #d5e4f2;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .02em;
	color: var(--chat-accent-2);
}

.site-chat__prompt-copy {
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 9px;
	background: #fff;
	color: var(--chat-accent-2);
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	box-shadow: 0 1px 2px rgba(26, 43, 60, 0.08);
}

.site-chat__prompt-copy:hover,
.site-chat__prompt-copy.is-copied {
	background: var(--chat-accent);
	color: #fff;
}

.site-chat__prompt-body {
	margin: 0;
	padding: 12px 14px;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 12.5px;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-word;
	color: #1a2b3c;
	max-height: 280px;
	overflow: auto;
}

.site-chat__modal[hidden] {
	display: none !important;
}

.site-chat__modal {
	position: fixed;
	inset: 0;
	z-index: 14000;
	display: grid;
	place-items: center;
	padding: 18px;
}

.site-chat__modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(18, 32, 48, 0.45);
	backdrop-filter: blur(2px);
}

.site-chat__modal-dialog {
	position: relative;
	z-index: 1;
	width: min(560px, 100%);
	max-height: min(84vh, 720px);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 18px;
	border: 1px solid var(--chat-line);
	box-shadow: 0 22px 60px rgba(18, 32, 48, 0.22);
	overflow: hidden;
}

.site-chat__modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--chat-line);
}

.site-chat__modal-head h3 {
	margin: 0;
	font-size: 1.05rem;
	color: var(--chat-text);
}

.site-chat__modal-close {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--chat-muted);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.site-chat__modal-close:hover {
	background: var(--chat-soft);
	color: var(--chat-text);
}

.site-chat__modal-body {
	padding: 14px 16px;
	overflow: auto;
}

.site-chat__modal-label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--chat-text);
}

.site-chat__modal-textarea {
	width: 100%;
	min-height: 220px;
	resize: vertical;
	border: 1px solid var(--chat-line);
	border-radius: 12px;
	padding: 12px 14px;
	font: inherit;
	font-size: 14px;
	line-height: 1.45;
	color: var(--chat-text);
	background: #f8fbfe;
	box-sizing: border-box;
}

.site-chat__modal-textarea:focus {
	outline: none;
	border-color: #9cc7e8;
	box-shadow: 0 0 0 3px rgba(1, 121, 205, 0.12);
	background: #fff;
}

.site-chat__modal-hint {
	margin: 10px 0 0;
	font-size: 12px;
	color: var(--chat-muted);
	line-height: 1.4;
}

.site-chat__modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 12px 16px 16px;
	border-top: 1px solid var(--chat-line);
}

.site-chat__modal-btn {
	border: 0;
	border-radius: 11px;
	padding: 10px 16px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.site-chat__modal-btn--ghost {
	background: var(--chat-soft);
	color: var(--chat-text);
}

.site-chat__modal-btn--primary {
	background: linear-gradient(145deg, var(--chat-accent), var(--chat-accent-2));
	color: #fff;
}

.site-chat__modal-btn--primary:hover {
	filter: brightness(1.05);
}

.site-chat__attach {
	display: block;
	width: 100%;
	margin: 0;
	border-radius: 0;
	overflow: hidden;
	border: 0;
	border-top: 1px solid var(--chat-line);
	border-bottom: 1px solid var(--chat-line);
	background: #e8eef4;
	line-height: 0;
}

.site-chat__attach img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.site-chat__attach[data-ratio="3-4"] {
	aspect-ratio: 3 / 4;
	width: 100%;
	max-height: 420px;
}

.site-chat__attach[data-ratio="1-1"] {
	aspect-ratio: 1 / 1;
	width: 100%;
	max-height: 420px;
}

.site-chat__attach[data-ratio="16-9"] {
	aspect-ratio: 16 / 9;
	width: 100%;
	max-height: 360px;
}

.site-chat__guest {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	gap: 12px;
	padding: 24px;
	text-align: center;
	background: rgba(255, 255, 255, 0.92);
	color: var(--chat-text);
}

.site-chat__guest p {
	margin: 0;
	font-size: 1.05rem;
}

.site-chat__login-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 18px;
	border-radius: 10px;
	background: var(--chat-accent);
	color: #fff !important;
	text-decoration: none !important;
	font-weight: 600;
}

.site-chat__composer {
	border-top: 1px solid var(--chat-line);
	padding: 14px 14px 16px;
	background: #fff;
}

.site-chat__attach-preview {
	position: relative;
	width: 72px;
	margin-bottom: 10px;
}

.site-chat__attach-preview img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 10px;
	border: 1px solid var(--chat-line);
}

.site-chat__attach-remove {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 22px;
	height: 22px;
	border: 0;
	border-radius: 50%;
	background: #d64545;
	color: #fff;
	cursor: pointer;
	line-height: 1;
}

.site-chat__composer-row {
	display: grid;
	grid-template-columns: 44px 44px 44px minmax(0, 1fr) 48px;
	gap: 10px;
	align-items: center;
}

.site-chat__tool {
	width: 44px;
	height: 44px;
	border: 1px solid var(--chat-line);
	border-radius: 12px;
	background: var(--chat-soft);
	display: grid;
	place-items: center;
	cursor: pointer;
	font-size: 1.25rem;
	padding: 0;
	flex-shrink: 0;
	color: var(--chat-accent-2);
}

.site-chat__tool-icon {
	display: block;
}

.site-chat__tool--file {
	margin: 0;
	color: var(--chat-accent-2);
}

.site-chat__composer textarea {
	width: 100%;
	min-height: 56px;
	max-height: 220px;
	resize: none;
	border: 1px solid var(--chat-line);
	border-radius: 14px;
	padding: 12px;
	font: inherit;
	font-size: 13px;
	line-height: 1.4;
	color: var(--chat-text);
	background: #fff;
	box-sizing: border-box;
}

.site-chat__composer textarea:focus {
	outline: 2px solid rgba(1, 121, 205, 0.25);
	border-color: var(--chat-accent);
}

.site-chat__send {
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 14px;
	background: var(--chat-accent);
	color: #fff;
	font-size: 1.15rem;
	cursor: pointer;
	display: grid;
	place-items: center;
	flex-shrink: 0;
}

.site-chat__send:disabled {
	opacity: .55;
	cursor: not-allowed;
}

.site-chat__emoji {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 10px;
	padding: 10px;
	border: 1px solid var(--chat-line);
	border-radius: 12px;
	background: var(--chat-soft);
	max-height: 180px;
	overflow-y: auto;
}

.site-chat__emoji button {
	border: 0;
	background: transparent;
	font-size: 1.35rem;
	cursor: pointer;
	padding: 4px 6px;
	border-radius: 8px;
	line-height: 1;
}

.site-chat__emoji button:hover {
	background: #fff;
}

.site-chat__hint {
	margin: 10px 0 0;
	font-size: .875rem;
	color: var(--chat-muted);
	line-height: 1.4;
}

.site-chat__status {
	margin: 8px 0 0;
	font-size: .95rem;
	color: #b42318;
}

.site-chat__status.is-ok {
	color: #067647;
}

body.gallery-body:is(:not(.studio-body), .studio-gen-skin) > *.site-chat {
	position: relative;
	z-index: 12000;
}

@media (max-width: 640px) {
	.site-chat__fab {
		right: 14px;
		bottom: 14px;
		width: 54px;
		height: 54px;
	}

	.site-chat__panel {
		right: 0;
		bottom: 0;
		width: 100vw;
		height: min(88vh, 100%);
		border-radius: 18px 18px 0 0;
	}
}

/* Страница /chat */
.chat-page {
	display: grid;
	gap: 1.25rem;
	max-width: 1100px;
	margin: 0 auto 2rem;
	font-size: 16px;
}

.site-chat--page {
	position: static;
	z-index: auto;
	font-size: 16px;
	font-family: Arial, Helvetica, sans-serif;
}

.site-chat--page .site-chat__panel {
	position: relative;
	right: auto;
	bottom: auto;
	width: 100%;
	height: min(720px, 78vh);
	animation: none;
	box-shadow: 0 12px 32px rgba(16, 48, 78, 0.12);
}

.site-chat__users {
	border-right: 1px solid var(--chat-line);
	background: #f7fbff;
	padding: 12px 10px;
	overflow-y: auto;
	min-height: 0;
}

.site-chat__users-title {
	margin: 0 0 10px;
	padding: 0 4px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--chat-accent-2);
	font-family: "Roboto Condensed", Roboto, sans-serif;
}

.site-chat__users-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 6px;
}

.site-chat__users-list:empty + .site-chat__users-empty,
.site-chat__users-empty {
	margin: 8px 4px 0;
	font-size: .95rem;
	color: var(--chat-muted);
}

.site-chat__users-list:not(:empty) + .site-chat__users-empty {
	display: none;
}

.site-chat__user {
	display: grid;
	grid-template-columns: 32px 1fr;
	gap: 8px;
	align-items: center;
	padding: 6px 8px;
	border-radius: 10px;
	background: #fff;
	border: 1px solid transparent;
}

.site-chat__user.is-admin {
	background: #fdeeee;
	border-color: #f3c7c7;
	box-shadow: inset 2px 0 0 #e07070;
}

.site-chat__user-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	overflow: hidden;
	background: #cfe6f8;
	display: grid;
	place-items: center;
	font-size: .8rem;
	font-weight: 700;
	color: var(--chat-accent-2);
}

.site-chat__user-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.site-chat__user-meta {
	min-width: 0;
}

.site-chat__user-name {
	display: block;
	font-size: .82rem;
	font-weight: 600;
	color: var(--chat-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.site-chat__user.is-admin .site-chat__user-name {
	color: #8a3a3a;
}

.site-chat__user-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--chat-accent);
	color: #fff;
	font-size: .65rem;
	font-weight: 700;
	line-height: 1.4;
	vertical-align: middle;
}

.site-chat__user-badge--block {
	background: #c0392b;
}

.site-chat__user.is-blocked {
	opacity: .72;
}

.site-chat__user-block {
	margin-top: 4px;
	border: 1px solid var(--chat-line);
	background: #fff;
	border-radius: 6px;
	padding: 2px 6px;
	font-size: 11px;
	cursor: pointer;
	color: var(--chat-accent-2);
}

.site-chat__user-block:hover {
	border-color: #c0392b;
	color: #c0392b;
}

.site-chat__reactions {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
	padding: 2px 0 0;
}

.site-chat__react {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	border: 1px solid var(--chat-line);
	background: #fff;
	border-radius: 999px;
	padding: 2px 8px;
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	line-height: 1.2;
	color: var(--chat-text);
}

.site-chat__react.is-mine {
	background: #e8f4ff;
	border-color: #9fc7e8;
}

.site-chat__react-count {
	font-size: 12px;
	font-weight: 600;
	color: var(--chat-muted);
}

.site-chat__react.is-mine .site-chat__react-count {
	color: var(--chat-accent-2);
}

.site-chat__react-add {
	width: 28px;
	height: 28px;
	border: 1px dashed var(--chat-line);
	border-radius: 50%;
	background: #fff;
	color: var(--chat-muted);
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
}

.site-chat__react-add:hover {
	border-color: var(--chat-accent);
	color: var(--chat-accent);
}

.site-chat__react-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
}

.site-chat__react-pick {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
	font-size: 20px;
}

.site-chat__react-pick:hover {
	background: var(--chat-soft);
}

.site-chat__blocked-note {
	margin: 0 0 10px;
	padding: 10px 12px;
	border-radius: 10px;
	background: #fdeaea;
	color: #a93226;
	font-size: 13px;
}

.site-chat__blocked-note[hidden] {
	display: none !important;
}

.site-chat__msg.is-mine .site-chat__reactions {
	justify-content: flex-start;
}

.site-chat__reactions {
	flex: 1 1 auto;
	min-width: 0;
}

.site-chat__user-status {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: .75rem;
	color: var(--chat-muted);
}

.site-chat__user-status::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #9aa8b8;
}

.site-chat__user.is-online .site-chat__user-status {
	color: #067647;
}

.site-chat__user.is-online .site-chat__user-status::before {
	background: #12b76a;
}

.site-chat__main {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
}

.site-chat__main .site-chat__body {
	flex: 1 1 auto;
}

.chat-page__seo {
	padding: 1rem 1.15rem 1.15rem;
	border: 1px solid #d7e6f3;
	border-radius: 14px;
	background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
	color: #1a2b3c;
}

.chat-page__seo-title {
	margin: 0 0 .55rem;
	font-size: 1.2rem;
	font-weight: 700;
	font-family: "Roboto Condensed", Roboto, sans-serif;
	color: #035a9a;
}

.chat-page__seo-text {
	margin: 0;
	font-size: 1rem;
	line-height: 1.55;
	color: #31485e;
}

.chat-page__seo-keywords {
	margin: .75rem 0 0;
	font-size: .9rem;
	line-height: 1.45;
	color: #5f7388;
}

.chat-page__locked {
	padding: 2rem 1.25rem;
	border: 1px solid #d7e6f3;
	border-radius: 14px;
	background: #fff;
	text-align: center;
}

.chat-page__locked-title {
	margin: 0 0 .75rem;
	font-size: 1.35rem;
	font-family: "Roboto Condensed", Roboto, sans-serif;
	color: #035a9a;
}

.chat-page__locked-text {
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
	color: #31485e;
}

.chat-page__locked-text a {
	color: #0179cd;
}

@media (max-width: 800px) {
	.site-chat__layout {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
	}

	.site-chat__users {
		border-right: 0;
		border-bottom: 1px solid var(--chat-line);
		max-height: 160px;
	}

	.site-chat--page .site-chat__panel {
		height: min(820px, 85vh);
	}
}
