/* Modern Chatbox - IPS4 Native Default Styling */

.ipsModernChat_container {
	position: relative;
	margin-bottom: 20px;
}

.ipsModernChat_header {
	padding: 8px 12px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ipsModernChat_roomTabs button {
	margin-right: 5px;
}

.ipsModernChat_headerActions {
	gap: 4px;
}

.ipsModernChat_headerActionBtn {
	background: transparent;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 6px;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #606770;
	cursor: pointer;
	padding: 0;
	font-size: 13px;
	transition: all 0.15s ease;
}

.ipsModernChat_headerActionBtn:hover {
	background: rgba(0, 0, 0, 0.05);
	color: #111;
	border-color: rgba(0, 0, 0, 0.2);
	transform: translateY(-1px);
}

.ipsModernChat_announcement {
	margin: 8px 12px;
	border-radius: 4px;
}

.ipsModernChat_messages {
	padding: 10px 14px;
	background: #fff;
}

html[data-ips-dark="true"] .ipsModernChat_messages,
.ipsApp--dark .ipsModernChat_messages {
	background: #1a1a1a;
}

/* Rows */
.ipsModernChat_row {
	margin-bottom: 8px;
	position: relative;
	transition: background-color 0.15s ease;
	border-radius: 4px;
	padding: 4px 6px;
}

.ipsModernChat_row:hover {
	background-color: rgba(0, 0, 0, 0.02);
}

/* Messages sent by logged-in user */
.ipsModernChat_row_own,
.ipsModernChat_row_self {
	background-color: rgba(33, 150, 243, 0.04);
	border-left: 3px solid #2196f3;
}

.ipsModernChat_row_own:hover,
.ipsModernChat_row_self:hover {
	background-color: rgba(33, 150, 243, 0.08);
}

.ipsModernChat_row_system {
	background: transparent;
	padding: 2px 0;
}

.ipsModernChat_systemAlert {
	padding: 6px 12px;
	margin: 4px 0;
	border-radius: 4px;
	font-size: 13px;
}

.ipsModernChat_avatarCol {
	width: 34px;
	min-width: 34px;
	margin-right: 10px;
	margin-top: 2px;
}

.ipsModernChat_avatarCol img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
}

.ipsModernChat_bodyCol {
	min-width: 0;
}

.ipsModernChat_meta {
	display: flex;
	align-items: center;
	margin-bottom: 2px;
}

.ipsModernChat_avatarCol a {
	display: inline-block;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.ipsModernChat_avatarCol a:hover {
	opacity: 0.85;
	transform: scale(1.05);
}

.ipsModernChat_author {
	font-weight: 600;
	font-size: 13px;
	margin-right: 6px;
	cursor: pointer;
	transition: opacity 0.15s ease, text-decoration 0.15s ease;
}

.ipsModernChat_author:hover {
	text-decoration: underline;
	opacity: 0.85;
}

.ipsModernChat_author_readonly {
	cursor: default;
}

.ipsModernChat_author_readonly:hover {
	text-decoration: none;
	opacity: 1;
}

.ipsModernChat_time {
	font-size: 11px;
	opacity: 0.7;
}

.ipsModernChat_actions {
	margin-left: auto;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.ipsModernChat_row:hover .ipsModernChat_actions {
	opacity: 1;
}

.ipsModernChat_actionBtn {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 2px 5px;
	font-size: 12px;
	color: #777;
	border-radius: 3px;
}

.ipsModernChat_actionBtn:hover {
	background: rgba(0, 0, 0, 0.08);
	color: #111;
}

.ipsModernChat_deleteBtn:hover {
	color: #d9534f;
}

/* Quoted reply snippet */
.ipsModernChat_quotedPreview {
	font-size: 11.5px;
	border-left: 3px solid #3f6791;
	padding: 3px 8px;
	margin-bottom: 5px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 0 4px 4px 0;
	color: #999;
	cursor: pointer;
	user-select: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: 100%;
	transition: all 0.18s ease;
}

.ipsModernChat_quotedPreview:hover {
	background: rgba(33, 150, 243, 0.15);
	border-left-color: #2196f3;
	color: #fff;
	transform: translateX(3px);
}

.ipsModernChat_quotedIcon {
	font-size: 11px;
	opacity: 0.7;
	flex-shrink: 0;
}

.ipsModernChat_quotedThumbWrapper {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	pointer-events: none;
}

.ipsModernChat_quotedThumb {
	width: 26px;
	height: 26px;
	border-radius: 4px;
	object-fit: cover;
	display: inline-block;
	vertical-align: middle;
	background: #111;
	border: 1px solid rgba(255, 255, 255, 0.15);
	pointer-events: none;
}

.ipsModernChat_quotedText {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

.ipsModernChat_quotedSnippet {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ipsModernChat_quotedSnippet img.ipsModernChat_emoji,
.ipsModernChat_replyBar img.ipsModernChat_emoji {
	width: 16px;
	height: 16px;
	vertical-align: -2px;
	display: inline-block;
	margin: 0 1px;
	pointer-events: none;
}

/* Highlight animation for jumped-to message */
@keyframes modernChatPulseHighlight {
	0% {
		background-color: rgba(33, 150, 243, 0.4);
		box-shadow: inset 0 0 0 1px #2196f3, 0 0 15px rgba(33, 150, 243, 0.5);
	}

	40% {
		background-color: rgba(33, 150, 243, 0.25);
		box-shadow: inset 0 0 0 1px #2196f3, 0 0 8px rgba(33, 150, 243, 0.3);
	}

	100% {
		background-color: transparent;
		box-shadow: none;
	}
}

.ipsModernChat_row.ipsModernChat_highlight {
	animation: modernChatPulseHighlight 2.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
	border-radius: 6px;
}

/* Content */
.ipsModernChat_content {
	font-size: 13.5px;
	line-height: 1.45;
	word-break: break-word;
}

.ipsModernChat_mention {
	background: rgba(63, 103, 145, 0.12);
	color: #2b5683;
	padding: 1px 4px;
	border-radius: 3px;
	font-weight: 500;
}

.ipsModernChat_mention_self {
	background: #ffeaa7;
	color: #d35400;
	border-left: 2px solid #e67e22;
}

.ipsModernChat_img {
	max-height: 180px;
	max-width: 100%;
	border-radius: 6px;
	margin-top: 4px;
	cursor: pointer;
	transition: transform 0.2s ease;
}

.ipsModernChat_img:hover {
	transform: scale(1.01);
}

.ipsModernChat_gif {
	max-height: 160px;
	max-width: 100%;
	border-radius: 6px;
	margin-top: 4px;
}

.ipsModernChat_audio {
	height: 32px;
	margin-top: 4px;
	vertical-align: middle;
}

/* Reactions Bar */
.ipsModernChat_reactionsBar {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 4px;
}

.ipsModernChat_reactionPill {
	background: rgba(0, 0, 0, 0.04);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 12px;
	padding: 1px 7px;
	font-size: 11px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	transition: all 0.15s ease;
}

.ipsModernChat_reactionPill:hover {
	background: rgba(0, 0, 0, 0.08);
}

.ipsModernChat_reactionPill_active {
	background: rgba(63, 103, 145, 0.15);
	border-color: #3f6791;
	color: #3f6791;
	font-weight: bold;
}

.ipsModernChat_reactionPill_readonly {
	cursor: default;
}

.ipsModernChat_reactionCount {
	margin-left: 3px;
	font-size: 10px;
}

/* Floating Quick Reactions Popup */
.ipsModernChat_quickReactPopup {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border-radius: 28px;
	background: rgba(18, 18, 24, 0.95);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.15);
	animation: ryzeModernChatReactPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
	pointer-events: auto;
	box-sizing: border-box;
}

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

.ipsModernChat_quickReactPopup .ipsModernChat_quickReactBtn,
.ipsModernChat_quickReactPopup button,
.ipsModernChat_quickReactBtn {
	background: transparent;
	border: none;
	padding: 4px 6px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.15s ease, filter 0.15s ease;
	user-select: none;
	-webkit-user-select: none;
}

.ipsModernChat_quickReactPopup .ipsModernChat_quickReactBtn:hover,
.ipsModernChat_quickReactPopup button:hover,
.ipsModernChat_quickReactBtn:hover {
	background: rgba(255, 255, 255, 0.1);
	transform: scale(1.35) translateY(-2px);
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.ipsModernChat_quickReactPopup .ipsModernChat_quickReactBtn:active,
.ipsModernChat_quickReactPopup button:active,
.ipsModernChat_quickReactBtn:active {
	transform: scale(1.1);
}

/* Floating Autoscroll Badge */
.ipsModernChat_scrollBadge {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	background: #27ae60;
	color: #fff;
	padding: 5px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	z-index: 10;
	animation: bounce 1s infinite alternate;
}

@keyframes bounce {
	from {
		transform: translateX(-50%) translateY(0);
	}

	to {
		transform: translateX(-50%) translateY(-4px);
	}
}

/* History Jump Banner (Discord style) */
.ipsModernChat_historyBanner {
	background: #1e202c;
	background: linear-gradient(135deg, rgba(30, 32, 44, 0.98), rgba(20, 22, 32, 0.98));
	border-top: 1px solid rgba(221, 46, 50, 0.4);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	padding: 7px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.25);
	position: relative;
	z-index: 10;
	animation: modernChatSlideDown 0.22s ease-out;
}

@keyframes modernChatSlideDown {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ipsModernChat_historyBannerText {
	font-size: 12px;
	color: #e0e0e8;
	display: flex;
	align-items: center;
	gap: 7px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ipsModernChat_historyBannerText i {
	color: #dd2e32;
	font-size: 13px;
}

.ipsModernChat_returnLiveBtn {
	background: #dd2e32;
	color: #fff !important;
	border: 0;
	border-radius: 5px;
	padding: 5px 12px;
	font-size: 11.5px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
	transition: all 0.15s ease;
	flex-shrink: 0;
}

.ipsModernChat_returnLiveBtn:hover {
	background: #ea3a3e;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(221, 46, 50, 0.35);
}

.ipsModernChat_returnLiveBtn:active {
	transform: translateY(0);
}

@media (max-width: 480px) {
	.ipsModernChat_historyBanner {
		padding: 6px 10px;
	}
	.ipsModernChat_historyBannerText {
		font-size: 11px;
		max-width: 60%;
	}
	.ipsModernChat_returnLiveBtn {
		padding: 4px 8px;
		font-size: 10.5px;
	}
}

/* Typing Indicator */
.ipsModernChat_typingIndicator {
	padding: 3px 14px;
	font-style: italic;
	min-height: 20px;
}

/* Reply Bar */
.ipsModernChat_replyBar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 5px 12px;
	font-size: 12px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ipsModernChat_cancelReply {
	background: transparent;
	border: none;
	cursor: pointer;
	color: #999;
}

.ipsModernChat_cancelReply:hover {
	color: #333;
}

/* Edit Bar */
.ipsModernChat_editBar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 5px 12px;
	font-size: 12px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	background: rgba(33, 150, 243, 0.09);
}

.ipsModernChat_cancelEdit {
	background: transparent;
	border: none;
	cursor: pointer;
	color: #999;
	font-size: 12px;
	padding: 0 4px;
	transition: color 0.15s ease;
}

.ipsModernChat_cancelEdit:hover {
	color: #e74c3c;
}

/* Pinned Message Bar */
.ipsModernChat_pinnedBar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 12px;
	background: rgba(243, 156, 18, 0.12);
	border-bottom: 1px solid rgba(243, 156, 18, 0.25);
	font-size: 12px;
	transition: all 0.2s ease;
}

.ipsModernChat_pinnedIcon {
	color: #e67e22;
	margin-right: 2px;
	flex-shrink: 0;
}

.ipsModernChat_pinnedUnpinBtn {
	background: none;
	border: none;
	cursor: pointer;
	color: inherit;
	opacity: 0.6;
	padding: 0 4px;
	transition: opacity 0.15s ease;
}

.ipsModernChat_pinnedUnpinBtn:hover {
	opacity: 1;
	color: #e74c3c;
}

/* Edited Badge */
.ipsModernChat_editedBadge {
	font-size: 10px;
	opacity: 0.65;
	margin-left: 4px;
	font-style: italic;
	font-weight: normal;
}

/* Input Bar */
.ipsModernChat_inputBar {
	padding: 8px 12px;
	background: #fbfbfd;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ipsModernChat_inputBox {
	display: flex;
	align-items: center;
	background: #fff;
	border: 1.5px solid #dcdfe4;
	border-radius: 24px;
	padding: 4px 6px 4px 14px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	position: relative;
	width: 100%;
}

.ipsModernChat_inputBox:focus-within {
	border-color: #1877f2;
	box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.16);
	background: #fff;
}

.ipsModernChat_inputFieldWrapper {
	position: relative;
	flex: 1 1 auto;
	min-width: 60px;
	display: flex;
	align-items: center;
	cursor: text;
}

.ipsModernChat_input {
	width: 100%;
	max-width: 100%;
	flex: 1 1 auto;
	min-width: 60px;
	display: block;
	border: none;
	background: transparent;
	outline: none;
	box-shadow: none;
	padding: 6px 4px;
	font-size: 13.5px;
	line-height: 1.4;
	color: #1c1e21;
	border-radius: 0;
	box-sizing: border-box;
	cursor: text;
}

.ipsModernChat_input::placeholder {
	color: #8c94a0;
	font-size: 13px;
}

.ipsModernChat_inputActions {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	gap: 4px;
	margin-left: 4px;
}

/* Character counter */
.ipsModernChat_charCount {
	font-size: 11px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-weight: 500;
	color: #8c94a0;
	padding: 0 4px;
	user-select: none;
	line-height: 1;
	flex-shrink: 0;
	transition: color 0.15s ease;
}

.ipsModernChat_charCount_warn {
	color: #f59e0b;
	font-weight: 600;
}

.ipsModernChat_charCount_danger {
	color: #ef4444;
	font-weight: 700;
}

.ipsModernChat_iconBtn {
	background: transparent;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	color: #606770;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-size: 15px;
	line-height: 1;
	transition: all 0.15s ease;
	outline: none;
	flex-shrink: 0;
}

.ipsModernChat_iconBtn:hover {
	background: rgba(0, 0, 0, 0.07);
	color: #1877f2;
	transform: scale(1.08);
}

.ipsModernChat_iconBtn strong {
	font-size: 11px;
	background: rgba(0, 0, 0, 0.08);
	padding: 2px 4px;
	border-radius: 4px;
	font-weight: 700;
	color: #4b4f56;
	letter-spacing: 0.5px;
}

.ipsModernChat_iconBtn:hover strong {
	background: #1877f2;
	color: #fff;
}

.ipsModernChat_moreBtn {
	display: none;
}

.ipsModernChat_extraActions {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

@keyframes ipsModernChat_popIn {
	from {
		opacity: 0;
		transform: translateY(6px) scale(0.95);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.ipsModernChat_sendBtn {
	background: #1877f2;
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	padding: 0;
	margin-left: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(24, 119, 242, 0.35);
	transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	font-size: 13px;
	flex-shrink: 0;
}

.ipsModernChat_sendBtn:hover {
	background: #1464cc;
	transform: scale(1.08);
	box-shadow: 0 4px 10px rgba(24, 119, 242, 0.45);
}

.ipsModernChat_sendBtn:active {
	transform: scale(0.92);
}

/* Autocomplete Box (Discord style :emoji:) */
.ipsModernChat_autocomplete {
	position: absolute;
	bottom: 100%;
	left: 0;
	width: 260px;
	max-height: 200px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
	z-index: 100;
}

.ipsModernChat_autocompleteItem {
	padding: 6px 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	font-size: 13px;
}

.ipsModernChat_autocompleteItem:hover,
.ipsModernChat_autocompleteItem_selected {
	background: rgba(63, 103, 145, 0.1);
}

.ipsModernChat_autocompleteItem img {
	width: 20px;
	height: 20px;
	margin-right: 8px;
}

/* Voice Overlay */
.ipsModernChat_voiceOverlay {
	border-top: 1px solid rgba(0, 0, 0, 0.15);
}

.ipsModernChat_recDot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #e74c3c;
	display: inline-block;
	margin-right: 8px;
	animation: pulse 1s infinite alternate;
}

@keyframes pulse {
	from {
		opacity: 1;
		transform: scale(1);
	}

	to {
		opacity: 0.4;
		transform: scale(1.2);
	}
}

.ipsModernChat_voiceTimer {
	font-weight: bold;
	font-size: 14px;
}

/* Pickers (GIF and Emoji) */
.ipsModernChat_gifPicker,
.ipsModernChat_emojiPicker {
	position: absolute;
	bottom: 100%;
	right: 10px;
	margin-bottom: 8px;
	width: 350px;
	max-height: 330px;
	z-index: 1000;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.12);
}

.ipsModernChat_gifResults {
	max-height: 280px;
	overflow-y: auto;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	margin-top: 8px;
	padding: 2px;
}

.ipsModernChat_gifResults img {
	width: 100%;
	height: 85px;
	object-fit: cover;
	cursor: pointer;
	border-radius: 6px;
	transition: transform 0.15s ease;
}

.ipsModernChat_gifResults img:hover {
	transform: scale(1.03);
}

.ipsModernChat_emojiResults {
	max-height: 250px;
	overflow-y: auto;
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 4px;
	padding: 4px;
	margin-top: 8px;
}

.ipsModernChat_emojiResults button {
	background: transparent;
	border: none;
	border-radius: 6px;
	padding: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, transform 0.1s ease;
}

.ipsModernChat_emojiResults button:hover {
	background: rgba(63, 103, 145, 0.15);
	transform: scale(1.22);
}

/* Stats Section */
.ipsModernChat_statsSection {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ipsModernChat_statsBar {
	padding: 6px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
	margin-bottom: 8px;
}

.ipsModernChat_topGrid {
	gap: 8px;
}

.ipsModernChat_topTile {
	position: relative;
	border-radius: 6px;
	flex: 1;
	min-width: 0;
	transition: transform 0.15s ease;
}

.ipsModernChat_topTile:hover {
	transform: translateY(-2px);
}

.ipsModernChat_rankBadge {
	position: absolute;
	top: 4px;
	left: 4px;
	font-size: 9px;
	padding: 1px 4px;
}

/* Responsiveness & Mobile optimizations */
@media (max-width: 767px) {
	.ipsModernChat_header {
		flex-wrap: wrap;
		gap: 6px;
		padding: 8px 10px;
	}

	.ipsModernChat_roomTabs {
		overflow-x: auto;
		max-width: 100%;
		scrollbar-width: none;
	}

	.ipsModernChat_roomTabs::-webkit-scrollbar {
		display: none;
	}

	.ipsModernChat_messages {
		padding: 8px 10px;
	}

	/* Message action buttons visible on touch devices */
	.ipsModernChat_actions {
		opacity: 0.85;
	}

	.ipsModernChat_actionBtn {
		padding: 3px 6px;
		font-size: 13px;
	}

	.ipsModernChat_inputBar {
		padding: 6px 8px;
	}

	.ipsModernChat_inputBox {
		padding: 3px 4px 3px 10px;
		border-radius: 20px;
	}

	.ipsModernChat_input {
		font-size: 13px;
	}

	.ipsModernChat_iconBtn {
		width: 28px;
		height: 28px;
		font-size: 14px;
	}

	.ipsModernChat_sendBtn {
		width: 28px;
		height: 28px;
		font-size: 12px;
		margin-left: 2px;
	}

	.ipsModernChat_gifPicker,
	.ipsModernChat_emojiPicker {
		width: calc(100% - 16px);
		left: 8px;
		right: 8px;
		max-height: 270px;
	}

	.ipsModernChat_emojiResults {
		grid-template-columns: repeat(7, 1fr);
		max-height: 200px;
	}

	.ipsModernChat_gifResults {
		grid-template-columns: repeat(2, 1fr);
		max-height: 200px;
	}

	.ipsModernChat_topGrid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 6px;
	}

	.ipsModernChat_topTile {
		flex: none;
		margin-bottom: 0;
	}

	.ipsModernChat_statsBar {
		flex-wrap: wrap;
		gap: 6px;
	}

	.ipsModernChat_statsBar>div {
		flex: 1 1 30%;
	}

	.ipsModernChat_moreBtn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 28px;
		height: 28px;
		font-size: 13px;
		color: #8c94a0;
		border-radius: 50%;
		transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease, background 0.2s ease;
	}

	.ipsModernChat_moreBtn.is-active {
		transform: rotate(45deg);
		color: #dd2e32;
		background: rgba(221, 46, 50, 0.12);
	}

	.ipsModernChat_extraActions {
		display: none;
	}

	.ipsModernChat_extraActions.is-open {
		display: flex;
		position: absolute;
		bottom: calc(100% + 8px);
		right: 32px;
		background: #141418;
		border: 1px solid rgba(255, 255, 255, 0.15);
		border-radius: 24px;
		padding: 4px 8px;
		gap: 6px;
		align-items: center;
		box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
		z-index: 1000;
		animation: ipsModernChat_popIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
	}

	.ipsModernChat_extraActions.is-open .ipsModernChat_iconBtn {
		color: #c9cdd4;
		width: 30px;
		height: 30px;
	}

	.ipsModernChat_extraActions.is-open .ipsModernChat_iconBtn:hover {
		color: #fff;
		background: rgba(255, 255, 255, 0.15);
	}

	.ipsModernChat_inputBox:not(.has-text) .ipsModernChat_charCount {
		display: none;
	}
}

@media (max-width: 480px) {
	.ipsModernChat_topGrid {
		grid-template-columns: repeat(2, 1fr);
	}

	.ipsModernChat_emojiResults {
		grid-template-columns: repeat(6, 1fr);
	}

	.ipsModernChat_gifResults {
		grid-template-columns: repeat(2, 1fr);
	}

	.ipsModernChat_inputActions {
		gap: 1px;
	}

	.ipsModernChat_inputBox.has-text .ipsModernChat_moreBtn {
		display: none;
	}
}

.ipsModernChat_historyLoader {
	text-align: center;
	padding: 8px 0 12px 0;
	font-size: 12px;
	color: #8c94a0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

/* ==========================================================================
   Rich Media Embeds (YouTube, Spotify, TikTok, Twitch, Video, Audio, Images)
   ========================================================================== */
.ipsModernChat_embedsContainer {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 440px;
}

.ipsModernChat_embed {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.ipsModernChat_embed_youtube {
	aspect-ratio: 16 / 9;
	width: 100%;
	max-width: 420px;
}

.ipsModernChat_embed_youtube iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.ipsModernChat_embed_spotify {
	width: 100%;
	max-width: 420px;
	height: 80px;
	background: transparent;
	box-shadow: none;
}

.ipsModernChat_embed_spotify iframe {
	width: 100%;
	height: 80px;
	border: 0;
	border-radius: 12px;
	display: block;
}

.ipsModernChat_embed_tiktok {
	width: 100%;
	max-width: 325px;
	background: #010101;
}

.ipsModernChat_embed_tiktok iframe {
	width: 100%;
	height: 480px;
	border: 0;
	display: block;
}

.ipsModernChat_embed_twitch {
	aspect-ratio: 16 / 9;
	width: 100%;
	max-width: 420px;
}

.ipsModernChat_embed_twitch iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.ipsModernChat_embed_twitter {
	width: 100%;
	max-width: 420px;
	min-height: 250px;
	background: #000;
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.ipsModernChat_embed_twitter iframe {
	width: 100%;
	min-height: 250px;
	height: 380px;
	border: 0;
	display: block;
}

.ipsModernChat_embed_kick {
	aspect-ratio: 16 / 9;
	width: 100%;
	max-width: 420px;
}

.ipsModernChat_embed_kick iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.ipsModernChat_embed_soundcloud {
	width: 100%;
	max-width: 420px;
	height: 110px;
	background: transparent;
	box-shadow: none;
}

.ipsModernChat_embed_soundcloud iframe {
	width: 100%;
	height: 110px;
	border: 0;
	border-radius: 8px;
	display: block;
}

.ipsModernChat_embed_streamable {
	aspect-ratio: 16 / 9;
	width: 100%;
	max-width: 420px;
}

.ipsModernChat_embed_streamable iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.ipsModernChat_embed_vimeo {
	aspect-ratio: 16 / 9;
	width: 100%;
	max-width: 420px;
}

.ipsModernChat_embed_vimeo iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.ipsModernChat_embed_instagram {
	width: 100%;
	max-width: 360px;
	min-height: 440px;
	background: #000;
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.ipsModernChat_embed_instagram iframe {
	width: 100%;
	min-height: 440px;
	height: 480px;
	border: 0;
	display: block;
}

.ipsModernChat_embed_facebook {
	width: 100%;
	max-width: 400px;
	min-height: 200px;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
}

.ipsModernChat_embed_facebook iframe {
	width: 100%;
	min-height: 200px;
	height: 400px;
	border: 0;
	display: block;
}

.ipsModernChat_embed_facebook_video {
	aspect-ratio: 16 / 9;
	background: #000;
	min-height: auto;
}

.ipsModernChat_embed_facebook_video iframe {
	height: 100%;
	min-height: auto;
}

.ipsModernChat_embed_reddit {
	width: 100%;
	max-width: 420px;
	min-height: 240px;
	background: #1a1a1b;
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.ipsModernChat_embed_reddit iframe {
	width: 100%;
	min-height: 240px;
	height: 340px;
	border: 0;
	display: block;
}

.ipsModernChat_embed_coub {
	aspect-ratio: 16 / 9;
	width: 100%;
	max-width: 400px;
}

.ipsModernChat_embed_coub iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.ipsModernChat_embed_applemusic {
	width: 100%;
	max-width: 420px;
	height: 150px;
	background: transparent;
	box-shadow: none;
}

.ipsModernChat_embed_applemusic iframe {
	width: 100%;
	height: 150px;
	border: 0;
	border-radius: 10px;
	display: block;
}

.ipsModernChat_embed_video video {
	width: 100%;
	max-width: 420px;
	max-height: 280px;
	border-radius: 8px;
	display: block;
	background: #000;
}

.ipsModernChat_embed_audio audio {
	width: 100%;
	max-width: 380px;
	display: block;
}

.ipsModernChat_embed_image img {
	max-width: 100%;
	max-height: 280px;
	border-radius: 8px;
	display: block;
	object-fit: contain;
	background: #111;
}

@media (max-width: 767px) {

	.ipsModernChat_embedsContainer,
	.ipsModernChat_embed_youtube,
	.ipsModernChat_embed_twitter,
	.ipsModernChat_embed_kick,
	.ipsModernChat_embed_soundcloud,
	.ipsModernChat_embed_streamable,
	.ipsModernChat_embed_vimeo,
	.ipsModernChat_embed_instagram,
	.ipsModernChat_embed_facebook,
	.ipsModernChat_embed_reddit,
	.ipsModernChat_embed_coub,
	.ipsModernChat_embed_applemusic,
	.ipsModernChat_embed_spotify,
	.ipsModernChat_embed_twitch,
	.ipsModernChat_embed_video video {
		max-width: 100%;
	}
}

/* Modals: Mute & System Message */
.ipsModernChat_muteModal,
.ipsModernChat_systemModal {
	max-width: 540px;
	margin: 0 auto;
}

.ipsModernChat_muteModal input[type="text"],
.ipsModernChat_muteModal input[type="datetime-local"],
.ipsModernChat_muteModal select,
.ipsModernChat_systemModal textarea,
.ipsModernChat_systemModal input[type="text"] {
	box-sizing: border-box;
	border-radius: 6px;
}

/* Modals: Archive */
.ipsModernChat_archiveModal {
	max-width: 680px;
	margin: 0 auto;
}

.ipsModernChat_archiveModal [data-role="archiveMessagesList"] {
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.ipsModernChat_archiveModal [data-role="archiveMessagesList"]::-webkit-scrollbar {
	width: 6px;
}

.ipsModernChat_archiveModal [data-role="archiveMessagesList"]::-webkit-scrollbar-track {
	background: transparent;
}

.ipsModernChat_archiveModal [data-role="archiveMessagesList"]::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 3px;
}
