@charset "utf-8";
/* ============================================================
   카카오 채널 채팅 플로팅 위젯 스타일
   - 우측 하단 이동식 미니 팝업 (플로팅 버튼 <-> 채팅창 패널)
   - 드래그 이동 / 펼치기·접기 / 주목 배지
   - PC·모바일 공통 사용
   ============================================================ */

/* 루트 컨테이너: position:fixed 로 화면에 고정.
   드래그 시 left/top 을 인라인 스타일로 덮어쓰면 right/bottom 은 자동 해제됨(JS에서 처리). */
.kkchat {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	font-family: "Noto Sans KR", "Malgun Gothic", "맑은 고딕", sans-serif;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	line-height: 1.5;
}
.kkchat * { box-sizing: border-box; }

/* 드래그 중 텍스트 선택/터치 스크롤 방지 */
.kkchat.is-dragging { cursor: grabbing; }
.kkchat.is-dragging .kkchat-fab,
.kkchat.is-dragging .kkchat-head { cursor: grabbing; }

/* ----------------------------------------------------------
   접힘 상태: 원형 플로팅 버튼(FAB)
   ---------------------------------------------------------- */
.kkchat-fab {
	position: relative;
	width: 60px;
	height: 60px;
	border: 0;
	border-radius: 50%;
	background: #FEE500; /* 카카오 옐로 */
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	cursor: grab;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: transform .15s ease, box-shadow .15s ease;
	touch-action: none; /* 포인터 드래그용 */
}
.kkchat-fab:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
.kkchat-fab:active { transform: translateY(0); }
.kkchat-fab:focus { outline: 2px solid #3c1e1e; outline-offset: 2px; }
.kkchat-fab .kkchat-fab-icon { width: 32px; height: 32px; display: block; }
.kkchat-fab .kkchat-fab-icon svg { width: 100%; height: 100%; display: block; }

/* 주목 배지: 새 채팅 알림(클릭 유도용) */
.kkchat-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: #ff3b30;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	box-shadow: 0 0 0 2px #fff;
	display: none; /* 기본 숨김, JS가 표시 */
}
.kkchat-badge.is-on { display: block; animation: kkchat-pulse 1.4s ease-in-out infinite; }

@keyframes kkchat-pulse {
	0%   { transform: scale(1);   box-shadow: 0 0 0 2px #fff, 0 0 0 0 rgba(255, 59, 48, 0.55); }
	70%  { transform: scale(1.08); box-shadow: 0 0 0 2px #fff, 0 0 0 8px rgba(255, 59, 48, 0); }
	100% { transform: scale(1);   box-shadow: 0 0 0 2px #fff, 0 0 0 0 rgba(255, 59, 48, 0); }
}

/* ----------------------------------------------------------
   펼침 상태: 채팅창 형태 패널
   ---------------------------------------------------------- */
.kkchat-panel {
	width: 320px;
	max-width: calc(100vw - 32px);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
	overflow: hidden;
	display: none;
	transform-origin: bottom right;
	animation: kkchat-pop .16s ease-out;
}
@keyframes kkchat-pop {
	from { opacity: 0; transform: translateY(8px) scale(.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 펼침/접힘 토글: 컨테이너에 is-open 클래스 부여로 전환 */
.kkchat.is-open .kkchat-fab   { display: none; }
.kkchat.is-open .kkchat-panel { display: block; }

/* 헤더(드래그 핸들 겸용) */
.kkchat-head {
	background: #FEE500;
	color: #3c1e1e;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: grab;
	touch-action: none;
}
.kkchat-head-ico {
	width: 36px; height: 36px;
	border-radius: 50%;
	background: rgba(60, 30, 30, 0.08);
	display: flex; align-items: center; justify-content: center;
	flex: 0 0 auto;
}
.kkchat-head-ico svg { width: 20px; height: 20px; }
.kkchat-head-txt { flex: 1 1 auto; min-width: 0; }
.kkchat-title {
	font-size: 15px; font-weight: 700; margin: 0;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kkchat-subtitle {
	font-size: 12px; opacity: .75; margin: 1px 0 0;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kkchat-close {
	flex: 0 0 auto;
	width: 28px; height: 28px;
	border: 0; border-radius: 50%;
	background: transparent;
	color: #3c1e1e;
	font-size: 20px; line-height: 28px;
	cursor: pointer;
	transition: background .15s ease;
}
.kkchat-close:hover { background: rgba(60, 30, 30, 0.12); }
.kkchat-close:focus { outline: 2px solid #3c1e1e; outline-offset: 1px; }

/* 본문: 웰컴 말풍선 + 운영시간 */
.kkchat-body {
	padding: 16px;
	background: #b2c7d9; /* 카카오톡 대화방 느낌의 톤 */
	max-height: 260px;
	overflow-y: auto;
}
.kkchat-bubble {
	position: relative;
	background: #fff;
	border-radius: 4px 14px 14px 14px;
	padding: 11px 13px;
	font-size: 13.5px;
	color: #222;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
	max-width: 92%;
}
.kkchat-hours {
	margin: 10px 2px 0;
	font-size: 12px;
	color: #2b3a47;
	opacity: .9;
}

/* 푸터: CTA 버튼 영역 */
.kkchat-foot {
	padding: 12px;
	background: #fff;
	border-top: 1px solid #eee;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.kkchat-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 46px;
	border: 0;
	border-radius: 10px;
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s ease, background .15s ease;
}
.kkchat-btn:focus { outline: 2px solid #3c1e1e; outline-offset: 2px; }
.kkchat-btn svg { width: 18px; height: 18px; }

.kkchat-btn-primary { background: #FEE500; color: #3c1e1e; }
.kkchat-btn-primary:hover { filter: brightness(0.96); }

.kkchat-btn-sub {
	height: 40px;
	font-size: 13px;
	font-weight: 600;
	background: #f2f3f5;
	color: #333;
}
.kkchat-btn-sub:hover { background: #e7e9ec; }

/* 보조 버튼들을 가로로 나란히 */
.kkchat-foot-sub {
	display: flex;
	gap: 8px;
}
.kkchat-foot-sub:empty { display: none; }
.kkchat-foot-sub .kkchat-btn { flex: 1 1 0; }

/* 하단 링크(카카오 로그아웃) - 부차적 동작이라 작은 텍스트 링크로 */
.kkchat-foot-links { text-align: center; padding: 2px 0 0; }
.kkchat-logout {
	display: inline-block;
	font-size: 12px;
	color: #999;
	text-decoration: underline;
	padding: 4px 6px;
}
.kkchat-logout:hover { color: #666; }
.kkchat-logout:focus { outline: 2px solid #3c1e1e; outline-offset: 2px; }

/* ----------------------------------------------------------
   반응형: 좁은 화면에서는 하단 시트형으로
   ---------------------------------------------------------- */
@media (max-width: 480px) {
	.kkchat.is-open {
		right: 16px !important;
		left: 16px !important;
		bottom: 16px !important;
		top: auto !important;
	}
	.kkchat-panel {
		width: auto;
		max-width: none;
	}
	.kkchat-fab { width: 56px; height: 56px; }
}
