/* Музей-Чат: виджет для посетителей */
#museum-chat-widget {
	--mc-color: #1f6feb;
	--mc-radius: 14px;
	position: fixed;
	z-index: 99999;
	right: 22px;
	bottom: 22px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #1f2733;
}

#museum-chat-widget * {
	box-sizing: border-box;
}

/* ---- Кнопка-лапка ---- */
#museum-chat-widget .mc-button {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: var(--mc-color);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#museum-chat-widget .mc-button:hover {
	transform: scale(1.06);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ---- Панель ---- */
#museum-chat-widget .mc-panel {
	position: absolute;
	bottom: 70px;
	right: 0;
	width: 340px;
	max-width: calc(100vw - 32px);
	height: 480px;
	max-height: calc(100vh - 110px);
	background: #fff;
	border-radius: var(--mc-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ---- Шапка ---- */
#museum-chat-widget .mc-head {
	background: var(--mc-color);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}
#museum-chat-widget .mc-head-title {
	font-weight: 700;
	font-size: 16px;
}
#museum-chat-widget .mc-head-subtitle {
	font-size: 12.5px;
	opacity: 0.9;
	margin-top: 2px;
}
#museum-chat-widget .mc-close {
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
	margin-left: 12px;
}
#museum-chat-widget .mc-close:hover { opacity: 1; }

/* ---- Статус ---- */
#museum-chat-widget .mc-status {
	font-size: 12px;
	color: #57606a;
	padding: 8px 16px 0;
	display: flex;
	align-items: center;
	gap: 6px;
}
#museum-chat-widget .mc-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #2da44e;
	display: inline-block;
}

/* ---- Лента ---- */
#museum-chat-widget .mc-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 10px 14px;
}
#museum-chat-widget .mc-log {
	flex: 1;
	overflow-y: auto;
	min-height: 0;
	margin-bottom: 8px;
	scrollbar-width: thin;
}

/* сообщение */
#museum-chat-widget .mc-msg {
	margin: 6px 0;
	display: flex;
	flex-direction: column;
}
#museum-chat-widget .mc-msg-system {
	align-items: center;
	margin: 4px 0;
}
#museum-chat-widget .mc-system {
	background: #f1f2f4;
	color: #57606a;
	font-size: 12px;
	padding: 5px 10px;
	border-radius: 12px;
	max-width: 90%;
	text-align: center;
}
#museum-chat-widget .mc-bubble {
	padding: 9px 12px;
	border-radius: 14px;
	max-width: 85%;
	word-wrap: break-word;
	white-space: pre-wrap;
}
#museum-chat-widget .mc-bubble-label {
	font-size: 11px;
	font-weight: 600;
	margin-bottom: 4px;
	opacity: 0.8;
}
#museum-chat-widget .mc-msg-me { align-items: flex-end; }
#museum-chat-widget .mc-msg-other { align-items: flex-start; }
#museum-chat-widget .mc-msg-me .mc-bubble {
	background: var(--mc-color);
	color: #fff;
	border-bottom-right-radius: 4px;
}
#museum-chat-widget .mc-msg-me .mc-bubble-label { color: #555; }
#museum-chat-widget .mc-msg-other .mc-bubble {
	background: #eceff3;
	color: #1f2733;
	border-bottom-left-radius: 4px;
}

/* стартовый блок */
#museum-chat-widget .mc-start {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 6px;
}
#museum-chat-widget .mc-welcome {
	color: #57606a;
	font-size: 13.5px;
	margin: 0 0 4px;
}
#museum-chat-widget .mc-field,
#museum-chat-widget .mc-input textarea {
	width: 100%;
	border: 1px solid #d0d7de;
	border-radius: 10px;
	padding: 9px 11px;
	font-size: 14px;
	font-family: inherit;
	color: inherit;
	background: #fff;
}
#museum-chat-widget .mc-field:focus,
#museum-chat-widget textarea:focus {
	outline: none;
	border-color: var(--mc-color);
	box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12);
}
#museum-chat-widget .mc-start-btn {
	background: var(--mc-color);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 10px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

/* ---- Ввод ---- */
#museum-chat-widget .mc-input {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	border-top: 1px solid #e6e8eb;
	padding: 10px 14px;
	background: #fafbfc;
}
#museum-chat-widget .mc-input textarea {
	flex: 1;
	resize: none;
	max-height: 120px;
	border-radius: 20px;
	background: #fff;
}
#museum-chat-widget .mc-send {
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	border-radius: 50%;
	background: var(--mc-color);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
#museum-chat-widget .mc-send:hover { filter: brightness(1.05); }

/* ---- Адаптив ---- */
@media (max-width: 480px) {
	#museum-chat-widget .mc-panel {
		right: 8px;
		width: calc(100vw - 16px);
		height: calc(100vh - 100px);
		bottom: 78px;
	}
	#museum-chat-widget {
		right: 12px;
		bottom: 12px;
	}
}