/* Feselle Guard chat (E12) — floating bubble + HubSpot-style chat window. */

:root {
	--feselle-chat-accent: #2d5a44;        /* brand green-700 (primary) */
	--feselle-chat-accent-dark: #1b4332;  /* brand green-800 (hover) */
	--feselle-chat-accent-gold: #c9a24a;  /* brand gold-500 (unread / attention) */
	--feselle-chat-accent-gold-dark: #b8902f; /* brand gold-600 (text on light) */
	--feselle-chat-bg: #ffffff;
	--feselle-chat-surface: #faf7f2;      /* brand paper (warm) */
	--feselle-chat-incoming: #faf7f2;     /* incoming bubble = warm paper */
	--feselle-chat-cream: #f6f1ea;        /* outgoing bubble text on green */
	--feselle-chat-border: rgba(26, 43, 34, 0.10);
	--feselle-chat-text: #1a2b22;         /* brand ink */
	--feselle-chat-muted: rgba(26, 43, 34, 0.55);
	--feselle-chat-radius: 8px;
}

/* --- Floating trigger bubble (bottom-right) --- */

.feselle-chat-trigger {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 100000;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	background-color: var(--feselle-chat-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 3C6.5 3 2 6.6 2 11c0 2.2 1.2 4.2 3.1 5.6L4 21l4.6-2.3c1 .3 2.2.5 3.4.5 5.5 0 10-3.6 10-8s-4.5-8-10-8z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 30px 30px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	display: flex;
	align-items: center;
}

.feselle-chat-trigger:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
	background-color: var(--feselle-chat-accent-dark);
}

.feselle-chat-trigger-label {
	position: absolute;
	right: 72px;
	white-space: nowrap;
	background: var(--feselle-chat-text);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 7px 12px;
	border-radius: 8px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.feselle-chat-trigger:hover .feselle-chat-trigger-label {
	opacity: 1;
}

/* --- Chat window (panel) --- */

.feselle-chat-panel {
	position: fixed;
	right: 20px;
	bottom: 92px;
	z-index: 100001;
	width: 360px;
	max-width: calc(100vw - 40px);
	max-height: 70vh;
	display: flex;
	flex-direction: column;
	background: var(--feselle-chat-bg);
	border-radius: 14px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
	overflow: hidden;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--feselle-chat-text);
	animation: feselle-chat-panel-in 0.18s ease;
}

@keyframes feselle-chat-panel-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

/* --- Header: bot avatar + name + online status + close --- */

.feselle-chat-header {
	background: var(--feselle-chat-accent);
	color: #fff;
	padding: 12px 14px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.feselle-chat-header-text {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}

.feselle-chat-header-title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
}

.feselle-chat-header-status {
	font-size: 12px;
	font-weight: 500;
	opacity: 0.92;
	display: flex;
	align-items: center;
	gap: 5px;
}

.feselle-chat-header-status::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #6dffa1;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.feselle-chat-close {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: #fff;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	flex: 0 0 28px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.feselle-chat-close:hover {
	background: rgba(255, 255, 255, 0.35);
}

/* --- Avatars --- */

.feselle-chat-avatar {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background-color: var(--feselle-chat-incoming);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b7178'%3E%3Cpath d='M12 12a4 4 0 100-8 4 4 0 000 8zm0 2c-4 0-8 2-8 5v1h16v-1c0-3-4-5-8-5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 18px 18px;
}

.feselle-chat-avatar.is-bot {
	background-color: var(--feselle-chat-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 3C6.5 3 2 6.6 2 11c0 2.2 1.2 4.2 3.1 5.6L4 21l4.6-2.3c1 .3 2.2.5 3.4.5 5.5 0 10-3.6 10-8s-4.5-8-10-8z'/%3E%3C/svg%3E");
	background-size: 16px 16px;
}

.feselle-chat-header-avatar {
	width: 36px;
	height: 36px;
	flex-basis: 36px;
	background-size: 20px 20px;
}

/* --- Messages --- */

.feselle-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 180px;
	max-height: calc(70vh - 140px);
	background: #fafbfc;
}

.feselle-chat-msg-row {
	display: flex;
	gap: 8px;
	align-items: flex-end;
}

.feselle-chat-msg-row.is-incoming {
	align-self: flex-start;
}

.feselle-chat-msg-row.is-outgoing {
	align-self: flex-end;
	flex-direction: row-reverse;
}

.feselle-chat-msg {
	max-width: 78%;
	padding: 10px 14px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.5;
	word-break: break-word;
	white-space: pre-wrap;
	animation: feselle-chat-pop 0.18s ease;
}

@keyframes feselle-chat-pop {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

.feselle-chat-msg.is-incoming {
	background: var(--feselle-chat-incoming);
	color: var(--feselle-chat-text);
	border-bottom-left-radius: 4px;
}

.feselle-chat-msg.is-outgoing {
	background: var(--feselle-chat-accent);
	color: var(--feselle-chat-cream);
	border-bottom-right-radius: 4px;
}

.feselle-chat-msg.is-autoreply {
	font-style: italic;
	opacity: 0.92;
}

.feselle-chat-msg.is-welcome {
	background: rgba(45, 90, 68, 0.06);
	border: 1px solid rgba(45, 90, 68, 0.16);
}

.feselle-chat-msg-body {
	display: block;
}

.feselle-chat-msg-time {
	display: block;
	font-size: 10px;
	font-style: normal;
	margin-top: 4px;
	opacity: 0.7;
}

.feselle-chat-msg.is-incoming .feselle-chat-msg-time {
	color: var(--feselle-chat-muted);
}

.feselle-chat-msg.is-outgoing .feselle-chat-msg-time {
	color: rgba(246, 241, 234, 0.8);
	text-align: right;
}

.feselle-chat-notice {
	align-self: center;
	background: rgba(216, 183, 104, 0.18);
	color: #8a6100;
	border: 1px solid rgba(216, 183, 104, 0.45);
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 13px;
	text-align: center;
	max-width: 90%;
}

/* --- Input bar --- */

.feselle-chat-form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid var(--feselle-chat-border);
	background: var(--feselle-chat-bg);
}

.feselle-chat-input {
	flex: 1;
	border: 1px solid var(--feselle-chat-border);
	border-radius: 20px;
	padding: 10px 14px;
	font-size: 14px;
	outline: none;
	transition: border-color 0.15s ease;
}

.feselle-chat-input:focus {
	border-color: var(--feselle-chat-accent);
}

.feselle-chat-send {
	background: var(--feselle-chat-accent);
	color: #fff;
	border: none;
	border-radius: 20px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.feselle-chat-send:hover {
	background: var(--feselle-chat-accent-dark);
}

.feselle-chat-send:disabled {
	opacity: 0.6;
	cursor: default;
}

/* --- Inbox (shortcode): two-pane conversation list + chat window --- */

.feselle-chat-inbox,
.feselle-chat-inbox *,
.feselle-chat-inbox *::before,
.feselle-chat-inbox *::after {
	box-sizing: border-box;
}

.feselle-chat-inbox {
	display: flex;
	flex-direction: row;
	width: 100%;
	max-width: 100%;
	height: clamp(480px, 72vh, 680px);
	border: 1px solid var(--feselle-chat-border);
	border-radius: var(--feselle-chat-radius);
	overflow: hidden;
	background: var(--feselle-chat-bg);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--feselle-chat-text);
}

/* Left rail: title + search + filter chips + scrollable thread list. */
.feselle-chat-rail {
	display: flex;
	flex-direction: column;
	width: 300px;
	flex: 0 0 300px;
	min-height: 0;
	border-right: 1px solid var(--feselle-chat-border);
	background: var(--feselle-chat-surface);
}

.feselle-chat-rail-head {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px 14px 12px;
	border-bottom: 1px solid var(--feselle-chat-border);
}

.feselle-chat-rail-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--feselle-chat-accent-dark);
}

.feselle-chat-search {
	width: 100%;
	border: 1px solid var(--feselle-chat-border);
	border-radius: var(--feselle-chat-radius);
	padding: 9px 12px;
	font-size: 14px;
	font-family: inherit;
	color: var(--feselle-chat-text);
	background: #fff;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.feselle-chat-search:focus {
	border-color: var(--feselle-chat-accent);
	box-shadow: 0 0 0 3px rgba(45, 90, 68, 0.14);
}

.feselle-chat-filters {
	display: flex;
	gap: 6px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--feselle-chat-border);
}

.feselle-chat-filter {
	border: none;
	background: transparent;
	color: var(--feselle-chat-muted);
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
	padding: 5px 12px;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.feselle-chat-filter:hover {
	color: var(--feselle-chat-text);
	background: rgba(45, 90, 68, 0.06);
}

.feselle-chat-filter.is-active {
	color: var(--feselle-chat-accent);
	background: rgba(45, 90, 68, 0.10);
}

.feselle-chat-threads {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

/* Empty inbox (no threads yet). */
.feselle-chat-empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 1;
	gap: 8px;
	padding: 32px 24px;
	text-align: center;
}

.feselle-chat-empty-icon,
.feselle-chat-no-thread-icon {
	width: 56px;
	height: 56px;
	flex: 0 0 56px;
	border-radius: 50%;
	background-color: rgba(45, 90, 68, 0.08);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232d5a44'%3E%3Cpath d='M12 3C6.5 3 2 6.6 2 11c0 2.2 1.2 4.2 3.1 5.6L4 21l4.6-2.3c1 .3 2.2.5 3.4.5 5.5 0 10-3.6 10-8s-4.5-8-10-8z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 28px 28px;
}

.feselle-chat-empty-title {
	margin: 6px 0 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--feselle-chat-text);
}

.feselle-chat-empty-hint {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--feselle-chat-muted);
}

.feselle-chat-empty {
	margin: 0;
	padding: 24px 16px;
	font-size: 13px;
	color: var(--feselle-chat-muted);
	text-align: center;
}

/* Conversation row. */
.feselle-chat-thread {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 12px 14px;
	border: none;
	border-bottom: 1px solid var(--feselle-chat-border);
	border-left: 3px solid transparent;
	background: transparent;
	color: var(--feselle-chat-text);
	font-family: inherit;
	font-size: 14px;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.14s ease;
}

.feselle-chat-thread:hover {
	background: rgba(45, 90, 68, 0.04);
}

.feselle-chat-thread.is-active {
	background: rgba(45, 90, 68, 0.07);
	border-left-color: var(--feselle-chat-accent);
}

.feselle-chat-thread-avatar {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(45, 90, 68, 0.10);
	color: var(--feselle-chat-accent);
	font-size: 14px;
	font-weight: 700;
}

.feselle-chat-thread-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
	gap: 3px;
}

.feselle-chat-thread-top {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.feselle-chat-thread-name {
	flex: 1;
	min-width: 0;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--feselle-chat-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.feselle-chat-thread.is-unread .feselle-chat-thread-name {
	font-weight: 700;
}

.feselle-chat-thread-role {
	flex: 0 0 auto;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--feselle-chat-accent-gold-dark);
	background: rgba(216, 183, 104, 0.18);
	padding: 2px 7px;
	border-radius: 999px;
}

.feselle-chat-thread-status {
	flex: 0 0 auto;
	font-size: 11px;
	font-style: italic;
	color: var(--feselle-chat-muted);
}

.feselle-chat-thread-preview {
	font-size: 13.5px;
	line-height: 1.4;
	color: var(--feselle-chat-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.feselle-chat-thread.is-closed .feselle-chat-thread-preview {
	font-style: italic;
}

.feselle-chat-thread-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 5px;
	flex: 0 0 auto;
	margin-left: 8px;
}

.feselle-chat-thread-time {
	font-size: 11.5px;
	color: var(--feselle-chat-muted);
	white-space: nowrap;
}

.feselle-chat-thread.is-unread .feselle-chat-thread-time {
	color: var(--feselle-chat-accent);
	font-weight: 600;
}

.feselle-chat-thread-badge {
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--feselle-chat-accent-gold);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}

/* Right main: chat header + messages + composer. */
.feselle-chat-main {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
	min-height: 0;
	background: var(--feselle-chat-bg);
	position: relative;
}

.feselle-chat-chat-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--feselle-chat-border);
	background: var(--feselle-chat-bg);
	position: sticky;
	top: 0;
	z-index: 5;
}

.feselle-chat-back {
	display: none;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	border: none;
	background: transparent;
	color: var(--feselle-chat-accent);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	border-radius: var(--feselle-chat-radius);
}

.feselle-chat-back:hover {
	background: rgba(45, 90, 68, 0.06);
}

.feselle-chat-chat-avatar {
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(45, 90, 68, 0.10);
	color: var(--feselle-chat-accent);
	font-size: 13px;
	font-weight: 700;
}

.feselle-chat-chat-headtext {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.feselle-chat-chat-name {
	font-size: 15px;
	font-weight: 600;
	color: var(--feselle-chat-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.feselle-chat-chat-role {
	align-self: flex-start;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--feselle-chat-accent-gold-dark);
	background: rgba(216, 183, 104, 0.18);
	padding: 2px 7px;
	border-radius: 999px;
}

.feselle-chat-context {
	flex: 1;
	min-width: 0;
	text-align: right;
	overflow: hidden;
}

.feselle-chat-context-link {
	display: inline-block;
	max-width: 100%;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--feselle-chat-accent);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.feselle-chat-context a.feselle-chat-context-link:hover {
	text-decoration: underline;
}

.feselle-chat-chat-menu {
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	border: none;
	background: transparent;
	color: var(--feselle-chat-accent);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	border-radius: var(--feselle-chat-radius);
}

.feselle-chat-chat-menu:hover {
	background: rgba(45, 90, 68, 0.06);
}

/* Inbox messages pane overrides the shared widget rule: fill the main pane. */
.feselle-chat-inbox .feselle-chat-messages {
	max-height: none;
	padding: 16px;
	gap: 14px;
	background: #fff;
}

/* Cap bubble width on the now-fullwidth inbox so lines stay readable; the
   floating widget keeps the shared 78% max-width (`.feselle-chat-msg`). */
.feselle-chat-inbox .feselle-chat-msg {
	max-width: min(78%, 560px);
}

/* No-thread placeholder (overlays the main pane until a thread is opened). */
.feselle-chat-no-thread {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
	text-align: center;
}

.feselle-chat-no-thread-text {
	margin: 0;
	font-size: 14px;
	color: var(--feselle-chat-muted);
}

/* Date divider between days. */
.feselle-chat-date-divider {
	align-self: center;
	margin: 10px 0 4px;
	padding: 4px 12px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--feselle-chat-muted);
	background: var(--feselle-chat-surface);
	border-radius: 999px;
}

/* Grouped (same-author) message rows sit closer together; the avatar keeps
   its space (visibility:hidden) so the bubble aligns under the first one. */
.feselle-chat-msg-row.is-grouped {
	margin-top: 4px;
}

.feselle-chat-avatar.is-hidden {
	visibility: hidden;
}

/* Inbox composer: brand button + focus ring (scoped so the floating widget's
   pill composer is untouched). */
.feselle-chat-inbox .feselle-chat-form {
	padding: 12px 14px;
	border-top: 1px solid var(--feselle-chat-border);
	background: var(--feselle-chat-bg);
}

.feselle-chat-inbox .feselle-chat-input {
	flex: 1;
	border: 1px solid var(--feselle-chat-border);
	border-radius: var(--feselle-chat-radius);
	padding: 12px 14px;
	font-size: 14px;
	font-family: inherit;
	color: var(--feselle-chat-text);
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.feselle-chat-inbox .feselle-chat-input:focus {
	border-color: var(--feselle-chat-accent);
	box-shadow: 0 0 0 3px rgba(45, 90, 68, 0.14);
	outline: none;
}

.feselle-chat-inbox .feselle-chat-send {
	border: none;
	border-radius: var(--feselle-chat-radius);
	padding: 0 18px;
	min-height: 44px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	color: var(--feselle-chat-cream);
	background: var(--feselle-chat-accent);
	cursor: pointer;
	transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.feselle-chat-inbox .feselle-chat-send:hover {
	background: var(--feselle-chat-accent-dark);
	box-shadow: 0 14px 26px -16px rgba(20, 52, 42, 0.55);
	transform: translateY(-1px);
}

.feselle-chat-inbox .feselle-chat-send:disabled {
	opacity: 0.6;
	cursor: default;
	transform: none;
	box-shadow: none;
}

/* Inline send error (replaces the old native alert), wraps below the row. */
.feselle-chat-form-error {
	flex-basis: 100%;
	margin-top: 4px;
	padding: 8px 12px;
	border-radius: var(--feselle-chat-radius);
	background: rgba(180, 40, 40, 0.08);
	color: #9b2c2c;
	font-size: 12.5px;
	line-height: 1.4;
}

.feselle-chat-login-required {
	color: var(--feselle-chat-muted);
}

/* --- Responsive --- */

/* Tablet + mobile (<= 1023px): single panel — list <-> chat via is-chat-open. */
@media (max-width: 1023px) {
	.feselle-chat-inbox {
		flex-direction: column;
		height: clamp(440px, 78vh, 680px);
	}
	.feselle-chat-rail {
		width: 100%;
		flex: 1 1 auto;
		border-right: none;
		border-bottom: 1px solid var(--feselle-chat-border);
	}
	.feselle-chat-main {
		width: 100%;
		flex: 1 1 auto;
	}
	.feselle-chat-back {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
	/* No thread open yet -> show the list, hide the chat pane. */
	.feselle-chat-inbox:not(.is-chat-open) .feselle-chat-rail {
		display: flex;
	}
	.feselle-chat-inbox:not(.is-chat-open) .feselle-chat-main {
		display: none;
	}
	/* Thread open -> show the chat pane, hide the list. */
	.feselle-chat-inbox.is-chat-open .feselle-chat-rail {
		display: none;
	}
	.feselle-chat-inbox.is-chat-open .feselle-chat-main {
		display: flex;
	}
}

/* Phone (<= 480px): the floating widget goes full-screen; the inbox already
   collapses via the 1023px rule. Touch targets stay >= 44px. */
@media (max-width: 480px) {
	.feselle-chat-panel {
		right: 0;
		bottom: 0;
		width: 100vw;
		max-width: 100vw;
		max-height: 100vh;
		border-radius: 0;
	}
	.feselle-chat-trigger {
		right: 12px;
		bottom: 12px;
	}
	.feselle-chat-rail-head {
		padding: 14px 12px 10px;
	}
	.feselle-chat-filters {
		padding: 8px 12px;
	}
	.feselle-chat-thread {
		padding: 12px 12px;
	}
	.feselle-chat-chat-header {
		padding: 10px 12px;
	}
	.feselle-chat-inbox .feselle-chat-form {
		padding: 10px 12px;
	}
}