.msp-chat-directory,
.msp-chat-widget,
.msp-operator,
.msp-customer-page {
	--msp-font-sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	--msp-color-ink: #182432;
	--msp-color-muted: #5f7085;
	--msp-color-soft: #8392a4;
	--msp-color-line: #d8e0e8;
	--msp-color-surface: #ffffff;
	--msp-color-surface-alt: #f4f6f8;
	--msp-color-surface-strong: #e8edf3;
	--msp-color-brand: #173b73;
	--msp-color-brand-strong: #0d2b59;
	--msp-color-brand-soft: #e7eef8;
	--msp-color-success: #23824f;
	--msp-color-warning: #b67a12;
	--msp-color-danger: #b53333;
	--msp-color-shadow: rgba(13, 31, 56, 0.12);
	--msp-color-shadow-strong: rgba(13, 31, 56, 0.2);
	--msp-radius-sm: 0.45rem;
	--msp-radius-md: 0.6rem;
	--msp-radius-lg: 0;
	--msp-space-1: 0.35rem;
	--msp-space-2: 0.6rem;
	--msp-space-3: 0.9rem;
	--msp-space-4: 1.2rem;
	--msp-space-5: 1.6rem;
	--msp-space-6: 2.1rem;
	--msp-space-7: 2.8rem;
	--msp-border: 1px solid var(--msp-color-line);
	--msp-shadow-sm: 0 0.35rem 1rem var(--msp-color-shadow);
	--msp-shadow-md: 0 1rem 2.6rem var(--msp-color-shadow);
	--msp-shadow-lg: 0 1.4rem 3.5rem var(--msp-color-shadow-strong);
	--msp-transition-fast: 160ms ease;
	--msp-transition-base: 240ms ease;
	--msp-chat-thread-min-height: clamp(8rem, 32dvh, 14rem);
	font-family: var(--msp-font-sans);
	color: var(--msp-color-ink);
}

.msp-chat-directory *,
.msp-chat-widget *,
.msp-operator *,
.msp-customer-page * {
	box-sizing: border-box;
}

.msp-chat-directory {
	position: relative;
	padding: var(--msp-space-6);
	border: var(--msp-border);
	border-radius: var(--msp-radius-lg);
	background:
		linear-gradient(180deg, #f8fafc 0%, #f1f4f7 100%);
	box-shadow: var(--msp-shadow-md);
	overflow: clip;
}

.msp-chat-directory::before {
	content: "";
	position: absolute;
	inset: 0 auto auto 0;
	width: min(28rem, 55%);
	height: 1px;
	background: linear-gradient(90deg, rgba(23, 59, 115, 0.3), transparent);
}

.msp-chat-directory__header {
	position: relative;
	z-index: 1;
	max-width: 42rem;
	margin-bottom: var(--msp-space-6);
}

.msp-chat-directory__eyebrow,
.msp-operator__eyebrow {
	margin: 0 0 var(--msp-space-2);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--msp-color-soft);
}

.msp-chat-directory__title {
	margin: 0;
	font-size: clamp(2rem, 3vw, 3rem);
	line-height: 1.05;
	letter-spacing: -0.04em;
}

.msp-chat-directory__description,
.msp-operator__intro {
	max-width: 38rem;
	margin: var(--msp-space-3) 0 0;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--msp-color-muted);
}

.msp-chat-directory__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: var(--msp-space-4);
}

.msp-chat-card {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr);
	align-items: start;
	gap: var(--msp-space-4);
	padding: var(--msp-space-4);
	border: 1px solid rgba(23, 59, 115, 0.12);
	border-radius: var(--msp-radius-lg);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: var(--msp-shadow-sm);
	transition: border-color var(--msp-transition-fast);
}

.msp-chat-card:hover {
	border-color: rgba(23, 59, 115, 0.22);
}

.msp-chat-card__image {
	width: 104px;
	height: 104px;
	object-fit: cover;
	border-radius: 0;
}

.msp-chat-card__content {
	display: grid;
	align-content: start;
	gap: var(--msp-space-3);
	min-width: 0;
	width: 100%;
}

.msp-chat-card__topline h3 {
	margin: 0;
	font-size: 1.3rem;
	line-height: 1.2;
}

.msp-chat-card__status {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: var(--msp-space-2) 0 0;
	font-size: 0.83rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--msp-color-muted);
}

.msp-chat-card__dot {
	width: 0.8rem;
	height: 0.8rem;
	display: inline-block;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--msp-color-danger);
}

.msp-chat-card__status.is-online .msp-chat-card__dot,
.msp-chat-card__status-dot.is-online {
	background: #148047;
}

.msp-chat-card__status.is-offline .msp-chat-card__dot,
.msp-chat-card__status-dot.is-offline {
	background: #a51d2d;
}

.msp-chat-card__status.is-away .msp-chat-card__dot,
.msp-chat-card__status-dot.is-away {
	background: #b26a00;
}

.msp-chat-card__details {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	gap: var(--msp-space-3);
	margin-top: 0;
}

.msp-chat-card__detail {
	display: grid;
	gap: 0.15rem;
	margin: 0;
}

.msp-chat-card__detail-label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--msp-color-soft);
}

.msp-chat-card__detail a {
	color: var(--msp-color-brand);
	text-decoration: none;
	word-break: break-word;
}

.msp-chat-card__detail a:hover {
	text-decoration: underline;
}

.msp-chat-card__body {
	margin: 0;
	max-width: 62ch;
	line-height: 1.55;
	color: var(--msp-color-muted);
}

.msp-chat-card__button,
.msp-chat-widget__send,
.msp-chat-widget__resume,
.msp-operator__composer button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-height: 2.75rem;
	padding: 0.72rem 1.05rem;
	border-radius: var(--msp-radius-md);
	border: 0;
	font: inherit;
	font-weight: 700;
	letter-spacing: 0.01em;
	cursor: pointer;
	white-space: nowrap;
	transition:
		background var(--msp-transition-fast),
		box-shadow var(--msp-transition-fast),
		color var(--msp-transition-fast);
}

.msp-chat-card__button {
	justify-self: start;
}

.msp-chat-card__button,
.msp-chat-widget__send,
.msp-operator__composer button {
	background: var(--msp-color-brand);
	color: #fff;
	box-shadow: 0 0.75rem 1.5rem rgba(23, 59, 115, 0.2);
}

.msp-chat-card__button {
	box-shadow: none;
}

.msp-chat-card__button:hover,
.msp-chat-widget__send:hover,
.msp-operator__composer button:hover {
	background: var(--msp-color-brand-strong);
}

.msp-chat-widget__resume {
	background: transparent;
	color: var(--msp-color-brand);
	box-shadow: inset 0 0 0 1px rgba(23, 59, 115, 0.2);
}

.msp-chat-widget__resume:hover {
	background: var(--msp-color-brand-soft);
}

.msp-chat-widget {
	position: fixed;
	right: var(--msp-space-4);
	bottom: var(--msp-space-4);
	z-index: 200;
	width: min(410px, calc(100vw - 2rem));
	max-width: calc(100vw - 2rem);
	max-height: calc(100vh - 1rem);
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	border: 1px solid rgba(23, 59, 115, 0.14);
	border-radius: var(--msp-radius-lg);
	background: var(--msp-color-surface);
	box-shadow: var(--msp-shadow-lg);
	overflow: hidden;
}

.msp-chat-widget[hidden] {
	display: none;
}

.msp-chat-widget__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--msp-space-4);
	padding: var(--msp-space-4) var(--msp-space-4) var(--msp-space-3);
	background:
		linear-gradient(135deg, var(--msp-color-brand-strong) 0%, var(--msp-color-brand) 100%);
	color: #fff;
}

.msp-chat-widget__header-actions {
	display: inline-flex;
	align-items: center;
	gap: var(--msp-space-2);
}

.msp-chat-widget__eyebrow {
	margin: 0 0 var(--msp-space-1);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.82;
}

.msp-chat-widget__title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.2;
}

.msp-chat-widget__subtitle {
	margin: var(--msp-space-2) 0 0;
	max-width: 22rem;
	font-size: 0.92rem;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.82);
}

.msp-chat-widget__close {
	width: 2.4rem;
	height: 2.4rem;
	border: 0;
	border-radius: var(--msp-radius-md);
	background: rgba(255, 255, 255, 0.12);
	color: inherit;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	transition: background var(--msp-transition-fast);
}

.msp-chat-widget__page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: var(--msp-radius-md);
	background: rgba(255, 255, 255, 0.12);
	color: inherit;
	transition: background var(--msp-transition-fast);
}

.msp-chat-widget__page-link[hidden] {
	display: none;
}

.msp-chat-widget__page-link svg {
	width: 1.1rem;
	height: 1.1rem;
}

.msp-chat-widget__page-link:hover,
.msp-chat-widget__close:hover {
	background: rgba(255, 255, 255, 0.22);
}

.msp-chat-widget__body {
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	min-height: 0;
	padding: var(--msp-space-4);
	background: var(--msp-color-surface);
}

.msp-chat-widget__thread,
.msp-operator__thread {
	min-height: 230px;
	overflow-y: auto;
	padding: var(--msp-space-4);
	border: 0;
	border-radius: 0;
	background: transparent;
	scrollbar-width: thin;
}

.msp-chat-widget__thread {
	min-height: 0;
	max-height: 380px;
}

.msp-chat-thread-area {
	position: relative;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
}

.msp-chat-thread-area__jump {
	position: absolute;
	right: var(--msp-space-4);
	bottom: var(--msp-space-4);
	z-index: 2;
	margin: 0;
	padding: 0.65rem 0.9rem;
	border: 1px solid rgba(23, 59, 115, 0.16);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.94);
	color: var(--msp-color-brand-strong);
	box-shadow: 0 0.45rem 1.2rem rgba(13, 31, 56, 0.12);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background var(--msp-transition-fast), color var(--msp-transition-fast);
}

.msp-chat-thread-area__jump:hover {
	background: var(--msp-color-brand-soft);
}

.msp-chat-thread-area__jump[hidden] {
	display: none;
}

.msp-chat-widget__identity {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--msp-space-2);
	min-width: 0;
}

.msp-chat-widget__field {
	margin-top: var(--msp-space-2);
	min-width: 0;
}

.msp-chat-widget__field label {
	display: block;
	margin-bottom: var(--msp-space-2);
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--msp-color-muted);
}

.msp-chat-widget__field input,
.msp-chat-widget__field textarea,
.msp-operator__composer textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.82rem 0.95rem;
	border: var(--msp-border);
	border-radius: var(--msp-radius-sm);
	background: #fff;
	font: inherit;
	color: var(--msp-color-ink);
	resize: vertical;
	transition:
		border-color var(--msp-transition-fast),
		box-shadow var(--msp-transition-fast);
}

.msp-chat-widget__field textarea,
.msp-operator__composer textarea {
	display: block;
	min-height: 4.75rem;
}

.msp-chat-widget__field[hidden] {
	display: none;
}

.msp-chat-widget__form,
.msp-operator__composer {
	min-width: 0;
}

.msp-chat-widget__form {
	margin-top: var(--msp-space-3);
}

.msp-chat-widget__field input:focus,
.msp-chat-widget__field textarea:focus,
.msp-operator__composer textarea:focus {
	outline: none;
	border-color: rgba(23, 59, 115, 0.35);
	box-shadow: 0 0 0 0.18rem rgba(23, 59, 115, 0.1);
}

.msp-chat-widget__actions,
.msp-operator__composer-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--msp-space-3);
}

.msp-chat-widget__actions {
	margin-top: var(--msp-space-3);
}

.msp-chat-widget__hint {
	margin: var(--msp-space-3) 0 0;
	font-size: 0.84rem;
	color: var(--msp-color-soft);
}

.msp-chat-widget__status,
.msp-operator__status,
.msp-operator__alert {
	margin: var(--msp-space-2) 0 0;
	font-size: 0.92rem;
	color: var(--msp-color-success);
}

.msp-chat-widget__status.is-error,
.msp-operator__status.is-error {
	color: var(--msp-color-danger);
}

.msp-chat-widget__honeypot {
	position: absolute;
	left: -9999px;
}

.msp-chat-thread {
	display: flex;
	flex-direction: column;
	gap: var(--msp-space-3);
}

.msp-chat-thread__empty {
	color: var(--msp-color-soft);
}

.msp-chat-thread__message {
	display: flex;
}

.msp-chat-thread__message.is-mine {
	justify-content: flex-end;
}

.msp-chat-thread__bubble {
	max-width: min(80%, 32rem);
	padding: 0.9rem 1rem;
	border-radius: var(--msp-radius-md);
	background: var(--msp-color-brand-soft);
}

.msp-chat-thread__message.is-mine .msp-chat-thread__bubble {
	background: var(--msp-color-brand);
	color: #fff;
}

.msp-chat-thread__sender {
	margin-bottom: var(--msp-space-1);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.78;
}

.msp-chat-thread__text {
	line-height: 1.55;
}

.msp-chat-thread__meta {
	margin-top: var(--msp-space-2);
	font-size: 0.72rem;
	opacity: 0.78;
}

.msp-operator {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	height: var(--msp-chat-page-height, 100vh);
	height: var(--msp-chat-page-height, 100dvh);
	min-height: 0;
	border: 0;
	border-radius: var(--msp-radius-lg);
	background: var(--msp-color-surface);
	overflow: hidden;
}

.msp-operator__header {
	display: grid;
	align-items: center;
	padding: var(--msp-space-3) var(--msp-space-4);
	border-bottom: 1px solid rgba(23, 59, 115, 0.08);
	background:
		linear-gradient(180deg, rgba(244, 247, 250, 0.96), rgba(255, 255, 255, 0.98));
	flex-shrink: 0;
	min-width: 0;
	position: relative;
	z-index: 2;
}

.msp-operator__header-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--msp-space-4);
	min-width: 0;
}

.msp-operator__header-identity {
	min-width: 0;
}

.msp-operator .msp-operator__header-identity > h1 {
	margin: 0;
	font-size: 1.2rem;
	line-height: 1.1;
}

.msp-operator__header-label {
	margin: 0 0 0.2rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--msp-color-soft);
}

.msp-operator__header-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: var(--msp-space-3);
}

.msp-operator__header-presence,
.msp-operator__header-push,
.msp-operator__header-person-switch {
	display: flex;
	align-items: center;
	gap: var(--msp-space-3);
	padding: 0;
}

.msp-operator__header-presence label,
.msp-operator__header-push-summary {
	display: grid;
	gap: 0.15rem;
}

.msp-operator__header-presence span,
.msp-operator__header-push-summary span {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--msp-color-soft);
}

.msp-operator__header-presence strong,
.msp-operator__header-push-summary strong {
	font-size: 0.88rem;
	color: var(--msp-color-brand-strong);
}

.msp-operator__header-status {
	display: inline-flex;
	align-items: center;
}

.msp-operator__header-status strong {
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--msp-color-brand-strong);
}

.msp-operator__header-push-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	padding: 0.2rem;
	border: 1px solid rgba(23, 59, 115, 0.12);
	background: var(--msp-color-surface);
}

.msp-operator__header-push-toggle label {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.55rem;
	cursor: pointer;
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--msp-color-muted);
}

.msp-operator__header-push-toggle input {
	margin: 0;
}

.msp-operator__header-select select {
	min-height: 2rem;
	padding: 0.35rem 1.6rem 0.35rem 0.55rem;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--msp-color-brand-strong);
}

.msp-operator__header-note {
	max-width: 14rem;
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.35;
	color: var(--msp-color-muted);
}

.msp-operator__header-note.is-error {
	color: var(--msp-color-danger);
}

.msp-operator__workspace {
	display: grid;
	grid-template-columns: var(--msp-operator-sidebar-width, 320px) 10px minmax(0, 1fr) 10px var(--msp-operator-tools-width, 320px);
	height: 100%;
	min-height: 0;
	min-width: 0;
}

.msp-operator__sidebar {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	min-height: 0;
	border-right: 1px solid rgba(23, 59, 115, 0.08);
	background: var(--msp-color-surface-alt);
	overflow: hidden;
	transition: opacity var(--msp-transition-fast), border-color var(--msp-transition-fast);
}

.msp-operator__sidebar-controls {
	display: grid;
	gap: var(--msp-space-3);
	padding: var(--msp-space-4);
	border-bottom: 1px solid rgba(23, 59, 115, 0.08);
	background: rgba(255, 255, 255, 0.58);
}

.msp-operator__sidebar-filters {
	display: inline-grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.35rem;
	padding: 0.2rem;
	border-radius: var(--msp-radius-md);
	background: rgba(23, 59, 115, 0.08);
}

.msp-operator__sidebar-filter {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	min-height: 2.2rem;
	padding: 0.35rem 0.65rem;
	border: 0;
	border-radius: calc(var(--msp-radius-md) - 0.1rem);
	background: transparent;
	color: var(--msp-color-muted);
	font: inherit;
	font-size: 0.86rem;
	font-weight: 700;
	cursor: pointer;
	transition: background var(--msp-transition-fast), color var(--msp-transition-fast);
}

.msp-operator__sidebar-filter strong {
	min-width: 1.35rem;
	font-size: 0.74rem;
	text-align: center;
}

.msp-operator__sidebar-filter.is-active {
	background: #fff;
	color: var(--msp-color-brand-strong);
	box-shadow: var(--msp-shadow-sm);
}

.msp-operator__sidebar-search {
	display: grid;
	gap: 0.35rem;
}

.msp-operator__sidebar-search-label {
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--msp-color-soft);
}

.msp-operator__sidebar-search input {
	width: 100%;
	min-height: 2.5rem;
	padding: 0.55rem 0.8rem;
	border: 1px solid rgba(23, 59, 115, 0.14);
	border-radius: var(--msp-radius-sm);
	background: #fff;
	font: inherit;
	color: inherit;
}

.msp-operator__composer {
	padding: var(--msp-space-4);
}

.msp-operator__list {
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow-y: auto;
}

.msp-operator__empty {
	margin: 0;
	padding: var(--msp-space-4);
	color: var(--msp-color-muted);
}

.msp-operator__conversation {
	position: relative;
	z-index: 0;
	border: 0;
	border-top: 1px solid rgba(23, 59, 115, 0.08);
	background: transparent;
	transition:
		background var(--msp-transition-fast),
		color var(--msp-transition-fast);
}

.msp-operator__conversation-button {
	display: block;
	width: 100%;
	padding: var(--msp-space-4);
	padding-right: 3.8rem;
	border: 0;
	background: transparent;
	text-align: left;
	cursor: pointer;
	font: inherit;
	color: inherit;
}

.msp-operator__conversation:hover,
.msp-operator__conversation:focus-within {
	background: rgba(23, 59, 115, 0.05);
}

.msp-operator__conversation.is-active {
	background: linear-gradient(90deg, rgba(23, 59, 115, 0.1), rgba(23, 59, 115, 0.02));
}

.msp-operator__conversation.is-menu-open {
	z-index: 5;
}

.msp-operator__conversation.is-active::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.75rem;
	bottom: 0.75rem;
	width: 3px;
	border-radius: 999px;
	background: var(--msp-color-brand);
}

.msp-operator__conversation-title {
	display: block;
	padding-right: 0;
	font-weight: 700;
}

.msp-operator__conversation-preview {
	display: block;
	margin-top: var(--msp-space-1);
	padding-right: 0;
	color: var(--msp-color-muted);
	line-height: 1.45;
}

.msp-operator__conversation-badge {
	position: absolute;
	top: 1rem;
	right: 3.25rem;
	min-width: 1.55rem;
	padding: 0.15rem 0.45rem;
	border-radius: 999px;
	background: var(--msp-color-danger);
	color: #fff;
	font-size: 0.76rem;
	font-weight: 700;
	text-align: center;
}

.msp-operator__conversation-status {
	display: inline-flex;
	align-items: center;
	margin-top: var(--msp-space-1);
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--msp-color-soft);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.msp-operator__conversation-menu {
	position: absolute;
	top: 0.8rem;
	right: 0.8rem;
	z-index: 2;
}

.msp-operator__conversation-menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(23, 59, 115, 0.08);
	color: var(--msp-color-brand-strong);
	font: inherit;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}

.msp-operator__conversation-menu.is-open .msp-operator__conversation-menu-toggle,
.msp-operator__conversation-menu-toggle:hover {
	background: rgba(23, 59, 115, 0.16);
}

.msp-operator__conversation-menu-panel {
	position: absolute;
	top: calc(100% + 0.35rem);
	right: 0;
	display: grid;
	min-width: 10rem;
	padding: 0.3rem;
	border: 1px solid rgba(23, 59, 115, 0.12);
	border-radius: var(--msp-radius-sm);
	background: rgba(255, 255, 255, 0.99);
	box-shadow: var(--msp-shadow-md);
}

.msp-operator__conversation-menu-panel[hidden] {
	display: none;
}

.msp-operator__conversation-menu-action {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	min-height: 2.2rem;
	padding: 0.45rem 0.65rem;
	border: 0;
	border-radius: calc(var(--msp-radius-sm) - 0.1rem);
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.86rem;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}

.msp-operator__conversation-menu-action:hover {
	background: rgba(23, 59, 115, 0.07);
}

.msp-operator__conversation-menu-action.is-danger {
	color: var(--msp-color-danger);
}

.msp-operator__main {
	position: relative;
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	height: 100%;
	min-height: 0;
	min-width: 400px;
	overflow: hidden;
	background: var(--msp-color-surface);
}

.msp-operator__resizer {
	position: relative;
	min-height: 0;
	background: linear-gradient(180deg, rgba(23, 59, 115, 0.04), rgba(23, 59, 115, 0.1), rgba(23, 59, 115, 0.04));
	cursor: col-resize;
}

.msp-operator__resizer::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 4px;
	height: 3rem;
	transform: translate(-50%, -50%);
	border-radius: 999px;
	background: rgba(23, 59, 115, 0.18);
}

.msp-operator__thread {
	min-height: var(--msp-chat-thread-min-height);
	max-height: none;
	height: 100%;
	min-width: 0;
}

.msp-chat-thread-area--operator {
	display: grid;
	min-height: 0;
	height: 100%;
}

.msp-operator__dock {
	display: grid;
	grid-template-rows: auto auto auto;
	align-content: start;
	max-height: min(46dvh, 18rem);
	min-height: 0;
	overflow-y: auto;
	border-top: 1px solid rgba(23, 59, 115, 0.08);
	background: var(--msp-color-surface);
}

.msp-operator__tools {
	display: grid;
	grid-template-rows: minmax(0, 1fr);
	min-width: 0;
	min-height: 0;
	border-left: 1px solid rgba(23, 59, 115, 0.08);
	background: var(--msp-color-surface-alt);
	overflow: hidden;
	transition: opacity var(--msp-transition-fast), border-color var(--msp-transition-fast);
}

.msp-operator.is-sidebar-collapsed .msp-operator__sidebar,
.msp-operator.is-tools-collapsed .msp-operator__tools {
	opacity: 0;
	pointer-events: none;
}

.msp-operator.is-sidebar-collapsing .msp-operator__sidebar,
.msp-operator.is-tools-collapsing .msp-operator__tools {
	opacity: 0.14;
	pointer-events: none;
}

.msp-operator.is-sidebar-collapsed .msp-operator__sidebar {
	border-right-color: transparent;
}

.msp-operator.is-tools-collapsed .msp-operator__tools {
	border-left-color: transparent;
}

.msp-operator__tools-body {
	display: grid;
	align-content: start;
	gap: var(--msp-space-4);
	min-height: 0;
	min-width: 300px;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-gutter: stable;
	padding: var(--msp-space-4);
}

.msp-operator__tool-panel {
	display: grid;
	gap: var(--msp-space-3);
	padding: var(--msp-space-4);
	border: 1px solid rgba(23, 59, 115, 0.08);
	border-radius: var(--msp-radius-md);
	background: rgba(255, 255, 255, 0.82);
	box-shadow: var(--msp-shadow-sm);
	min-width: 0;
}

.msp-operator__tool-panel-header {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: var(--msp-space-3);
	align-items: center;
}

.msp-operator__tool-panel-heading {
	display: grid;
	gap: 0.3rem;
	min-width: 0;
}

.msp-operator__tool-panel-eyebrow {
	margin: 0;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--msp-color-soft);
}

.msp-operator__tool-panel-title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.25;
	color: var(--msp-color-brand-strong);
}

.msp-operator__tool-panel-description {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--msp-color-muted);
}

.msp-operator__tool-panel-actions {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.msp-operator__tool-panel-toggle,
.msp-operator__tool-panel-drag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 1px solid rgba(23, 59, 115, 0.1);
	border-radius: var(--msp-radius-sm);
	background: rgba(23, 59, 115, 0.04);
	color: var(--msp-color-brand-strong);
	font: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	cursor: pointer;
}

.msp-operator__tool-panel-toggle:hover,
.msp-operator__tool-panel-drag:hover {
	background: rgba(23, 59, 115, 0.1);
}

.msp-operator__tool-panel-drag {
	cursor: grab;
}

.msp-operator__tool-panel-drag:active {
	cursor: grabbing;
}

.msp-operator__tool-panel-drag svg {
	width: 20px;
	height: 20px;
}

.msp-operator__tool-panel-toggle-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	transition: transform var(--msp-transition-fast);
}

.msp-operator__tool-panel-toggle-icon svg {
	width: 20px;
	height: 20px;
}

.msp-operator__tool-panel.is-collapsed .msp-operator__tool-panel-toggle-icon {
	transform: rotate(-90deg);
}

.msp-operator__tool-panel-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.msp-operator__tool-panel-body {
	display: grid;
	gap: var(--msp-space-3);
	min-width: 0;
}

.msp-operator__tool-field {
	display: grid;
	gap: 0.45rem;
}

.msp-operator__tool-label {
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--msp-color-brand-strong);
}

.msp-operator__tool-control {
	width: 100%;
	min-height: 2.6rem;
	padding: 0.55rem 0.8rem;
	border: 1px solid rgba(23, 59, 115, 0.14);
	border-radius: var(--msp-radius-sm);
	background: #fff;
	font: inherit;
	color: inherit;
}

.msp-operator__tool-panel.is-collapsed .msp-operator__tool-panel-body {
	display: none;
}

.msp-operator__tool-panel.is-dragging {
	opacity: 0.5;
}

.msp-operator__tool-panel.is-drop-target {
	border-color: rgba(23, 59, 115, 0.28);
	box-shadow: 0 0 0 2px rgba(23, 59, 115, 0.1);
}

.msp-operator__composer textarea {
	min-height: 4.75rem;
	margin: 0;
}

.msp-operator__composer-actions {
	margin-top: var(--msp-space-3);
}

.msp-operator__status,
.msp-operator__alert {
	padding: 0 var(--msp-space-4) var(--msp-space-3);
}

.msp-operator__status:empty,
.msp-operator__alert:empty {
	display: none;
}

.msp-operator__mobilebar {
	display: none;
}

.msp-customer-page {
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	height: var(--msp-chat-page-height, 100vh);
	height: var(--msp-chat-page-height, 100dvh);
	min-height: 0;
	border: 0;
	border-radius: var(--msp-radius-lg);
	background: var(--msp-color-surface);
	overflow: hidden;
}

.msp-customer-page__workspace {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 10px minmax(240px, var(--msp-customer-tools-width, 320px));
	height: 100%;
	min-height: 0;
}

.msp-customer-page__main {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	min-height: 0;
	overflow: hidden;
	background: var(--msp-color-surface);
}

.msp-customer-page__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--msp-space-4);
	padding: var(--msp-space-5);
	border-bottom: 1px solid rgba(23, 59, 115, 0.08);
	background: rgba(255, 255, 255, 0.62);
}

.msp-customer-page:has([data-msp-person-info-tool]) .msp-customer-page__header,
.msp-customer-page.has-msp-person-info-tool .msp-customer-page__header {
	display: none;
}

.msp-customer-page__eyebrow {
	margin: 0 0 0.25rem;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--msp-color-soft);
}

.msp-customer-page h1.msp-customer-page__title {
	margin: 0;
	font-size: 1.45rem;
	line-height: 1.2;
}

.msp-customer-page__status {
	margin: 0;
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--msp-color-muted);
}

.msp-customer-page__thread {
	min-height: var(--msp-chat-thread-min-height);
	height: 100%;
	overflow: auto;
	padding: var(--msp-space-4);
}

.msp-chat-thread-area--customer-page {
	display: grid;
	min-height: 0;
	height: 100%;
}

.msp-customer-page__form {
	max-height: min(52dvh, 24rem);
	overflow-y: auto;
	padding: var(--msp-space-4);
	border-top: 1px solid rgba(23, 59, 115, 0.08);
	background: var(--msp-color-surface);
}

.msp-customer-page__identity {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--msp-space-3);
}

.msp-customer-page__tools {
	display: grid;
	min-height: 0;
	min-width: 0;
	border-left: 1px solid rgba(23, 59, 115, 0.08);
	background: var(--msp-color-surface-alt);
	overflow: hidden;
}

.msp-customer-page__resizer {
	position: relative;
	min-height: 0;
	background: linear-gradient(180deg, rgba(23, 59, 115, 0.04), rgba(23, 59, 115, 0.1), rgba(23, 59, 115, 0.04));
	cursor: col-resize;
}

.msp-customer-page__resizer::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 4px;
	height: 3rem;
	transform: translate(-50%, -50%);
	border-radius: 999px;
	background: rgba(23, 59, 115, 0.18);
}

.msp-customer-page__mobilebar {
	display: none;
}

body.msp-chat-page {
	margin: 0;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
}

html.msp-chat-page-root {
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
}

html.msp-chat-page-root body.msp-chat-page {
	min-height: 100vh;
	min-height: 100dvh;
}

body.msp-chat-page #content {
	margin: 0;
	max-width: none;
	padding: 0;
	overflow: visible;
}

@media (max-width: 860px) {
	.msp-chat-directory {
		padding: var(--msp-space-5);
	}

	.msp-chat-card {
		grid-template-columns: 88px minmax(0, 1fr);
	}

	.msp-chat-card__image {
		width: 88px;
		height: 88px;
	}

	.msp-chat-widget {
		right: 0.75rem;
		bottom: 0.75rem;
		width: calc(100vw - 1.5rem);
	}

	.msp-operator {
		grid-template-rows: auto minmax(0, 1fr) auto;
	}

	.msp-operator__header {
		padding: 0.55rem 0.8rem;
	}

	.msp-operator__header-main,
	.msp-operator__header-controls {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
	}

	.msp-operator__header-main {
		gap: 0.75rem;
	}

	.msp-operator__header-controls {
		gap: 0.75rem;
	}

	.msp-operator__header-presence,
	.msp-operator__header-push,
	.msp-operator__header-person-switch {
		display: flex;
		align-items: center;
		flex-wrap: nowrap;
		gap: 0.55rem;
		min-width: 0;
	}

	.msp-operator .msp-operator__header-identity > h1 {
		font-size: 1rem;
	}

	.msp-operator__header-label {
		margin-bottom: 0.1rem;
		font-size: 0.64rem;
	}

	.msp-operator__header-push-summary {
		gap: 0.05rem;
	}

	.msp-operator__header-push-summary span,
	.msp-operator__header-presence span {
		font-size: 0.62rem;
	}

	.msp-operator__header-push-summary strong,
	.msp-operator__header-status strong,
	.msp-operator__header-select select,
	.msp-operator__header-push-toggle label {
		font-size: 0.78rem;
	}

	.msp-operator__header-push-toggle {
		padding: 0.15rem;
	}

	.msp-operator__header-push-toggle label {
		padding: 0.28rem 0.42rem;
		gap: 0.25rem;
	}

	.msp-operator__header-select select {
		min-height: 1.8rem;
		padding: 0.25rem 1.35rem 0.25rem 0.45rem;
	}

	.msp-operator__workspace {
		grid-template-columns: 1fr;
		position: relative;
	}

	.msp-operator__sidebar-controls {
		padding: 0.8rem;
		gap: 0.65rem;
	}

	.msp-operator__sidebar-filter {
		padding: 0.32rem 0.55rem;
		font-size: 0.8rem;
	}

	.msp-operator__sidebar-search input {
		min-height: 2.2rem;
		padding: 0.48rem 0.68rem;
	}

	.msp-operator__tools-body {
		gap: var(--msp-space-3);
		padding: 0.8rem;
	}

	.msp-operator__tool-panel {
		padding: 0.9rem;
	}

	.msp-operator__tool-panel-header {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.msp-customer-page__workspace {
		grid-template-columns: 1fr;
		position: relative;
		height: 100%;
		min-height: 0;
	}

	.msp-customer-page__header {
		padding: 0.9rem;
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.msp-customer-page__identity {
		grid-template-columns: 1fr;
	}

	.msp-customer-page__main {
		grid-template-rows: auto minmax(0, 1fr) auto;
		grid-column: 1;
		grid-row: 1;
		height: 100%;
		min-height: 0;
		opacity: 0;
		pointer-events: none;
	}

	.msp-customer-page__thread {
		padding: 0.8rem;
	}

	.msp-customer-page__form {
		padding: 0.9rem;
	}

	.msp-customer-page__form .msp-chat-widget__actions {
		flex-wrap: nowrap;
	}

	.msp-customer-page__form .msp-chat-widget__actions > * {
		flex: 1 1 0;
		min-width: 0;
	}

	.msp-customer-page__resizer {
		display: none;
	}

	.msp-customer-page__tools {
		grid-column: 1;
		grid-row: 1;
		border-left: 0;
		border-top: 1px solid rgba(23, 59, 115, 0.08);
		height: 100%;
		min-height: 0;
		opacity: 0;
		pointer-events: none;
	}

	body.msp-chat-page {
		height: 100vh;
		height: 100dvh;
		overflow: hidden;
	}

	body.msp-chat-page #content {
		height: 100vh;
		height: 100dvh;
		overflow: hidden;
	}

	.msp-customer-page[data-mobile-view="chat"] .msp-customer-page__main,
	.msp-customer-page[data-mobile-view="tools"] .msp-customer-page__tools {
		opacity: 1;
		pointer-events: auto;
	}

	.msp-customer-page__mobilebar {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1px;
		border-top: 1px solid rgba(23, 59, 115, 0.08);
		background: rgba(23, 59, 115, 0.08);
	}

	.msp-customer-page__mobilebar-button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 3.5rem;
		border: 0;
		background: var(--msp-color-surface);
		color: var(--msp-color-muted);
		font: inherit;
		font-size: 0.88rem;
		font-weight: 700;
		cursor: pointer;
	}

	.msp-customer-page__mobilebar-button.is-active {
		color: var(--msp-color-brand-strong);
		background: var(--msp-color-brand-soft);
	}

	.msp-operator__sidebar,
	.msp-operator__main,
	.msp-operator__tools {
		grid-column: 1;
		grid-row: 1;
		height: 100%;
		min-height: 0;
		border: 0;
		opacity: 0;
		pointer-events: none;
	}

	.msp-operator__resizer {
		display: none;
	}

	.msp-operator[data-mobile-view="chats"] .msp-operator__sidebar,
	.msp-operator[data-mobile-view="thread"] .msp-operator__main,
	.msp-operator[data-mobile-view="tools"] .msp-operator__tools {
		opacity: 1;
		pointer-events: auto;
	}

	.msp-operator__mobilebar {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1px;
		border-top: 1px solid rgba(23, 59, 115, 0.08);
		background: rgba(23, 59, 115, 0.08);
	}

	.msp-operator__mobilebar-button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 3.5rem;
		border: 0;
		background: var(--msp-color-surface);
		color: var(--msp-color-muted);
		font: inherit;
		font-size: 0.88rem;
		font-weight: 700;
		cursor: pointer;
	}

	.msp-operator__mobilebar-button.is-active {
		color: var(--msp-color-brand-strong);
		background: var(--msp-color-brand-soft);
	}

	.msp-operator__header-note {
		max-width: none;
	}
}

@media (max-width: 560px) {
	.msp-chat-directory {
		padding: var(--msp-space-4);
	}

	.msp-chat-directory__title {
		font-size: 1.8rem;
	}

	.msp-chat-widget {
		right: 0.5rem;
		bottom: 0.5rem;
		width: calc(100vw - 1rem);
		max-width: calc(100vw - 1rem);
	}

	.msp-chat-card {
		grid-template-columns: 1fr;
	}

	.msp-chat-card__image {
		width: 88px;
		height: 88px;
	}

	.msp-chat-card__details {
		grid-template-columns: 1fr;
	}
}
