/*
 * Calorie Pulse 2.0. Neutral by default; a theme restyles it through the custom properties on .cpulse.
 * No partial borders on rounded shapes: the note has a full shadow ring or nothing.
 */
.cpulse {
	--cpulse-bg: #fff;
	--cpulse-ink: #1d1b26;
	--cpulse-muted: #5d5a6b;
	--cpulse-accent: #1a7f4b;
	--cpulse-icon-bg: #e6f4ec;
	--cpulse-radius: 18px;
	--cpulse-font: inherit;
	--cpulse-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 18px 40px -18px rgba(0, 0, 0, 0.35);

	position: fixed;
	bottom: max(16px, env(safe-area-inset-bottom));
	left: max(16px, env(safe-area-inset-left));
	z-index: 90;
	width: min(360px, calc(100vw - 32px));
	font-family: var(--cpulse-font);
	pointer-events: none;
}

.cpulse__note {
	position: relative;
	display: flex;
	align-items: center;
	border-radius: var(--cpulse-radius);
	background: var(--cpulse-bg);
	box-shadow: var(--cpulse-shadow);
	color: var(--cpulse-ink);
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.35s ease, transform 0.35s ease;
	pointer-events: auto;
}

.cpulse__note.is-in {
	opacity: 1;
	transform: none;
}

.cpulse__body {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 12px;
	min-width: 0;
	padding: 12px 44px 12px 12px;
	border-radius: inherit;
	color: inherit;
	text-decoration: none;
}

.cpulse__body:focus-visible {
	outline: 2px solid var(--cpulse-accent);
	outline-offset: 2px;
}

.cpulse__icon {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	overflow: hidden;
	border-radius: 14px;
	background: var(--cpulse-icon-bg);
	color: var(--cpulse-accent);
}

.cpulse__icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cpulse__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.cpulse__title {
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.3;
}

.cpulse__sub {
	color: var(--cpulse-muted);
	font-size: 13px;
	line-height: 1.35;
}

.cpulse__close {
	position: absolute;
	top: 8px;
	right: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--cpulse-muted);
	cursor: pointer;
}

.cpulse__close:hover,
.cpulse__close:focus-visible {
	background: rgba(0, 0, 0, 0.06);
	color: var(--cpulse-ink);
}

@media (max-width: 600px) {
	.cpulse {
		right: 12px;
		bottom: max(12px, env(safe-area-inset-bottom));
		left: 12px;
		width: auto;
	}

	.cpulse__body {
		gap: 10px;
		padding: 10px 42px 10px 10px;
	}

	.cpulse__icon {
		width: 38px;
		height: 38px;
		border-radius: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cpulse__note {
		transform: none;
		transition: none;
	}
}
