body[data-pagekey="ChatApp"]:has(.rd-messenger-shell) pc-support-chat-button {
	display: none;
}

.modal_dialog.ChatBroadcastPopup:has(.rd-messenger-broadcast-recipients) {
	min-width: 0;
	max-width: calc(100vw - var(--uui-spacing-3xl));
	max-height: calc(100dvh - var(--uui-spacing-3xl));
	overflow-y: auto;
}

.ChatBroadcastPopup .modal_dialog.rd-messenger-broadcast-recipients {
	min-width: 0;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.rd-messenger-broadcast-recipients .rd-table-cell,
.rd-messenger-broadcast-recipients .ChatBroadcastPopupSort {
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--uui-spacing-xl);
	width: 100%;
	box-sizing: border-box;
}

.rd-messenger-broadcast-recipients .ChatBroadcastPopupSort {
	padding: var(--uui-spacing-xl) 0;
	line-height: normal;
}

.rd-messenger-broadcast-recipients .rd-table-cell > div {
	min-width: 0;
	overflow-wrap: anywhere;
}

@media (max-width: 767px) {
	.ChatBroadcastPopup .modal_dialog.rd-messenger-broadcast-recipients {
		padding: 0;
	}

	.rd-messenger-broadcast-recipients .ChatBroadcastPopupSort {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.rd-messenger-broadcast-recipients .rd-table-cell {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: var(--uui-spacing-sm) var(--uui-spacing-xl);
		padding: var(--uui-spacing-md) 0;
	}

	.ChatBroadcastPopup .rd-messenger-broadcast-recipients #UsersRecipientsTable .rd-table-cell > div:first-child {
		display: block;
		grid-template-columns: none;
	}

	.rd-messenger-broadcast-recipients .rd-table-cell > div:first-child > div {
		display: inline-block;
	}

	.rd-messenger-broadcast-recipients .rd-table-cell > div:nth-child(2) {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.rd-messenger-broadcast-recipients .rd-table-cell > div:nth-child(3) {
		grid-column: 2;
		grid-row: 1;
	}
}

.chatApp .center:has(.rd-messenger-shell) > h1 {
	display: none;
}

.chatApp .center:has(.rd-messenger-shell) .impersonate_wrap {
	display: none;
}

.rd-messenger-frame {
	--rd-messenger-viewport-offset: var(--uui-spacing-10xl);
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	height: calc(100dvh - var(--rd-messenger-viewport-offset));
	min-height: 0;
}

.rd-messenger-frame > .pchat_wrap.rd-messenger-shell {
	grid-row: 2;
	position: relative;
	inset: auto;
	height: 100%;
	max-height: 100% !important;
}

.rd-messenger-system-bar {
	grid-row: 1;
}

.pchat_wrap.rd-messenger-shell {
	--rd-messenger-sidebar-width: 380px;
	min-height: 0;
	height: calc(100dvh - var(--uui-spacing-10xl));
	max-height: calc(100dvh - var(--uui-spacing-10xl)) !important;
	font-family: var(--uui-font-family);
	color: var(--uui-text-primary);
	background: var(--uui-bg-primary);
	border: 1px solid var(--uui-border-secondary);
	border-radius: var(--uui-radius-lg);
	box-shadow: var(--uui-shadow-sm);
}

.rd-messenger-shell .pchat_overview {
	width: var(--rd-messenger-sidebar-width);
	overflow-x: hidden;
	overflow-y: auto;
	background: var(--uui-bg-primary);
	border-right: 1px solid var(--uui-border-secondary);
	box-shadow: none;
}

/* The page itself scrolls (long navigation), so keep wheel/touch scrolling inside the messenger panes. */
.rd-messenger-shell .pchat_overview,
.rd-messenger-shell .pchat_conversation_messages {
	overscroll-behavior: contain;
}

.rd-messenger-shell .pchat_conversation {
	left: var(--rd-messenger-sidebar-width);
	background: var(--uui-bg-secondary);
}

.rd-messenger-overview__header {
	position: sticky;
	top: 0;
	z-index: 2;
	padding: var(--uui-spacing-xl);
	background: var(--uui-bg-primary);
	border-bottom: 1px solid var(--uui-border-secondary);
}

.rd-messenger-area-error__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--uui-spacing-lg);
	padding: var(--uui-spacing-md) var(--uui-spacing-xl);
}

.rd-messenger-list-skeleton {
	display: grid;
	gap: var(--uui-spacing-xl);
	padding: var(--uui-spacing-xl);
}

.rd-messenger-list-skeleton .rd-skeleton-block {
	min-height: var(--uui-spacing-8xl);
}

.rd-messenger-overview__title,
.rd-messenger-overview__actions,
.rd-messenger-row__heading,
.rd-messenger-row__preview,
.rd-messenger-thread__header,
.rd-messenger-composer__controls,
.rd-messenger-composer__reply {
	display: flex;
	align-items: center;
}

.rd-messenger-overview__title {
	justify-content: space-between;
	margin-bottom: var(--uui-spacing-xl);
}

.rd-messenger-overview__actions {
	gap: var(--uui-spacing-md);
}

.rd-messenger-overview__menu {
	position: relative;
}

.rd-messenger-overview__menu-popover {
	position: absolute;
	top: calc(100% + var(--uui-spacing-md));
	right: 0;
	z-index: 4;
	width: max-content;
	max-width: calc(100vw - 2 * var(--uui-spacing-4xl));
	padding: var(--uui-spacing-md);
	background: var(--uui-bg-primary);
	border: 1px solid var(--uui-border-secondary);
	border-radius: var(--uui-radius-md);
	box-shadow: var(--uui-shadow-lg);
}

.rd-messenger-overview__menu-popover button {
	width: 100%;
	padding: var(--uui-spacing-md) var(--uui-spacing-lg);
	font: inherit;
	font-size: var(--uui-text-sm-font-size);
	text-align: left;
	color: var(--uui-text-primary);
	background: transparent;
	border: 0;
	border-radius: var(--uui-radius-sm);
	cursor: pointer;
}

.rd-messenger-overview__menu-popover button:hover {
	background: var(--uui-bg-primary_hover);
}

.rd-messenger-overview__menu-popover button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.rd-messenger-overview__title > div,
.rd-messenger-thread__identity,
.rd-messenger-composer__reply > div {
	min-width: 0;
}

.rd-messenger-overview__title strong,
.rd-messenger-thread__identity strong,
.rd-messenger-thread__identity span,
.rd-messenger-composer__reply strong,
.rd-messenger-composer__reply span,
.rd-messenger-reply-quote strong,
.rd-messenger-reply-quote span {
	display: block;
}

.rd-messenger-thread__identity span,
.rd-messenger-composer__hint,
.rd-messenger-composer__reply span,
.rd-messenger-reply-quote span {
	font-size: var(--uui-text-xs-font-size);
	line-height: var(--uui-text-xs-line-height);
	color: var(--uui-text-tertiary);
}

.rd-messenger-overview__title strong {
	font-size: var(--uui-text-xl-font-size);
	line-height: var(--uui-text-xl-line-height);
	font-weight: var(--uui-font-weight-semibold);
}

.rd-messenger-overview__search,
.rd-messenger-overview__search .uui-input-field__root,
.rd-messenger-overview__search .uui-input-field__input,
.rd-messenger-composer__input {
	inline-size: 100% !important;
}

.rd-messenger-overview__search .uui-input-field__label-wrap {
	display: none !important;
}

.rd-messenger-overview__tabs {
	display: flex;
	gap: var(--uui-spacing-xs);
	margin-top: var(--uui-spacing-lg);
}

.rd-messenger-overview__tabs button {
	padding: var(--uui-spacing-md) var(--uui-spacing-lg);
	font-family: inherit;
	font-size: var(--uui-text-sm-font-size);
	font-weight: var(--uui-font-weight-medium);
	color: var(--uui-text-tertiary);
	background: transparent;
	border: 0;
	border-radius: var(--uui-radius-sm);
	cursor: pointer;
}

.rd-messenger-overview__tabs button:hover,
.rd-messenger-overview__tabs .rd-messenger-overview__tab--active {
	color: var(--uui-text-primary);
	background: var(--uui-bg-secondary);
}

.rd-messenger-overview__list {
	min-width: 0;
}

.rd-messenger-overview__list > uui-empty-state {
	display: block;
	padding: var(--uui-spacing-4xl) var(--uui-spacing-xl);
}

.rd-messenger-row {
	position: relative;
	display: flex;
	align-items: center;
	border-bottom: 1px solid var(--uui-border-secondary);
}

.rd-messenger-row:hover,
.rd-messenger-row:focus-within,
.rd-messenger-row--selected {
	background: var(--uui-bg-primary_hover);
}

.rd-messenger-row > a {
	display: flex;
	flex: 1;
	align-items: center;
	min-width: 0;
	gap: var(--uui-spacing-lg);
	padding: var(--uui-spacing-lg) var(--uui-spacing-md) var(--uui-spacing-lg) var(--uui-spacing-xl);
	color: inherit;
	text-decoration: none;
}

.rd-messenger-row > uui-button-utility {
	margin-right: var(--uui-spacing-md);
}

/* "Meldungen" stands out from the conversations: the dark channel tile of the Figma, which
   uui-featured-icon has no variant for (only light/modern are imported). */
.rd-messenger-row__moderation-icon {
	display: grid;
	flex: none;
	place-items: center;
	inline-size: var(--uui-spacing-5xl);
	block-size: var(--uui-spacing-5xl);
	border-radius: var(--uui-radius-md);
	background: var(--uui-bg-secondary-solid);
	color: var(--uui-fg-white);
	box-shadow: var(--uui-shadow-xs-skeuomorphic);
}

.rd-messenger-row__moderation-icon .uui-icon {
	--uui-icon-size: var(--uui-spacing-2xl);
}

.rd-messenger-row > .rd-messenger-row__actions {
	opacity: 0;
	pointer-events: none;
}

.rd-messenger-row:hover > .rd-messenger-row__actions,
.rd-messenger-row:focus-within > .rd-messenger-row__actions {
	opacity: 1;
	pointer-events: auto;
}

@media (hover: none) {
	.rd-messenger-row > .rd-messenger-row__actions {
		opacity: 1;
		pointer-events: auto;
	}
}

.rd-messenger-shell .qmoptionsmenu > button.rd-messenger-state-command {
	color: var(--uui-text-secondary);
	background: none;
	text-align: left;
}

.rd-messenger-shell .qmoptionsmenu > button.rd-messenger-state-command::before {
	background: currentColor;
	-webkit-mask-image: url("/src/img/core27/icons/line/pin-02.svg");
	mask-image: url("/src/img/core27/icons/line/pin-02.svg");
}

.rd-messenger-shell .qmoptionsmenu > button.rd-messenger-mute-command::before {
	-webkit-mask-image: url("/src/img/core27/icons/line/bell-off-01.svg");
	mask-image: url("/src/img/core27/icons/line/bell-off-01.svg");
}

.rd-messenger-shell .qmoptionsmenu > button.rd-messenger-delete-command::before {
	-webkit-mask-image: url("/src/img/core27/icons/line/trash-01.svg");
	mask-image: url("/src/img/core27/icons/line/trash-01.svg");
}

.rd-messenger-shell .qmoptionsmenu > button.rd-messenger-leave-command::before {
	-webkit-mask-image: url("/src/img/core27/icons/line/log-out-01.svg");
	mask-image: url("/src/img/core27/icons/line/log-out-01.svg");
}

.rd-messenger-shell .qmoptionsmenu > button.rd-messenger-edit-command::before {
	-webkit-mask-image: url("/src/img/core27/icons/line/users-01.svg");
	mask-image: url("/src/img/core27/icons/line/users-01.svg");
}

.rd-messenger-shell .qmoptionsmenu > button.rd-messenger-unmute-command::before {
	-webkit-mask-image: url("/src/img/core27/icons/line/bell-01.svg");
	mask-image: url("/src/img/core27/icons/line/bell-01.svg");
}

.rd-messenger-shell .qmoptionsmenu > button.rd-messenger-archive-command::before {
	-webkit-mask-image: url("/src/img/core27/icons/line/archive.svg");
	mask-image: url("/src/img/core27/icons/line/archive.svg");
}

.rd-messenger-shell .qmoptionsmenu > button.rd-messenger-restore-command::before {
	-webkit-mask-image: url("/src/img/core27/icons/line/arrow-narrow-left.svg");
	mask-image: url("/src/img/core27/icons/line/arrow-narrow-left.svg");
}

.rd-messenger-shell .qmoptionsmenu > button.rd-messenger-read-command::before {
	-webkit-mask-image: url("/src/img/core27/icons/line/check-circle.svg");
	mask-image: url("/src/img/core27/icons/line/check-circle.svg");
}

.rd-messenger-overview__feedback {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--uui-spacing-md);
	padding: var(--uui-spacing-md) var(--uui-spacing-xl);
	border-bottom: 1px solid var(--uui-border-secondary);
	color: var(--uui-text-secondary);
	font-size: var(--uui-text-sm-font-size);
}

.rd-messenger-overview__feedback > span {
	flex: 1 1 0;
	min-width: 0;
	overflow-wrap: anywhere;
}

.rd-messenger-shell .qmoptionsmenu > button.rd-messenger-state-command:hover,
.rd-messenger-shell .qmoptionsmenu > button.rd-messenger-state-command:focus-visible {
	background: var(--uui-bg-primary_hover);
}

.rd-messenger-shell .qmoptionsmenu > button.rd-messenger-state-command:focus-visible {
	outline: 2px solid var(--uui-text-primary);
	outline-offset: -2px;
}

.rd-messenger-row__content {
	flex: 1;
	min-width: 0;
}

.rd-messenger-row__heading,
.rd-messenger-row__preview {
	justify-content: space-between;
	gap: var(--uui-spacing-md);
}

.rd-messenger-row__heading strong,
.rd-messenger-row__snippet,
.rd-messenger-row__archive-content .rd-messenger-row__preview > span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rd-messenger-row__status {
	display: flex;
	flex: none;
	align-items: center;
	gap: var(--uui-spacing-sm);
}

.rd-messenger-row__status .uui-icon {
	--uui-icon-size: var(--uui-spacing-xl);
}

.rd-messenger-row__heading strong {
	font-size: var(--uui-text-sm-font-size);
	font-weight: var(--uui-font-weight-semibold);
}

.rd-messenger-row__heading time,
.rd-messenger-row__preview {
	font-size: var(--uui-text-xs-font-size);
	line-height: var(--uui-text-xs-line-height);
	color: var(--uui-text-tertiary);
}

.rd-messenger-row__heading time {
	flex: none;
	white-space: nowrap;
}

.rd-messenger-row__archive-content {
	display: flex;
	flex: 1;
	align-items: center;
	min-width: 0;
	gap: var(--uui-spacing-lg);
	padding: var(--uui-spacing-lg) var(--uui-spacing-md) var(--uui-spacing-lg) var(--uui-spacing-xl);
}

.rd-messenger-row__restore {
	margin-right: var(--uui-spacing-xl);
	padding: var(--uui-spacing-md) 0;
	font: inherit;
	font-size: var(--uui-text-xs-font-size);
	font-weight: var(--uui-font-weight-semibold);
	color: var(--uui-text-brand-secondary);
	background: transparent;
	border: 0;
	cursor: pointer;
}

.rd-messenger-empty,
.rd-messenger-loading {
	display: grid;
	place-items: center;
	padding: var(--uui-spacing-4xl);
}

.rd-messenger-thread {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: auto minmax(0, 1fr) auto;
}

.rd-messenger-thread__header {
	position: relative;
	inset: auto;
	height: auto;
	min-height: var(--uui-spacing-7xl);
	gap: var(--uui-spacing-lg);
	padding: var(--uui-spacing-lg) var(--uui-spacing-xl);
	background: var(--uui-bg-primary);
	border-bottom: 1px solid var(--uui-border-secondary);
}

.rd-messenger-thread__back {
	display: none;
}

.rd-messenger-thread__identity {
	flex: 1;
}

.rd-messenger-thread__identity strong {
	overflow: hidden;
	font-size: var(--uui-text-md-font-size);
	font-weight: var(--uui-font-weight-semibold);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rd-messenger-thread__actions {
	margin-left: auto;
}

.rd-messenger-shell .rd-messenger-thread__messages {
	grid-column: 1;
	grid-row: 2;
	position: relative;
	inset: auto;
	min-height: 0;
	padding: var(--uui-spacing-xl);
	background: var(--uui-bg-primary);
}

.rd-messenger-drop-zone {
	grid-column: 1;
	grid-row: 2;
	z-index: 3;
	inline-size: auto;
	min-width: 0;
	min-height: 0;
	margin: var(--uui-spacing-xl);
}

.rd-messenger-shell .rd-messenger-thread .rd-messenger-drop-zone .uui-file-upload-base__root {
	inline-size: 100% !important;
	block-size: 100%;
	min-height: 0;
	box-sizing: border-box;
	margin: 0;
	justify-content: center;
	background: color-mix(in srgb, var(--uui-bg-brand-primary) 94%, transparent);
	border-style: dashed;
}

.rd-messenger-shell .pchat_msg_row {
	align-items: flex-start;
	gap: var(--uui-spacing-lg);
	margin-bottom: var(--uui-spacing-2xl);
}

.rd-messenger-day-separator,
.rd-messenger-system-message {
	display: flex;
	justify-content: center;
	width: 100%;
}

.rd-messenger-day-separator {
	margin: var(--uui-spacing-2xl) 0;
}

.rd-messenger-day-separator span,
.rd-messenger-system-message span {
	padding: var(--uui-spacing-xs) var(--uui-spacing-lg);
	font-size: var(--uui-text-xs-font-size);
	line-height: var(--uui-text-xs-line-height);
	text-align: center;
	color: var(--uui-text-tertiary);
	background: var(--uui-bg-secondary);
	border-radius: var(--uui-radius-full);
}

.rd-messenger-day-separator span {
	font-weight: var(--uui-font-weight-semibold);
}

.rd-messenger-system-message {
	margin: var(--uui-spacing-md) 0 var(--uui-spacing-xl);
}

.rd-messenger-system-message span {
	max-width: min(80%, var(--uui-paragraph-max-width));
	border-radius: var(--uui-radius-md);
}

.rd-messenger-shell .pchat_msg {
	min-width: 0;
	max-width: min(70%, var(--uui-paragraph-max-width));
	margin: 0;
	padding: 0;
	border-radius: 0;
}

.rd-messenger-shell .pchat_msg_dir_outbound .pchat_msg {
	margin-left: auto;
}

.rd-messenger-message-avatar {
	flex: none;
}

.rd-messenger-message-header {
	display: flex;
	align-items: baseline;
	gap: var(--uui-spacing-lg);
	margin-bottom: var(--uui-spacing-md);
}

.rd-messenger-message-author {
	flex: 1;
	min-width: 0;
	overflow-wrap: anywhere;
	font-size: var(--uui-text-sm-font-size);
	font-weight: var(--uui-font-weight-medium);
	line-height: var(--uui-text-sm-line-height);
	color: var(--uui-text-secondary);
}

.rd-messenger-shell .pchat_msg_body {
	display: block;
	box-sizing: border-box;
	max-width: 100%;
	padding: var(--uui-spacing-md) var(--uui-spacing-lg);
	color: var(--uui-text-primary);
	border: 1px solid var(--uui-border-secondary);
	border-radius: var(--uui-radius-md);
	box-shadow: none;
}

.rd-messenger-reply-quote {
	min-width: 0;
	padding: var(--uui-spacing-md) var(--uui-spacing-lg);
	background: var(--uui-bg-secondary);
	border-left: var(--uui-spacing-xs) solid var(--uui-border-brand);
	border-radius: var(--uui-radius-sm);
}

.rd-messenger-broadcast-origin {
	display: flex;
	align-items: center;
	gap: var(--uui-spacing-xs);
	margin-bottom: var(--uui-spacing-md);
	font-size: var(--uui-text-sm-font-size);
	font-weight: var(--uui-font-weight-semibold);
	color: var(--uui-text-secondary);
}

.rd-messenger-broadcast-origin .uui-icon {
	--uui-icon-size: var(--uui-spacing-xl);
}

.rd-messenger-broadcast-reply-hint {
	margin-top: var(--uui-spacing-md);
	font-size: var(--uui-text-xs-font-size);
	color: var(--uui-text-tertiary);
}

.rd-messenger-reply-quote--message {
	margin-bottom: var(--uui-spacing-md);
}

.rd-messenger-reply-quote--composer {
	flex: 1;
	padding: 0;
	background: transparent;
	border: 0;
}

.rd-messenger-reply-quote strong {
	margin-bottom: var(--uui-spacing-xxs);
	font-size: var(--uui-text-xs-font-size);
	font-weight: var(--uui-font-weight-semibold);
	color: var(--uui-text-brand-secondary);
}

.rd-messenger-reply-quote span {
	white-space: pre-line;
	overflow-wrap: anywhere;
}

.rd-messenger-shell .pchat_msg_row.pchat_msg_dir_inbound .pchat_msg .pchat_msg_body {
	background: var(--uui-bg-secondary);
	border-top-left-radius: 0;
}

.rd-messenger-shell .pchat_msg_row.pchat_msg_dir_outbound .pchat_msg .pchat_msg_body {
	background: var(--uui-bg-primary);
	border-top-right-radius: 0;
}

.rd-messenger-shell .pchat_msg_row[data-is-file="true"][data-is-image="false"] .pchat_msg_body {
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.rd-messenger-file-card {
	display: flex;
	align-items: center;
	width: min(var(--uui-width-sm), 70vw);
	max-width: 100%;
	min-height: var(--uui-spacing-8xl);
	box-sizing: border-box;
	gap: var(--uui-spacing-xl);
	padding: var(--uui-spacing-lg) var(--uui-spacing-xl);
	color: var(--uui-text-primary);
	text-decoration: none;
	background: var(--uui-bg-primary);
	border: 1px solid var(--uui-border-secondary);
	border-radius: var(--uui-radius-md);
	box-shadow: var(--uui-shadow-xs);
}

.rd-messenger-shell .pchat_msg_body > a:has(> img) {
	display: block;
}

.rd-messenger-shell .pchat_msg_body > a > img {
	display: block;
	max-width: 100%;
	height: auto;
}

.rd-messenger-shell .pchat_msg_body > .rd-messenger-file-card,
.rd-messenger-shell .pchat_msg_body > a:has(> img) {
	margin-top: var(--uui-spacing-lg);
}

.rd-messenger-file-card:hover {
	color: var(--uui-text-primary);
	border-color: var(--uui-border-primary);
	box-shadow: var(--uui-shadow-sm);
}

.rd-messenger-file-card:focus-visible {
	outline: 2px solid var(--uui-border-brand);
	outline-offset: 2px;
}

.rd-messenger-file-card__icon {
	position: relative;
	flex: none;
	width: var(--uui-spacing-6xl);
	height: var(--uui-spacing-6xl);
	color: var(--uui-fg-quaternary);
}

.rd-messenger-file-card__icon > .uui-icon {
	--uui-icon-size: var(--uui-spacing-6xl);
}

.rd-messenger-file-card__type {
	position: absolute;
	bottom: 1px;
	left: -2px;
	max-width: var(--uui-spacing-6xl);
	padding: 1px var(--uui-spacing-xs);
	overflow: hidden;
	font-size: var(--uui-text-xs-font-size);
	font-weight: var(--uui-font-weight-semibold);
	line-height: var(--uui-text-xs-line-height);
	color: var(--uui-text-white);
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
	background: var(--uui-bg-error-solid);
	border-radius: var(--uui-radius-xs);
}

.rd-messenger-file-card__body {
	min-width: 0;
}

.rd-messenger-file-card__name,
.rd-messenger-file-card__size {
	display: block;
}

.rd-messenger-file-card__name {
	overflow: hidden;
	font-size: var(--uui-text-md-font-size);
	font-weight: var(--uui-font-weight-medium);
	line-height: var(--uui-text-md-line-height);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rd-messenger-file-card__size {
	font-size: var(--uui-text-sm-font-size);
	line-height: var(--uui-text-sm-line-height);
	color: var(--uui-text-tertiary);
}

.rd-messenger-shell .pchat_msg_datetime,
.rd-messenger-shell .pchat_msg_meta {
	color: var(--uui-text-tertiary);
}

.rd-messenger-message-meta {
	display: flex;
	align-items: center;
	flex: none;
	gap: var(--uui-spacing-xs);
	margin: 0;
	font-size: var(--uui-text-xs-font-size);
	white-space: nowrap;
}

.rd-messenger-shell .pchat_msg_dir_outbound .rd-messenger-message-meta {
	justify-content: flex-end;
}

.rd-messenger-message-meta .pchat_msg_datetime {
	margin: 0;
	font-size: inherit;
	font-weight: var(--uui-font-weight-regular);
	letter-spacing: 0;
}

.rd-messenger-shell .rd-messenger-status-icon {
	display: inline-flex;
	align-items: center;
	color: var(--uui-fg-tertiary);
}

.rd-messenger-shell .rd-msg-is-read .rd-messenger-status-icon {
	color: var(--uui-fg-brand-primary);
}

.rd-messenger-shell .rd-messenger-status-icon .uui-icon {
	--uui-icon-size: var(--uui-spacing-xl);
	color: inherit;
}

.rd-messenger-shell .rd-messenger-status-icon__second {
	margin-left: calc(var(--uui-spacing-md) * -1);
}

.rd-messenger-composer {
	position: relative;
	inset: auto;
	display: grid;
	min-width: 0;
	gap: var(--uui-spacing-lg);
	min-height: var(--uui-spacing-8xl);
	padding: var(--uui-spacing-lg) var(--uui-spacing-xl);
	background: var(--uui-bg-primary);
	border-top: 1px solid var(--uui-border-secondary);
}

.rd-messenger-shell .rd-messenger-composer > div {
	position: static;
	box-shadow: none;
}

.rd-messenger-attachments {
	min-width: 0;
	max-height: min(35dvh, var(--uui-width-xs));
	overflow-y: auto;
	padding: 0;
	background: var(--uui-bg-primary);
}

.rd-messenger-attachments__header,
.rd-messenger-attachments__actions {
	display: flex;
	align-items: center;
	gap: var(--uui-spacing-sm);
}

.rd-messenger-attachments__header {
	justify-content: space-between;
	font-size: var(--uui-text-sm-font-size);
}

.rd-messenger-attachments__item {
	display: grid;
	grid-template-columns: var(--uui-spacing-5xl) minmax(0, 1fr) auto;
	gap: var(--uui-spacing-lg);
	margin-top: var(--uui-spacing-md);
	padding: var(--uui-spacing-lg);
	border: 1px solid var(--uui-border-secondary);
	border-radius: var(--uui-radius-md);
}

.rd-messenger-attachments__icon {
	width: 100%;
	height: var(--uui-spacing-5xl);
	object-fit: contain;
}

.rd-messenger-attachments__details,
.rd-messenger-attachments__name,
.rd-messenger-attachments__status {
	min-width: 0;
	overflow-wrap: anywhere;
	font-size: var(--uui-text-sm-font-size);
}

.rd-messenger-attachments__status {
	color: var(--uui-text-secondary);
	margin-bottom: var(--uui-spacing-sm);
}

.rd-messenger-attachments .uui-progress-bar__root {
	inline-size: 100% !important;
}

.rd-messenger-composer__controls {
	display: grid;
	min-width: 0;
	grid-template-columns: auto auto minmax(0, 1fr) auto;
	gap: var(--uui-spacing-md);
}

.rd-messenger-composer__controls > uui-button-utility,
.rd-messenger-composer__send {
	align-self: center;
}

/* The row always keeps its height; only the text fades, so the thread never jumps. */
.rd-messenger-composer__hint {
	grid-column: 1 / 4;
	margin-top: calc(var(--uui-spacing-sm) - var(--uui-spacing-md));
	padding-inline-start: var(--uui-spacing-md);
	font-size: var(--uui-text-xs-font-size);
	line-height: var(--uui-text-xs-line-height);
	color: var(--uui-text-tertiary);
	opacity: 0;
	transition: opacity 150ms;
}

.rd-messenger-composer__hint[data-visible="true"] {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.rd-messenger-composer__hint {
		transition: none;
	}
}

.rd-messenger-composer__controls[data-dictation-active="true"] > uui-button-utility,
.rd-messenger-composer__controls[data-dictation-active="true"] > .rd-messenger-composer__send {
	display: none;
}

.rd-messenger-composer__controls[data-dictation-active="true"] > pc-ai-text-input {
	grid-column: 1 / -1;
	min-width: 0;
}

@media (max-width: 360px) {
	.rd-messenger-composer__controls:not([data-dictation-active="true"]) > pc-ai-text-input {
		grid-column: 1 / 4;
		grid-row: 1;
	}

	.rd-messenger-composer__controls:not([data-dictation-active="true"]) > uui-button-utility {
		grid-row: 2;
	}

	.rd-messenger-composer__send {
		grid-column: 4;
		grid-row: 1;
	}
}

.rd-messenger-composer__input .pc-ai-text-input-input,
.rd-messenger-composer__input .pc-ai-text-input-textarea {
	display: block;
	inline-size: 100% !important;
	min-height: var(--uui-spacing-6xl);
	resize: none;
	padding: var(--uui-spacing-lg) var(--uui-spacing-6xl) var(--uui-spacing-lg) var(--uui-spacing-lg);
	font-family: inherit;
	font-size: var(--uui-text-sm-font-size);
	line-height: var(--uui-text-sm-line-height);
	color: var(--uui-text-primary);
	background: var(--uui-bg-primary);
	border-color: var(--uui-border-primary);
	border-radius: var(--uui-radius-md);
}

.rd-messenger-composer__input .pc-ai-text-input-input:focus,
.rd-messenger-composer__input .pc-ai-text-input-textarea:focus {
	border-color: var(--uui-border-brand);
	box-shadow: var(--uui-focus-ring);
}

.rd-messenger-mention-popover {
	position: absolute;
	inset-inline: var(--uui-spacing-xl);
	bottom: calc(100% + var(--uui-spacing-md));
	z-index: 6;
	max-height: min(var(--uui-spacing-10xl), 35vh);
	overflow: auto;
	padding: var(--uui-spacing-xs);
	background: var(--uui-bg-primary);
	border: 1px solid var(--uui-border-secondary);
	border-radius: var(--uui-radius-md);
	box-shadow: var(--uui-shadow-lg);
}

.rd-messenger-mention-popover button[role="option"] {
	width: 100%;
	min-height: var(--uui-spacing-6xl);
	padding: var(--uui-spacing-md) var(--uui-spacing-lg);
	font: inherit;
	font-size: var(--uui-text-sm-font-size);
	text-align: left;
	color: var(--uui-text-primary);
	background: var(--uui-bg-primary);
	border: 0;
	border-radius: var(--uui-radius-sm);
	overflow-wrap: anywhere;
}

.rd-messenger-mention-popover button[aria-selected="true"],
.rd-messenger-mention-popover button[role="option"]:hover {
	background: var(--uui-bg-brand-primary);
}

.rd-messenger-mention-status {
	padding: var(--uui-spacing-md) var(--uui-spacing-lg);
	font-size: var(--uui-text-sm-font-size);
	color: var(--uui-text-secondary);
	overflow-wrap: anywhere;
}

.rd-messenger-structured-message {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.rd-messenger-mention {
	color: var(--uui-text-brand-secondary);
	border-radius: var(--uui-radius-xs);
	padding: var(--uui-spacing-xxs);
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

.rd-messenger-mention--self {
	font-weight: var(--uui-font-weight-semibold);
	color: var(--uui-text-white);
	background: var(--uui-bg-brand-solid);
}

.rd-messenger-composer__input .rd-ai-text-input-overlay {
	color: var(--uui-text-primary);
	background: var(--uui-bg-primary);
	border-radius: var(--uui-radius-md);
}

.rd-messenger-composer__input .rd-messenger-structured-message {
	overflow-wrap: break-word;
}

.rd-messenger-composer__input .rd-messenger-structured-message::after {
	content: "\200b";
}

.rd-messenger-composer__input .rd-messenger-mention {
	margin-inline: calc(-1 * var(--uui-spacing-xxs));
	font-weight: inherit;
}

.rd-messenger-composer__input .rd-ai-text-input-overlay-active textarea.pc-ai-text-input-textarea {
	caret-color: var(--uui-text-primary);
}

.rd-messenger-composer__input .rd-ai-text-input-overlay-active textarea.pc-ai-text-input-textarea::selection {
	color: var(--uui-text-primary);
}

/* Stays centred while the field grows; margin instead of transform, which the pulse animation owns. */
.rd-messenger-composer__input .pc-ai-text-input-mic {
	inset-block: 0;
	margin-block: auto;
}

.rd-messenger-composer__input .pc-ai-text-input-mic.idle {
	color: var(--uui-fg-quaternary);
	background: transparent;
	border-color: transparent;
}

.rd-messenger-composer__input .pc-ai-text-input-mic.idle:hover {
	color: var(--uui-fg-secondary);
	background: var(--uui-bg-primary_hover);
	border-color: transparent;
}

.rd-messenger-emoji-popover {
	position: absolute !important;
	right: auto !important;
	bottom: calc(100% + var(--uui-spacing-md)) !important;
	left: calc(var(--uui-spacing-xl) + var(--uui-spacing-4xl) + var(--uui-spacing-md)) !important;
	z-index: 5;
	overflow: hidden;
	max-width: min(var(--uui-width-xs), calc(100vw - var(--uui-spacing-3xl)));
	background: var(--uui-bg-primary);
	border: 1px solid var(--uui-border-secondary);
	border-radius: var(--uui-radius-lg);
	box-shadow: var(--uui-shadow-lg) !important;
}

.rd-messenger-emoji-picker {
	display: block;
	max-width: 100%;
	--background: var(--uui-bg-primary);
	--border-color: var(--uui-border-secondary);
	--border-radius: var(--uui-radius-lg);
	--category-font-color: var(--uui-text-primary);
	--indicator-color: var(--uui-bg-brand-solid);
	--input-border-color: var(--uui-border-primary);
	--input-font-color: var(--uui-text-primary);
	--input-placeholder-color: var(--uui-text-placeholder);
	--outline-color: var(--uui-border-brand);
}

.rd-messenger-composer__reply {
	justify-content: space-between;
	gap: var(--uui-spacing-lg);
	margin-bottom: var(--uui-spacing-md);
	padding: var(--uui-spacing-md) var(--uui-spacing-lg);
	background: var(--uui-bg-secondary);
	border-left: var(--uui-spacing-xs) solid var(--uui-border-brand);
	border-radius: var(--uui-radius-sm);
}

.rd-messenger-composer__reply span {
	max-height: var(--uui-spacing-10xl);
	overflow: auto;
}

.rd-messenger-composer__readonly {
	padding: var(--uui-spacing-lg);
	font-size: var(--uui-text-sm-font-size);
	text-align: center;
	color: var(--uui-text-tertiary);
}

@media (max-width: 800px) {
	.rd-messenger-frame {
		--rd-messenger-viewport-offset: var(--uui-spacing-11xl);
	}

	.pchat_wrap.rd-messenger-shell {
		--rd-messenger-sidebar-width: 100%;
		height: calc(100dvh - var(--uui-spacing-11xl));
		max-height: calc(100dvh - var(--uui-spacing-11xl)) !important;
		min-height: 0;
		border-radius: 0;
	}

	.rd-messenger-shell.pchat_wrap_viewMode_conversation .pchat_conversation {
		left: 0;
	}

	.rd-messenger-shell.pchat_wrap_viewMode_both[data-chat-mode="user"] .pchat_overview,
	.rd-messenger-shell.pchat_wrap_viewMode_both[data-chat-mode="group"] .pchat_overview,
	.rd-messenger-shell.pchat_wrap_viewMode_both[data-chat-mode="moderation"] .pchat_overview,
	.rd-messenger-shell.pchat_wrap_viewMode_both[data-chat-mode="none"] .pchat_conversation {
		display: none;
	}

	.rd-messenger-shell.pchat_wrap_viewMode_both[data-chat-mode="user"] .pchat_conversation,
	.rd-messenger-shell.pchat_wrap_viewMode_both[data-chat-mode="group"] .pchat_conversation,
	.rd-messenger-shell.pchat_wrap_viewMode_both[data-chat-mode="moderation"] .pchat_conversation {
		left: 0;
	}

	.rd-messenger-shell .rd-messenger-thread__back,
	.rd-messenger-shell.pchat_wrap_viewMode_both .rd-messenger-thread__back {
		display: block;
		width: auto;
	}

	.rd-messenger-overview__header,
	.rd-messenger-composer,
	.rd-messenger-shell .rd-messenger-thread__messages {
		padding-inline: var(--uui-spacing-lg);
	}

	.rd-messenger-emoji-popover {
		left: clamp(var(--uui-spacing-lg), calc(100% - var(--uui-width-xs) - var(--uui-spacing-lg)), calc(var(--uui-spacing-lg) + var(--uui-spacing-4xl) + var(--uui-spacing-md))) !important;
		max-width: calc(100% - var(--uui-spacing-lg) * 2);
	}
}

@media (max-width: 400px) {
	.rd-messenger-emoji-picker {
		--num-columns: 6;
		--category-emoji-size: var(--uui-text-lg-font-size);
		--category-emoji-padding: var(--uui-spacing-sm);
	}
}