/* Публичният прозорец на чата (mh-chat): иконка долу вдясно и панел ~360×520 px; представка mhcs-. */
.mhcs-btn,
.mhcs-panel,
.mhcs-panel * {
	box-sizing: border-box;
	font-family: inherit;
}

.mhcs-btn[hidden],
.mhcs-panel[hidden],
.mhcs-panel [hidden] {
	display: none !important;
}

.mhcs-btn {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99990;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fc9208;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
	cursor: pointer;
	transition: transform 0.15s ease;
}

.mhcs-btn:hover {
	transform: scale(1.06);
}

.mhcs-btn svg {
	display: block;
	width: 28px;
	height: 28px;
	margin: 0 auto;
	fill: #fff;
}

.mhcs-tochka {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 14px;
	height: 14px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #d63638;
}

.mhcs-panel {
	position: fixed;
	right: 20px;
	bottom: 88px;
	z-index: 99990;
	display: flex;
	flex-direction: column;
	width: 360px;
	height: 520px;
	max-height: calc(100vh - 108px);
	overflow: hidden;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3);
	color: #222;
	font-size: 14px;
	line-height: 1.4;
	animation: mhcs-poyavi 0.18s ease-out;
}

.mhcs-glava {
	display: flex;
	flex: 0 0 auto;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 14px;
	background: #fc9208;
	color: #fff;
}

.mhcs-glava strong {
	display: block;
	font-size: 16px;
}

.mhcs-status {
	margin-top: 2px;
	font-size: 12px;
	opacity: 0.95;
}

.mhcs-zatvori {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.mhcs-zatvori:hover {
	background: rgba(255, 255, 255, 0.2);
}

.mhcs-saglasie {
	flex: 1 1 auto;
	padding: 18px 16px;
	overflow-y: auto;
}

.mhcs-saglasie p {
	margin: 0 0 16px;
}

.mhcs-saglasie a {
	color: #b45f00;
	text-decoration: underline;
}

.mhcs-deystvia {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mhcs-chat {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.mhcs-spisak {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 8px;
	min-height: 0;
	padding: 12px;
	overflow-y: auto;
	background: #f5f6f8;
}

.mhcs-s {
	max-width: 82%;
	padding: 7px 10px;
	border-radius: 10px;
	overflow-wrap: anywhere;
}

.mhcs-vh {
	align-self: flex-end;
	border-bottom-right-radius: 3px;
	background: #fc9208;
	color: #fff;
}

.mhcs-izh {
	align-self: flex-start;
	border-bottom-left-radius: 3px;
	background: #e4e6ea;
	color: #222;
}

.mhcs-etiket {
	margin-bottom: 2px;
	font-size: 11px;
	font-weight: 700;
	color: #555;
}

.mhcs-tekst {
	white-space: pre-wrap;
}

.mhcs-chas,
.mhcs-greshka {
	margin-top: 2px;
	font-size: 11px;
	opacity: 0.85;
	text-align: right;
}

.mhcs-chakat {
	opacity: 0.8;
}

.mhcs-opit {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

.mhcs-forma {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	gap: 6px;
	padding: 10px 12px 12px;
	border-top: 1px solid #dcdfe3;
	background: #fff;
}

.mhcs-poleta {
	display: flex;
	gap: 6px;
}

.mhcs-inp,
.mhcs-pole {
	width: 100%;
	min-width: 0;
	padding: 7px 9px;
	border: 1px solid #c3c7cd;
	border-radius: 6px;
	background: #fff;
	color: #222;
	font-size: 14px;
}

.mhcs-pole {
	resize: none;
}

.mhcs-med {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
}

.mhcs-primaren,
.mhcs-vtorichen {
	padding: 8px 14px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.mhcs-primaren {
	border: 1px solid #fc9208;
	background: #fc9208;
	color: #fff;
}

.mhcs-vtorichen {
	border: 1px solid #c3c7cd;
	background: #fff;
	color: #222;
}

.mhcs-btn:focus-visible,
.mhcs-panel button:focus-visible,
.mhcs-panel a:focus-visible,
.mhcs-panel input:focus-visible,
.mhcs-panel textarea:focus-visible {
	outline: 3px solid #1a5fb4;
	outline-offset: 2px;
}

.mhcs-zatvori:focus-visible {
	outline-color: #fff;
}

@keyframes mhcs-poyavi {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 480px) {
	.mhcs-panel {
		right: 0;
		bottom: 0;
		width: 100%;
		height: calc(100% - 12px);
		max-height: none;
		border-radius: 12px 12px 0 0;
	}

	.mhcs-poleta {
		flex-direction: column;
	}

	/* Иконката не пречи на отворения панел */
	.mhcs-btn[aria-expanded="true"] {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mhcs-btn,
	.mhcs-panel {
		animation: none;
		transition: none;
	}

	.mhcs-btn:hover {
		transform: none;
	}
}
