.mchat-app {
	--mchat-accent: #2563eb;
	--mchat-surface: #fff;
	--mchat-sidebar: #f5f7fb;
	--mchat-text: #172033;
	--mchat-border: #d9dee7;
	--mchat-height: 680px;
	position: relative;
	display: grid !important;
	grid-template-columns: minmax(210px, 260px) minmax(0, 1fr) minmax(190px, 230px);
	width: 100%;
	height: var(--mchat-height);
	min-height: 420px;
	overflow: hidden;
	border: 1px solid var(--mchat-border);
	border-radius: 16px;
	background: var(--mchat-surface);
	color: var(--mchat-text);
	font: 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	box-shadow: 0 10px 30px rgba(20, 35, 60, .08);
}

.mchat-app *, .mchat-app *::before, .mchat-app *::after { box-sizing: border-box; }
.mchat-app[hidden], .mchat-app [hidden] { display: none !important; }
.mchat-app button,
.mchat-app input,
.mchat-app textarea,
.mchat-app select {
	box-sizing: border-box !important;
	min-width: 0;
	max-width: none;
	margin: 0;
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
}
.mchat-app button {
	width: auto !important;
	min-height: 36px;
	border: 1px solid transparent;
	border-radius: 8px;
	padding: 8px 11px;
	line-height: 1.2;
	cursor: pointer;
}
.mchat-app button:focus-visible,
.mchat-app input:focus-visible,
.mchat-app textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--mchat-accent) 30%, transparent); outline-offset: 1px; }

.mchat-sidebar,
.mchat-users { min-width: 0; overflow: auto; background: var(--mchat-sidebar); padding: 18px; }
.mchat-sidebar { display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid var(--mchat-border); }
.mchat-users { border-left: 1px solid var(--mchat-border); }
.mchat-brand { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; margin-bottom: 12px; }
.mchat-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.mchat-product, .mchat-users h3 { margin: 0; font-size: 18px; }
.mchat-search input { width: 100%; border: 1px solid #c8d0dc; border-radius: 8px; background: #fff; padding: 9px; color: var(--mchat-text); }
.mchat-send,
.mchat-radio button { border-color: var(--mchat-accent) !important; background: var(--mchat-accent) !important; color: #fff !important; }
.mchat-inbox-search { width: 100%; flex: 0 0 auto; margin-bottom: 10px !important; border: 1px solid #c8d0dc; border-radius: 8px; background: var(--mchat-surface); padding: 9px; color: var(--mchat-text); }
.mchat-people-results { flex: 0 0 auto; max-height: 210px; overflow: auto; margin: 0 -8px 10px; border-bottom: 1px solid var(--mchat-border); padding: 0 8px 9px; }
.mchat-result-heading { display: block; margin: 3px 4px 6px; color: #667085; font-size: 11px; text-transform: uppercase; }
.mchat-person-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 6px 3px; }
.mchat-person-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mchat-person-row button { min-height: 29px !important; border-color: var(--mchat-border) !important; background: var(--mchat-surface) !important; padding: 4px 7px !important; color: var(--mchat-accent) !important; font-size: 11px !important; }
.mchat-inbox-panels { min-height: 0; flex: 1 1 auto; overflow: auto; margin-inline: -8px; }
.mchat-inbox-panel { min-height: 100%; }
.mchat-conversations { display: grid; gap: 2px; }
.mchat-conversation-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-radius: 9px; }
.mchat-conversation-row:hover,
.mchat-conversation-row.is-pinned { background: color-mix(in srgb, var(--mchat-accent) 5%, transparent); }
.mchat-conversation { display: flex; position: relative; align-items: center; gap: 10px; width: 100% !important; min-height: 70px !important; background: transparent !important; padding: 9px 8px !important; color: inherit !important; text-align: left; }
.mchat-conversation:hover,
.mchat-conversation.is-active { background: var(--mchat-surface) !important; color: var(--mchat-accent) !important; }
.mchat-conversation-avatar { display: grid; position: relative; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; overflow: hidden; border-radius: 50%; background: color-mix(in srgb, var(--mchat-accent) 12%, var(--mchat-surface)); color: var(--mchat-accent); font-weight: 700; }
.mchat-conversation-avatar > img { width: 100%; height: 100%; object-fit: cover; }
.mchat-conversation-avatar.is-stack { overflow: visible; }
.mchat-conversation-avatar.is-stack img { position: absolute; width: 29px; height: 29px; border: 2px solid var(--mchat-sidebar); border-radius: 50%; object-fit: cover; }
.mchat-conversation-avatar.is-stack img:nth-child(1) { top: 0; left: 0; }
.mchat-conversation-avatar.is-stack img:nth-child(2) { right: 0; bottom: 0; }
.mchat-conversation-avatar.is-stack img:nth-child(3) { right: 0; top: 0; width: 22px; height: 22px; }
.mchat-conversation-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.mchat-conversation-heading { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 7px; }
.mchat-conversation-heading strong { overflow: hidden; min-width: 0; color: var(--mchat-text); text-overflow: ellipsis; white-space: nowrap; }
.mchat-conversation-heading time { flex: 0 0 auto; color: #7b8495; font-size: 10px; }
.mchat-conversation-copy small { display: -webkit-box; overflow: hidden; color: #667085; font-size: 11px; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.mchat-conversation-pin { display: grid !important; width: 32px !important; min-width: 32px !important; min-height: 32px !important; place-items: center; border: 0 !important; background: transparent !important; padding: 6px !important; color: #7b8495 !important; opacity: .58; }
.mchat-conversation-pin:hover,
.mchat-conversation-pin.is-active { color: var(--mchat-accent) !important; opacity: 1; }
.mchat-conversation-pin:disabled { cursor: default; }
.mchat-conversation-pin .mchat-control-icon { width: 17px; height: 17px; }
.mchat-conversation-pin .mchat-control-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mchat-unread { min-width: 22px; border-radius: 99px; background: var(--mchat-accent); padding: 3px 6px; color: #fff; font-size: 11px; text-align: center; }
.mchat-no-conversations { margin: 30px 12px; color: #667085; text-align: center; }
.mchat-inbox-tabs { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; flex: 0 0 auto; margin: 10px -18px -18px; border-top: 1px solid var(--mchat-border); }
.mchat-inbox-tabs button { position: relative; min-height: 50px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: var(--mchat-text) !important; }
.mchat-inbox-tabs button.is-active { color: var(--mchat-accent) !important; box-shadow: inset 0 3px var(--mchat-accent); }
.mchat-inbox-tabs strong { display: inline-grid; min-width: 19px; height: 19px; margin-right: 5px; place-items: center; border-radius: 50%; background: var(--mchat-accent); color: #fff; font-size: 10px; }

.mchat-main { position: relative; display: flex !important; flex-direction: column; min-width: 0; min-height: 0; background: var(--mchat-surface); }
.mchat-header { display: flex !important; visibility: visible !important; flex: 0 0 auto; align-items: center; gap: 12px; min-height: 70px; border-bottom: 1px solid #e4e8ef; padding: 11px 16px; }
.mchat-room-heading { display: block !important; min-width: 120px; min-height: 0 !important; flex: 1; border: 0 !important; background: transparent !important; padding: 0 !important; color: inherit !important; text-align: left; }
.mchat-title { margin: 0; overflow: hidden; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.mchat-description { margin: 2px 0 0; overflow: hidden; color: #667085; text-overflow: ellipsis; white-space: nowrap; }
.mchat-header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; }
.mchat-header-actions button,
.mchat-mobile-rooms { border-color: #cfd6e0 !important; background: var(--mchat-surface) !important; color: var(--mchat-text) !important; font-size: 12px; }
.mchat-header-actions button:hover,
.mchat-mobile-rooms:hover { border-color: var(--mchat-accent) !important; color: var(--mchat-accent) !important; }
.mchat-mobile-rooms { display: none; }
.mchat-online { color: #15803d; }
.mchat-control-icon { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mchat-control-avatar { width: 25px; height: 25px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; }
.mchat-header-actions button,
.mchat-header .mchat-radio button { display: inline-flex !important; align-items: center; justify-content: center; gap: 5px; }
.mchat-online-avatars { display: none; align-items: center; padding-left: 5px; }
.mchat-online-avatar { display: grid; width: 23px; height: 23px; margin-left: -6px; place-items: center; overflow: hidden; border: 2px solid var(--mchat-surface); border-radius: 50%; background: color-mix(in srgb, var(--mchat-accent) 12%, var(--mchat-surface)); color: var(--mchat-accent); font-size: 9px; font-weight: 700; }
.mchat-online-avatar img { width: 100%; height: 100%; object-fit: cover; }

.mchat-app form.mchat-search { display: flex !important; flex: 0 0 auto; align-items: center; gap: 7px; width: 100% !important; margin: 0 !important; border-bottom: 1px solid #e4e8ef; padding: 9px 14px; }
.mchat-search input { flex: 1; }
.mchat-search button[type="submit"] { background: var(--mchat-accent) !important; color: #fff !important; }
.mchat-search-close { background: transparent !important; color: var(--mchat-text) !important; font-size: 19px; }
.mchat-header .mchat-radio { display: flex !important; flex: 0 1 330px; align-items: center; gap: 6px; min-width: 150px; border: 0; background: transparent; padding: 0; }
.mchat-header .mchat-radio div { display: grid; min-width: 65px; flex: 1; line-height: 1.15; }
.mchat-header .mchat-radio strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mchat-header .mchat-radio span { overflow: hidden; color: #667085; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.mchat-header .mchat-radio input[type="range"] { width: 68px; }
.mchat-header .mchat-radio button { min-width: 38px !important; min-height: 32px !important; padding: 5px 8px !important; font-size: 11px !important; }
.mchat-header .mchat-radio button { width: 38px !important; }
.mchat-header .mchat-radio .mchat-control-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.mchat-pinned { flex: 0 0 auto; border-bottom: 1px solid #e4e8ef; background: #fff9df; padding: 8px 14px; }

.mchat-messages { min-height: 0; flex: 1 1 auto; overflow: auto; padding: 14px 16px; }
.mchat-empty { margin: 60px 0; color: #667085; text-align: center; }
.mchat-app article.mchat-message { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; min-height: 0 !important; margin: 0 0 9px !important; padding: 0 !important; }
.mchat-message.is-mine { margin-left: 8%; }
.mchat-avatar,
.mchat-user-avatar { display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #e9efff; color: var(--mchat-accent); font-weight: 700; }
.mchat-avatar { width: 32px; height: 32px; }
.mchat-avatar img,
.mchat-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mchat-message-content { min-width: 0; }
.mchat-message-meta { display: flex; align-items: center; gap: 8px; margin: 0 0 2px !important; padding: 0 !important; }
.mchat-message-meta time,
.mchat-message-meta small { color: #7b8495; font-size: 11px; }
.mchat-message-body { overflow-wrap: anywhere; white-space: pre-wrap; }
.mchat-quoted { display: block; max-width: 100%; min-height: 0 !important; margin: 0 0 6px !important; border: 0 !important; border-left: 3px solid var(--mchat-accent) !important; border-radius: 0 !important; background: var(--mchat-sidebar) !important; padding: 5px 8px !important; color: #667085 !important; text-align: left; }
.mchat-media { display: block; max-width: min(420px, 100%); max-height: 330px; margin-top: 8px; border-radius: 10px; object-fit: contain; }
.mchat-attachment { display: inline-block; margin-top: 7px; color: var(--mchat-accent); }
.mchat-message-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; opacity: 0; }
.mchat-message:hover .mchat-message-actions,
.mchat-message:focus-within .mchat-message-actions { opacity: 1; }
.mchat-message-actions button,
.mchat-reactions button { min-height: 25px !important; border: 0 !important; background: transparent !important; padding: 3px 6px !important; color: #667085 !important; font-size: 12px; }
.mchat-message-actions button:hover,
.mchat-reactions button:hover,
.mchat-reactions button.is-mine { background: var(--mchat-sidebar) !important; color: var(--mchat-accent) !important; }
.mchat-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mchat-typing { min-height: 22px; flex: 0 0 auto; padding: 0 16px; color: #667085; font-size: 12px; font-style: italic; }
.mchat-reply-preview { display: flex; flex: 0 0 auto; justify-content: space-between; gap: 8px; border-top: 1px solid #e4e8ef; background: var(--mchat-sidebar); padding: 7px 14px; font-size: 12px; }

.mchat-app form.mchat-compose { display: flex !important; flex: 0 0 auto; align-items: flex-end !important; gap: 7px !important; width: 100% !important; max-width: none !important; margin: 0 !important; border-top: 1px solid #e4e8ef; background: var(--mchat-surface); padding: 10px !important; }
.mchat-app form.mchat-compose textarea { display: block !important; width: auto !important; min-width: 120px !important; min-height: 46px !important; max-height: 120px !important; flex: 1 1 0 !important; margin: 0 !important; resize: none; border: 1px solid #c8d0dc !important; border-radius: 10px !important; background: var(--mchat-surface) !important; padding: 11px 12px !important; color: inherit !important; line-height: 1.35 !important; }
.mchat-send { min-width: 68px !important; height: 46px !important; flex: 0 0 auto !important; }
.mchat-compose .mchat-upload,
.mchat-compose .mchat-gif,
.mchat-compose .mchat-emoji { width: 40px !important; min-width: 40px !important; height: 46px !important; min-height: 46px !important; flex: 0 0 40px !important; border-color: #cfd6e0 !important; background: #fff !important; padding: 5px !important; color: var(--mchat-accent) !important; }
.mchat-compose .mchat-gif { width: 44px !important; min-width: 44px !important; flex-basis: 44px !important; font-size: 12px !important; font-weight: 700; }
.mchat-compose .mchat-emoji { font-size: 21px !important; }
.mchat-compose .mchat-upload svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mchat-compose.has-media-preview { flex-wrap: wrap !important; }
.mchat-media-preview { order: -1; display: flex; width: 100%; flex: 1 0 100%; align-items: center; gap: 8px; border: 1px solid var(--mchat-border); border-radius: 9px; background: var(--mchat-sidebar); padding: 6px 8px; }
.mchat-media-preview img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
.mchat-media-preview span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mchat-media-preview button { width: 30px !important; min-width: 30px !important; min-height: 30px !important; padding: 3px !important; }
.mchat-compose .mchat-upload:hover,
.mchat-compose .mchat-gif:hover,
.mchat-compose .mchat-emoji:hover { border-color: var(--mchat-accent) !important; }
.mchat-status { flex: 0 0 auto; min-height: 0; padding: 7px 12px; color: #667085; font-size: 12px; }
.mchat-status:empty { display: none; }
.mchat-status.is-error { background: #fff0f0; color: #b42318; }

.mchat-picker { position: absolute; right: 12px; bottom: 68px; z-index: 40; width: min(390px, calc(100% - 24px)); max-height: 340px; overflow: auto; border: 1px solid var(--mchat-border); border-radius: 12px; background: var(--mchat-surface); padding: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .16); }
.mchat-picker.mchat-profile-menu { top: 62px; right: 12px; bottom: auto; display: grid; grid-template-columns: 1fr; gap: 6px; width: min(280px, calc(100% - 24px)); }
.mchat-profile-menu strong { padding: 4px 5px; }
.mchat-profile-menu button { width: 100% !important; border-color: #cfd6e0 !important; background: #fff !important; color: var(--mchat-text) !important; text-align: left; }
.mchat-profile-form { display: grid; gap: 8px; padding-bottom: 9px; border-bottom: 1px solid var(--mchat-border); }
.mchat-profile-form label { display: grid; gap: 3px; color: #667085; font-size: 11px; }
.mchat-profile-form input { width: 100%; border: 1px solid #c8d0dc; border-radius: 7px; background: #fff; padding: 7px; color: var(--mchat-text); }
.mchat-profile-form button { background: var(--mchat-accent) !important; color: #fff !important; text-align: center; }
.mchat-profile-menu .mchat-logout { margin-top: 5px; border-color: #f3b6b2 !important; color: #b42318 !important; }
.mchat-profile-menu .mchat-manager-title { margin-top: 6px; border-top: 1px solid var(--mchat-border); padding-top: 10px; }
.mchat-profile-menu .mchat-clear-history-action { border-color: #f3b6b2 !important; color: #b42318 !important; }
.mchat-notification-dialog { position: absolute; z-index: 60; inset: 0; display: grid; place-items: center; background: rgba(15, 23, 42, .58); padding: 18px; }
.mchat-notification-dialog[hidden] { display: none; }
.mchat-notification-card { position: relative; width: min(560px, 100%); max-height: calc(100% - 20px); overflow: auto; border: 1px solid var(--mchat-border); border-radius: 15px; background: var(--mchat-surface); padding: 22px; color: var(--mchat-text); box-shadow: 0 24px 70px rgba(0, 0, 0, .28); }
.mchat-notification-card h3 { margin: 0 36px 8px 0; font-size: 21px; }
.mchat-notification-intro { margin: 0 0 18px; color: #667085; line-height: 1.5; }
.mchat-notification-close { position: absolute; top: 12px; right: 12px; width: 34px !important; min-width: 34px !important; height: 34px; border: 1px solid var(--mchat-border) !important; border-radius: 50% !important; background: transparent !important; padding: 0 !important; color: var(--mchat-text) !important; font-size: 22px !important; }
.mchat-notification-form { display: grid; gap: 12px; }
.mchat-notification-form > label { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(150px, .8fr); align-items: center; gap: 12px; border: 1px solid var(--mchat-border); border-radius: 10px; background: var(--mchat-sidebar); padding: 11px 12px; font-weight: 600; }
.mchat-notification-form select { width: 100%; border: 1px solid #c8d0dc; border-radius: 7px; background: var(--mchat-surface); padding: 7px; color: var(--mchat-text); }
.mchat-notification-channel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; border-top: 1px solid var(--mchat-border); padding-top: 13px; }
.mchat-notification-channel strong { color: #667085; font-size: 12px; }
.mchat-notification-channel button { grid-column: 1 / -1; justify-self: start; }
.mchat-notification-channel button { width: 100% !important; max-width: 100% !important; height: auto !important; white-space: normal !important; overflow-wrap: anywhere !important; word-break: normal; line-height: 1.35 !important; text-align: left; }
.mchat-notification-email-state { margin: 0; color: #667085; font-size: 12px; }
.mchat-notification-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.mchat-notification-actions .mchat-notification-save { border-color: var(--mchat-accent) !important; background: var(--mchat-accent) !important; color: #fff !important; }
.mchat-emoji-grid { display: grid !important; grid-template-columns: repeat(8, minmax(34px, 1fr)); gap: 3px; }
.mchat-emoji-grid button { min-height: 38px !important; border: 0 !important; background: transparent !important; padding: 6px !important; color: inherit !important; font-size: 21px; }
.mchat-emoji-grid button:hover { background: var(--mchat-sidebar) !important; }
.mchat-gif-search { display: flex !important; gap: 6px; margin-bottom: 8px; }
.mchat-gif-search input { min-width: 0; flex: 1; padding: 8px; }
.mchat-gif-search button { background: var(--mchat-accent) !important; color: #fff !important; }
.mchat-gif-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.mchat-gif-grid button { min-height: 0 !important; border: 0 !important; background: transparent !important; padding: 0 !important; }
.mchat-gif-grid img { display: block; width: 100%; height: 90px; border-radius: 6px; object-fit: cover; }
.mchat-gif-credit { display: block; margin-top: 8px; color: #667085; text-align: right; }

.mchat-access { position: relative; z-index: 5; max-height: calc(100% - 58px); flex: 0 0 auto; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--mchat-border); background: var(--mchat-sidebar); padding: 10px; -webkit-overflow-scrolling: touch; }
.mchat-access-card { width: min(720px, 100%); margin: 0 auto; border: 0; border-radius: 10px; background: var(--mchat-surface); padding: 12px 14px; box-shadow: none; }
.mchat-access-card h3 { margin: 0 0 5px; }
.mchat-access-card > p { margin: 0 0 10px; color: #667085; font-size: 13px; }
.mchat-access-card form { display: grid !important; grid-template-columns: repeat(2, minmax(150px, 1fr)); align-items: end; gap: 8px; margin: 0 !important; }
.mchat-access-card .mchat-consent { grid-column: 1 / -1; }
.mchat-access-card form > label { display: grid; gap: 4px; }
.mchat-access-card input { width: 100%; border: 1px solid #c8d0dc; border-radius: 8px; padding: 9px; }
.mchat-access-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.mchat-access-actions button { min-width: 0 !important; min-height: 50px !important; border-color: #c8d0dc !important; background: var(--mchat-sidebar) !important; padding: 7px 9px !important; color: var(--mchat-text) !important; font-size: 12px !important; font-weight: 600; line-height: 1.2 !important; white-space: normal !important; overflow-wrap: anywhere; }
.mchat-access-actions button.is-active { border-color: var(--mchat-accent) !important; background: var(--mchat-accent) !important; color: #fff !important; }
.mchat-social-login { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 10px; color: #667085; font-size: 12px; }
.mchat-social-providers { display: flex; align-items: center; gap: 7px; }
.mchat-social-provider { display: flex; align-items: center; }
.mchat-social-provider .nsl-container { margin: 0 !important; padding: 0 !important; }
.mchat-social-provider .nsl-container-buttons { display: flex !important; margin: 0 !important; padding: 0 !important; }
.mchat-social-provider .nsl-button { margin: 0 !important; }
.mchat-access-error { margin-top: 10px; border-radius: 7px; background: #fff0f0; padding: 9px 11px; color: #b42318; }
.mchat-consent-label { display: flex !important; align-items: flex-start; gap: 7px; font-size: 12px; }
.mchat-consent-label input { width: auto; margin-top: 2px; }

.mchat-user-list { display: grid; gap: 8px; margin-top: 14px; }
.mchat-drawer-close { display: none !important; }
.mchat-user { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; border-radius: 9px; background: var(--mchat-surface); padding: 8px; }
.mchat-user > span:not(.mchat-user-avatar):not(.mchat-user-tools) { min-width: 0; overflow-wrap: anywhere; }
.mchat-user-avatar { width: 30px; height: 30px; }
.mchat-user i { color: #16a34a; font-size: 10px; }
.mchat-user-tools { display: flex; flex-wrap: wrap; gap: 4px; grid-column: 2 / -1; }
.mchat-user-tools button { min-height: 28px !important; padding: 3px 7px !important; font-size: 11px !important; }
.mchat-role { display: block; color: #667085; }

.mchat-conversation-info { position: absolute; z-index: 55; top: 0; right: 0; bottom: 0; width: min(390px, 100%); overflow: auto; border-left: 1px solid var(--mchat-border); background: var(--mchat-surface); padding: 24px 18px; box-shadow: -12px 0 30px rgba(15, 23, 42, .12); }
.mchat-info-close { position: sticky; z-index: 2; top: 0; float: right; width: 36px !important; min-width: 36px !important; border-color: var(--mchat-border) !important; background: var(--mchat-surface) !important; font-size: 22px !important; }
.mchat-info-summary { display: grid; justify-items: center; gap: 6px; clear: both; padding: 8px 0 20px; text-align: center; }
.mchat-info-summary .mchat-conversation-avatar { width: 72px; height: 72px; }
.mchat-info-summary h2, .mchat-conversation-info h3 { margin: 0; }
.mchat-info-summary p { margin: 0; color: #667085; }
.mchat-info-notifications { display: grid; gap: 5px; margin-bottom: 18px; }
.mchat-info-notifications select, .mchat-info-search { width: 100%; border: 1px solid #c8d0dc; border-radius: 8px; background: var(--mchat-surface); padding: 9px; color: inherit; }
.mchat-info-search { margin: 10px 0; }
.mchat-info-members, .mchat-info-add { display: grid; gap: 5px; }
.mchat-info-add { margin-bottom: 10px; border-bottom: 1px solid var(--mchat-border); padding-bottom: 10px; }
.mchat-info-member { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 8px; border-radius: 9px; background: var(--mchat-sidebar); padding: 8px; }
.mchat-info-member .mchat-user-avatar { width: 38px; height: 38px; }
.mchat-info-member-copy { display: grid; min-width: 0; }
.mchat-info-member-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mchat-info-member-copy small { color: #667085; }
.mchat-info-member-actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 4px; }
.mchat-icon-action,
.mchat-member-menu > summary { display: grid !important; width: 32px !important; min-width: 32px !important; min-height: 32px !important; place-items: center; border: 1px solid var(--mchat-border) !important; border-radius: 7px; background: var(--mchat-surface) !important; padding: 6px !important; color: var(--mchat-text) !important; cursor: pointer; list-style: none; }
.mchat-member-menu > summary::-webkit-details-marker { display: none; }
.mchat-icon-action .mchat-control-label,
.mchat-member-menu > summary .mchat-control-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mchat-icon-action .mchat-control-icon,
.mchat-member-menu > summary .mchat-control-icon { width: 17px; height: 17px; }
.mchat-member-menu { position: relative; }
.mchat-member-menu-panel { display: grid; position: absolute; z-index: 20; top: calc(100% + 5px); right: 0; width: max-content; min-width: 170px; gap: 5px; border: 1px solid var(--mchat-border); border-radius: 9px; background: var(--mchat-surface); padding: 7px; box-shadow: 0 10px 28px rgba(15, 23, 42, .18); }
.mchat-member-menu-panel button,
.mchat-member-role { width: 100%; min-height: 32px !important; border: 1px solid var(--mchat-border) !important; border-radius: 7px; background: var(--mchat-surface) !important; padding: 5px 8px !important; color: var(--mchat-text) !important; font-size: 12px !important; text-align: left; }

/* Keep the native hidden state stronger than theme and component layout rules. */
.mchat-app form[hidden],
.mchat-app div[hidden],
.mchat-app button[hidden],
.mchat-app img[hidden] { display: none !important; }

.mchat-no-sidebar { grid-template-columns: minmax(0, 1fr) minmax(190px, 230px); }
.mchat-no-sidebar > .mchat-sidebar { display: none; }
.mchat-no-users { grid-template-columns: minmax(210px, 260px) minmax(0, 1fr); }
.mchat-no-users > .mchat-users { display: none; }
.mchat-no-sidebar.mchat-no-users { grid-template-columns: minmax(0, 1fr); }
.mchat-fullscreen { position: fixed; inset: 0; z-index: 999999; width: 100vw; height: 100vh !important; border-radius: 0; }
.mchat-available-screen { width: 100%; height: calc(100vh - var(--mchat-top-offset, 0px) - var(--mchat-bottom-offset, 0px)) !important; height: calc(100dvh - var(--mchat-top-offset, 0px) - var(--mchat-bottom-offset, 0px)) !important; min-height: 420px; border-radius: 0; }

.mchat-floating { --mchat-border: #d9dee7; position: fixed; right: 20px; bottom: calc(20px + var(--mchat-bottom-offset, 0px)); z-index: 999990; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.mchat-floating[hidden] { display: none !important; }
.mchat-floating-left { right: auto; left: 20px; }
.mchat-floating-launcher { display: inline-flex; position: relative; min-height: 54px; align-items: center; gap: 9px; border: 0; border-radius: 999px; background: var(--mchat-accent); padding: 12px 17px; color: #fff; font: 600 14px/1 system-ui, sans-serif; box-shadow: 0 10px 30px rgba(15, 23, 42, .28); cursor: pointer; }
.mchat-floating-launcher svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.mchat-floating-launcher strong { display: grid; position: absolute; top: -5px; right: -4px; min-width: 21px; height: 21px; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #dc2626; color: #fff; font-size: 10px; }
.mchat-floating-panel { position: absolute; right: 0; bottom: 66px; width: min(980px, calc(100vw - 40px)); height: min(720px, calc(100vh - var(--mchat-bottom-offset, 0px) - 100px)); height: min(720px, calc(100dvh - var(--mchat-bottom-offset, 0px) - 100px)); overflow: hidden; border: 1px solid var(--mchat-border); border-radius: 16px; background: var(--mchat-surface); box-shadow: 0 22px 70px rgba(15, 23, 42, .3); }
.mchat-floating-left .mchat-floating-panel { right: auto; left: 0; }
.mchat-floating-tools { display: flex; position: absolute; z-index: 80; top: 8px; right: 8px; align-items: center; gap: 5px; }
.mchat-floating-tools button { display: grid; width: 34px; min-width: 34px; height: 34px; min-height: 34px; place-items: center; border: 1px solid var(--mchat-border); border-radius: 50%; background: var(--mchat-surface); padding: 7px; color: var(--mchat-text); cursor: pointer; }
.mchat-floating-tools .mchat-control-icon { width: 18px; height: 18px; }
.mchat-floating-tools .mchat-control-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mchat-floating-close { font-size: 22px; line-height: 1; }
.mchat-floating-app { width: 100%; height: 100% !important; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
.mchat-floating-app .mchat-sidebar { padding-top: 46px; }
.mchat-floating-app .mchat-users { padding-top: 46px; }
.mchat-floating-app > .mchat-sidebar .mchat-drawer-close { display: none !important; }
@media (min-width: 901px) {
	.mchat-floating-app { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
	.mchat-floating-app > .mchat-users { display: none !important; }
}

@media (max-width: 900px) {
	.mchat-app,
	.mchat-no-sidebar,
	.mchat-no-users { grid-template-columns: minmax(0, 1fr); }
	.mchat-sidebar,
	.mchat-users { position: absolute; top: 0; bottom: 0; z-index: 50; display: block; width: min(320px, 88%); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); -webkit-overflow-scrolling: touch; }
	.mchat-drawer-close { position: sticky; top: 0; z-index: 3; display: inline-flex !important; width: 36px !important; min-height: 36px !important; float: right; align-items: center; justify-content: center; border-color: var(--mchat-border) !important; background: var(--mchat-surface) !important; color: var(--mchat-text) !important; font-size: 23px !important; }
	.mchat-sidebar { left: 0; transform: translateX(-105%); }
	.mchat-users { right: 0; transform: translateX(105%); }
	.mchat-app.is-mobile-rooms .mchat-sidebar,
	.mchat-app.is-mobile-users .mchat-users { transform: translateX(0); }
	.mchat-mobile-rooms { display: inline-block; }
	.mchat-online-avatars { display: inline-flex; }
	.mchat-users-toggle.has-avatars { width: auto !important; min-width: 48px !important; padding-right: 5px !important; }
	.mchat-users-toggle.has-avatars > .mchat-control-icon { display: none; }
	.mchat-no-sidebar .mchat-mobile-rooms,
	.mchat-no-users .mchat-users-toggle { display: none; }
	.mchat-floating { right: 14px; bottom: calc(14px + var(--mchat-bottom-offset, 0px)); }
	.mchat-floating-left { right: auto; left: 14px; }
	.mchat-floating-panel { position: fixed; inset: var(--mchat-top-offset, 0px) 0 var(--mchat-bottom-offset, 0px); width: 100vw; height: auto; border: 0; border-radius: 0; }
	.mchat-floating-app { grid-template-columns: minmax(0, 1fr); }
	.mchat-floating-app > .mchat-sidebar { position: relative; inset: auto; z-index: 1; display: flex; width: 100%; transform: none; box-shadow: none; }
	.mchat-floating-app:not(.is-thread-view) > .mchat-main,
	.mchat-floating-app:not(.is-thread-view) > .mchat-users { display: none !important; }
	.mchat-floating-app.is-thread-view > .mchat-sidebar { display: none !important; }
	.mchat-floating-app.is-thread-view > .mchat-main { display: flex !important; }
	.mchat-floating-app .mchat-mobile-rooms { display: inline-flex !important; }
	body.mchat-popup-open { overflow: hidden; }
}

@media (max-width: 1100px) {
	.mchat-header { gap: 6px; padding: 8px 10px; }
	.mchat-header .mchat-control-label,
	.mchat-users-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
	.mchat-header-actions { gap: 3px; }
	.mchat-header-actions button,
	.mchat-mobile-rooms,
	.mchat-header .mchat-radio button { width: 36px !important; min-width: 36px !important; min-height: 36px !important; padding: 7px !important; }
	.mchat-header-actions .mchat-users-toggle { width: auto !important; min-width: 48px !important; padding-inline: 8px !important; overflow: hidden; }
	.mchat-header-actions .mchat-users-toggle.has-avatars { min-width: 48px !important; }
	.mchat-header-actions .mchat-users-toggle:not(.has-avatars) .mchat-control-icon { width: 15px; height: 15px; flex: 0 0 15px; }
	.mchat-header-actions .mchat-users-toggle:not(.has-avatars) .mchat-online { min-width: 8px; line-height: 1; text-align: center; }
	.mchat-profile .mchat-control-avatar { width: 23px; height: 23px; }
	.mchat-header .mchat-radio div,
	.mchat-header .mchat-radio input[type="range"] { display: none; }
	.mchat-header .mchat-radio { min-width: 75px; flex: 0 0 auto; }
}

@media (max-width: 620px) {
	.mchat-app { height: max(540px, var(--mchat-height)); border-radius: 0; }
	.mchat-header { align-items: center; flex-wrap: wrap; gap: 4px; padding: 7px; }
	.mchat-room-heading { min-width: 70px; flex: 1 1 90px; }
	.mchat-title { font-size: 16px; }
	.mchat-description { display: none; }
	.mchat-header-actions { flex-wrap: nowrap; justify-content: flex-end; }
	.mchat-header-actions button { min-height: 31px; padding: 6px 8px; }
	.mchat-header .mchat-radio { margin-left: auto; }
	.mchat-users-toggle .mchat-online { font-size: 10px; font-weight: 700; }
	.mchat-app form.mchat-compose { flex-wrap: wrap; }
	.mchat-app form.mchat-compose textarea { order: 1; min-width: calc(100% - 132px) !important; }
	.mchat-send { order: 2; }
	.mchat-upload, .mchat-gif, .mchat-emoji { order: 3; }
	.mchat-message.is-mine { margin-left: 0; }
	.mchat-message-actions { opacity: 1; }
	.mchat-header .mchat-radio div,
	.mchat-header .mchat-radio input[type="range"] { display: none; }
	.mchat-access-card form { grid-template-columns: 1fr; }
	.mchat-access-card .mchat-consent { grid-column: 1; }
	.mchat-notification-card { padding: 18px; }
	.mchat-notification-form > label { grid-template-columns: 1fr; }
	.mchat-notification-channel { grid-template-columns: 1fr; }
	.mchat-notification-channel strong,
	.mchat-notification-channel button { grid-column: 1; justify-self: stretch; }
	.mchat-notification-channel button { width: 100% !important; white-space: normal !important; overflow-wrap: anywhere; text-align: left; }
	.mchat-notification-actions { display: grid; }
	.mchat-floating-launcher { width: 54px; padding: 14px; }
	.mchat-floating-launcher > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

@media (prefers-reduced-motion: reduce) {
	.mchat-app * { scroll-behavior: auto !important; transition: none !important; }
}
