/* (2026-12-04) 간편상담 런처 — inc/lead-launcher.php · assets/js/lead-launcher.js
   연한 톤: 흰 말풍선(얇은 테두리 · 옅은 그림자) · 동그란 버튼은 단색 와인 + 옅은 물결 한 겹 (번쩍이는 효과 없음) */
.alnc {
	--alnc-point: #C74C1B; /* drug 포인트색 */
	position: fixed;
	right: 20px;
	bottom: 96px;            /* PC 하단 바(70px) 위 */
	z-index: 998;            /* 하단 바(999) 아래 · 간편상담 모달보다 아래 */
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
	letter-spacing: -.02em;
	pointer-events: none;     /* 빈 자리는 아래 화면을 그대로 누를 수 있게 */
}
.alnc > * { pointer-events: auto; }

/* 동그란 버튼 */
.alnc__fab {
	position: relative;
	flex: none;
	width: 58px;
	height: 58px;
	border: 0;
	border-radius: 50%;
	background: var(--alnc-point);
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
	transition: box-shadow .2s ease;
	-webkit-tap-highlight-color: transparent;
	animation: alnc-hop 4s ease-in-out infinite 2s; /* 4초마다 톡톡 두 번 — 어두운 배경에서도 눈에 띄게 */
}
@keyframes alnc-hop {
	0%, 76%, 100% { transform: translateY(0); }
	80% { transform: translateY(-6px); }
	84% { transform: translateY(0); }
	88% { transform: translateY(-3px); }
	92% { transform: translateY(0); }
}
/* 뒤 배경 효과 — 와인색 원이 두 겹 번갈아 퍼짐 (채워진 원이라 테두리 한 줄보다 잘 보임) */
.alnc__fab::before,
.alnc__fab::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: 50%;
	background: var(--alnc-point);
	box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); /* 어두운 배경에서도 보이게 얇은 흰 테두리 */
	opacity: 0;
	animation: alnc-ring 2.6s ease-out infinite;
}
.alnc__fab::after { animation-delay: 1.3s; }
.alnc__fab span { position: relative; display: block; }
.alnc__fab:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .22); }
@keyframes alnc-ring { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(1.35); opacity: 0; } }

/* 말풍선 */
.alnc__bubble {
	position: relative;
	display: flex;
	align-items: flex-start;
	max-width: 260px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 12px;
	/* 밝은 화면에서도 묻히지 않게 — 와인 띠 없이 그림자만 두 겹 (가까운 진한 그림자 + 넓게 퍼지는 옅은 그림자) */
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 10px 28px rgba(0, 0, 0, .18);
	opacity: 0;
	transform: translateX(8px);
	transition: opacity .35s ease, transform .35s ease;
}
.alnc__bubble.is-in { opacity: 1; transform: none; }
.alnc__bubble[hidden] { display: none; }
.alnc__bubble::after {         /* 꼬리 */
	content: "";
	position: absolute;
	right: -6px;
	top: 50%;
	width: 10px;
	height: 10px;
	margin-top: -5px;
	background: #fff;
	border-top: 1px solid #ddd;
	border-right: 1px solid #ddd;
	transform: rotate(45deg);
}
.alnc__bubble-main {
	display: block;
	padding: 12px 4px 12px 14px;
	border: 0;
	background: none;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.alnc__msg { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.4; color: #222; white-space: nowrap; }
.alnc__msg [data-alnc-text] { display: inline-block; transition: opacity .3s ease, transform .3s ease; }
.alnc__msg [data-alnc-text].is-out { opacity: 0; transform: translateY(4px); }
.alnc__x {
	position: relative;
	flex: none;
	width: 26px;
	height: 26px;
	margin: 7px 4px 0 0;
	border: 0;
	background: none;
	cursor: pointer;
}
.alnc__x::before, .alnc__x::after {
	content: "";
	position: absolute; top: 50%; left: 50%;
	width: 9px; height: 1.2px;
	background: #aaa;
}
.alnc__x::before { transform: translate(-50%, -50%) rotate(45deg); }
.alnc__x::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* 모바일 · 태블릿 (PC 하단 바가 안 보이는 1279px 이하) — 새 모바일 하단 바(76px) 위 */
@media (max-width: 1279.98px) {
	.alnc { right: 14px; bottom: 104px; }   /* 모바일 하단 바(배지 포함 90px) 위 */
	.alnc__fab { width: 54px; height: 54px; font-size: 12.5px; }
	.alnc__bubble { max-width: 220px; }
	.alnc__msg { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
	.alnc__fab, .alnc__fab::before, .alnc__fab::after { animation: none; }
	.alnc__bubble, .alnc__msg [data-alnc-text] { transition: none; }
}
