.overlay {
	position: fixed;
	inset: 0;
	z-index: 99;
}

.root {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: 380px;
	max-height: 480px;
	background-color: variables.$bg-default;
	border: 1px solid variables.$border-default;
	border-radius: variables.$radius-md;
	box-shadow: var(--shadow-lg);
	z-index: 100;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: popupEntrance 0.2s var(--ease-out) both;
}

.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 16px;
	border-bottom: 1px solid variables.$border-default;
}

.title {
	@include typography.font-body-14(700);
	letter-spacing: -0.006em;
	color: variables.$text-primary;
}

.readAllBtn {
	@include typography.font-caption-m;
	font-weight: 600;
	color: variables.$purple-500;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: variables.$radius-sm;
	transition: background-color variables.$duration-normal variables.$ease-out,
		color variables.$duration-normal variables.$ease-out;

	&:hover {
		color: variables.$purple-700;
		background-color: variables.$bg-surface;
	}
}

.list {
	flex: 1;
	overflow-y: auto;
}

.item {
	display: flex;
	gap: 12px;
	padding: 12px 16px;
	cursor: pointer;
	transition: background-color variables.$duration-normal variables.$ease-out;

	&:hover {
		background-color: variables.$bg-surface;
	}

	&:not(:last-child) {
		border-bottom: 1px solid variables.$border-subtle;
	}
}

.itemUnread {
	border-left: 3px solid variables.$purple-500;
}

.itemContent {
	flex: 1;
	min-width: 0;
}

.itemHeader {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.itemHeadline {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 0;
}

.itemTitle {
	@include typography.font-body-14(600);
	color: variables.$text-primary;
	min-width: 0;
	flex: 1;
}

.itemTitleText {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.itemStatusBadge {
	flex-shrink: 0;
}

.itemTime {
	@include typography.font-caption-m;
	color: variables.$text-tertiary;
	flex-shrink: 0;
}

.itemMessage {
	@include typography.font-caption-m;
	color: variables.$text-secondary;
	margin-top: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.progressBar {
	width: 100%;
	height: 4px;
	background-color: variables.$border-subtle;
	border-radius: 2px;
	margin-top: 6px;
	overflow: hidden;
}

.progressFill {
	height: 100%;
	background-color: variables.$purple-500;
	border-radius: 2px;
	transition: width 0.4s var(--ease-out);
}

.empty {
	padding: 40px 16px;
	text-align: center;
	@include typography.font-body-14(400);
	color: variables.$text-tertiary;
}

@keyframes popupEntrance {
	from {
		opacity: 0;
		transform: translateY(-4px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}
