/*
 * Legacy shell chrome — the pre-2.0 floating avatar + bubble look, kept as
 * an opt-in (Settings → MAIA → Interface: Legacy). Unlike 1.x, this has
 * real @media handling and touch-drag support; the chat content inside
 * (.maia-legacy-chat) is the same shared engine as the drawer — see
 * maia-chat.css.
 */

.maia-legacy-avatar {
	position: fixed;
	width: 90px;
	height: 90px;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
	cursor: grab;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
	z-index: 99998;
	touch-action: none;
}

.maia-legacy-bubble {
	position: fixed;
	width: 380px;
	max-width: calc(100vw - 20px);
	height: 540px;
	max-height: calc(100vh - 20px);
	background: var(--maia-surface, #fff);
	border-radius: 12px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, .3);
	z-index: 99999;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	color: var(--maia-text, #1e1e1e);
}

.maia-legacy-header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-bottom: 1px solid var(--maia-border, rgba(0, 0, 0, .12));
	font-weight: 600;
}
.maia-legacy-header span { flex: 1 1 auto; }
.maia-legacy-nav-toggle,
.maia-legacy-close {
	border: 0;
	background: var(--maia-surface-2, rgba(0, 0, 0, .06));
	border-radius: 6px;
	width: 28px;
	height: 28px;
	cursor: pointer;
}

.maia-legacy-nav {
	flex: 0 0 auto;
	max-height: 45%;
	overflow-y: auto;
	border-bottom: 1px solid var(--maia-border, rgba(0, 0, 0, .12));
	padding: 8px 10px;
}
.maia-legacy-nav .maia-nav__search-input {
	width: 100%;
	box-sizing: border-box;
	padding: 6px 8px;
	margin-bottom: 6px;
	border-radius: 6px;
	border: 1px solid var(--maia-border, rgba(0, 0, 0, .12));
}
.maia-legacy-nav .maia-nav__new {
	width: 100%;
	padding: 8px;
	margin-bottom: 6px;
	background: var(--maia-accent, #2271b1);
	color: #fff;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}
.maia-legacy-nav .maia-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.maia-legacy-nav .maia-nav__item {
	display: flex;
	align-items: center;
	border-bottom: 1px solid var(--maia-border, rgba(0, 0, 0, .08));
}
.maia-legacy-nav .maia-nav__link {
	flex: 1 1 auto;
	text-align: left;
	background: none;
	border: 0;
	padding: 7px 4px;
	cursor: pointer;
	color: inherit;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.maia-legacy-nav .maia-nav__link--active { font-weight: 600; }
.maia-legacy-nav .maia-nav__action {
	background: none;
	border: 0;
	color: var(--maia-text, #1e1e1e);
	opacity: .5;
	cursor: pointer;
}

.maia-legacy-chat {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
}
.maia-legacy-chat .maia-chat {
	flex: 1 1 auto;
	min-height: 0;
}

@media screen and (max-width: 480px) {
	.maia-legacy-bubble {
		width: calc(100vw - 16px);
		height: calc(100vh - 100px);
	}
}
