/* ==========================================================================
   Favorites Badge — [baby_name_favorites_badge]
   ========================================================================== */

.bnf-badge {
	--bnf-pink: #f6339a;
	--bnf-pink-mid: #ec4899;
	--bnf-pink-soft: #fce7f3;
	--bnf-pink-border: #f9a8d4;
	--bnf-size: 44px;

	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--bnf-size);
	height: var(--bnf-size);
	text-decoration: none;
	vertical-align: middle;
	line-height: 0;
	flex-shrink: 0;
}

.bnf-badge__pulse {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid var(--bnf-pink-border);
	pointer-events: none;
	animation: bnf-pulse-ring 1.8s ease-out infinite;
}

.bnf-badge__pulse::after {
	content: "";
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	border: 2px solid rgba(246, 51, 154, 0.35);
	animation: bnf-pulse-ring 1.8s ease-out 0.55s infinite;
}

.bnf-badge__circle {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--bnf-pink-soft);
	border: 1.5px solid var(--bnf-pink-border);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(246, 51, 154, 0.12);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bnf-badge:hover .bnf-badge__circle,
.bnf-badge:focus-visible .bnf-badge__circle {
	transform: scale(1.05);
	box-shadow: 0 4px 14px rgba(246, 51, 154, 0.22);
	outline: none;
}

.bnf-badge__heart {
	width: 22px;
	height: 22px;
	fill: var(--bnf-pink-mid);
	display: block;
}

.bnf-badge__count {
	position: absolute;
	top: -4px;
	right: -4px;
	z-index: 2;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--bnf-pink);
	color: #fff;
	font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	box-shadow: 0 2px 8px rgba(246, 51, 154, 0.4);
	pointer-events: none;
}

.bnf-badge__count[hidden] {
	display: none !important;
}

@keyframes bnf-pulse-ring {
	0% {
		transform: scale(1);
		opacity: 0.95;
	}
	70% {
		transform: scale(1.35);
		opacity: 0;
	}
	100% {
		transform: scale(1.35);
		opacity: 0;
	}
}

/* Login modal */
.bnf-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.bnf-modal[hidden] {
	display: none !important;
}

.bnf-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 43, 0.55);
	backdrop-filter: blur(3px);
}

.bnf-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 380px);
	background: #fff;
	border-radius: 24px;
	padding: 32px 28px 24px;
	text-align: center;
	box-shadow: 0 24px 60px rgba(15, 23, 43, 0.25);
	font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
	animation: bnf-modal-in 0.25s ease;
}

.bnf-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: #94a3b8;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
}

.bnf-modal__close:hover {
	color: #0f172b;
	background: #f1f5f9;
}

.bnf-modal__icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: #fce7f3;
	color: #f6339a;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bnf-modal__icon svg {
	width: 28px;
	height: 28px;
}

.bnf-modal__title {
	margin: 0 0 8px;
	font-size: 1.25rem;
	font-weight: 800;
	color: #0f172b;
	letter-spacing: -0.02em;
}

.bnf-modal__text {
	margin: 0 0 22px;
	font-size: 0.92rem;
	line-height: 1.55;
	color: #64748b;
	font-weight: 500;
}

.bnf-modal__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bnf-modal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 12px 18px;
	border-radius: 999px;
	font-family: inherit;
	font-size: 0.92rem;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	border: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bnf-modal__btn--primary {
	background: linear-gradient(135deg, #ff4db2, #f6339a);
	color: #fff;
	box-shadow: 0 10px 22px rgba(246, 51, 154, 0.35);
}

.bnf-modal__btn--primary:hover {
	transform: translateY(-1px);
	color: #fff;
	box-shadow: 0 14px 28px rgba(246, 51, 154, 0.42);
}

.bnf-modal__btn--ghost {
	background: #f8fafc;
	color: #0f172b;
	border: 1px solid #e2e8f0;
}

.bnf-modal__btn--ghost:hover {
	background: #f1f5f9;
}

@keyframes bnf-modal-in {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bnf-badge__pulse,
	.bnf-badge__pulse::after,
	.bnf-modal__dialog {
		animation: none !important;
	}
}
