.overlay {
	position: fixed;
	inset: 0;
	z-index: var(--z-index-modal, 10000);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	pointer-events: none;
}

.backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	pointer-events: auto;
}

.sheet {
	position: relative;
	width: 100%;
	/* Fill 95% of the viewport by default so drawers feel like full-screen
	   sheets on mobile (matches Fluxer). Uses svh so the mobile browser
	   chrome (address bar) doesn't cause the sheet to overflow. */
	height: 95svh;
	max-height: 95svh;
	/* Use the sidebar surface colour so the drawer sits one step darker
	   than the chat area, making the rounded action items pop against
	   the sheet background. */
	background-color: var(--background-secondary);
	border-top-left-radius: 20px;
	border-top-right-radius: 20px;
	box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.4);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	pointer-events: auto;
	padding-bottom: env(safe-area-inset-bottom, 0);
	touch-action: pan-y;
}

.handleRow {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 0 4px;
	flex-shrink: 0;
	cursor: grab;
}

.handle {
	width: 40px;
	height: 4px;
	border-radius: 2px;
	background-color: var(--text-tertiary, rgba(255, 255, 255, 0.25));
	opacity: 0.6;
}

.header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 20px 16px;
	border-bottom: 1px solid var(--user-area-divider-color, rgba(255, 255, 255, 0.06));
	flex-shrink: 0;
}

.title {
	font-size: 1rem;
	font-weight: 600;
	color: var(--text-primary);
	margin: 0;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-align: center;
}

.closeButton {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	background: transparent;
	border: none;
	color: var(--text-secondary);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.closeButton:hover {
	background-color: var(--background-modifier-hover, rgba(255, 255, 255, 0.04));
	color: var(--text-primary);
}

.body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
}
