@charset "UTF-8";

/* 1. 우측 하단 플로팅 런처 */
.rx-persona-launcher {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 99998;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 10px;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.rx-persona-launcher-badge {
	background: #FFFFFF;
	color: #1E293B;
	font-size: 13px;
	font-weight: 700;
	padding: 7px 14px;
	border-radius: 20px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
	display: flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #E2E8F0;
	transition: transform 0.2s ease;
}

.rx-persona-launcher:hover .rx-persona-launcher-badge {
	transform: translateY(-2px);
}

.rx-badge-ping {
	display: inline-block;
	width: 8px;
	height: 8px;
	background-color: #10B981;
	border-radius: 50%;
	box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.rx-persona-launcher-icon {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: linear-gradient(135deg, #F472B6 0%, #E11D48 100%);
	box-shadow: 0 8px 24px rgba(244, 114, 182, 0.42);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #FFFFFF;
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
	overflow: hidden;
	position: relative;
}

.rx-persona-launcher-icon svg {
	width: 28px;
	height: 28px;
}

.rx-persona-launcher:hover .rx-persona-launcher-icon {
	transform: scale(1.08);
	box-shadow: 0 10px 28px rgba(244, 114, 182, 0.5);
}

.rx-persona-launcher:active .rx-persona-launcher-icon {
	transform: scale(0.95);
}

/* 2. 채팅창 컨테이너 */
.rx-persona-container {
	position: fixed;
	bottom: 96px;
	right: 24px;
	width: 410px;
	max-width: calc(100vw - 32px);
	height: 630px;
	max-height: calc(100vh - 120px);
	background: #FFFFFF;
	border-radius: 18px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
	z-index: 99999;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Pretendard", sans-serif;
	animation: rx-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 인라인 모드 (본문 중앙 배치) */
.rx-persona-container.rx-persona-inline {
	position: relative !important;
	top: auto !important;
	bottom: auto !important;
	left: auto !important;
	right: auto !important;
	width: 100% !important;
	max-width: 720px !important;
	height: 680px !important;
	max-height: 85vh !important;
	margin: 20px auto 40px auto !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 0 0 1px #E2E8F0 !important;
	border-radius: 20px !important;
	z-index: 10 !important;
	animation: none !important;
}

/* 독립형 스탠드얼론 모드 (100% 풀스크린) */
.rx-persona-container.rx-persona-standalone {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	height: 100% !important;
	max-height: 100% !important;
	margin: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	border: none !important;
	z-index: 1000 !important;
	animation: none !important;
}

/* 3. 상단 헤더 */
.rx-persona-header {
	padding: 12px 18px;
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rx-persona-header-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* 원형 프로필 아바타 (헤더) */
.rx-persona-avatar {
	position: relative;
	width: 42px;
	height: 42px;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden;
}

.rx-counselor-img {
	width: 100%;
	height: 100%;
	border-radius: 50% !important;
	object-fit: cover;
	display: block;
}

.rx-persona-avatar svg {
	width: 24px;
	height: 24px;
}

.rx-persona-online-dot {
	position: absolute;
	bottom: 1px;
	right: 1px;
	width: 10px;
	height: 10px;
	background: #10B981;
	border: 2px solid #FFFFFF;
	border-radius: 50%;
	z-index: 2;
}

.rx-persona-title-box {
	display: flex;
	flex-direction: column;
}

.rx-persona-title {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.3px;
	line-height: 1.25;
}

.rx-persona-subtitle {
	font-size: 11.5px;
	color: rgba(255, 255, 255, 0.9);
	margin-top: 2px;
	letter-spacing: -0.2px;
}

.rx-persona-header-right {
	display: flex;
	align-items: center;
	gap: 6px;
}

.rx-persona-btn-kakao {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #FEE500;
	color: #191919 !important;
	font-size: 11.5px;
	font-weight: 700;
	padding: 5px 10px;
	border-radius: 14px;
	text-decoration: none !important;
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.rx-persona-btn-kakao:hover {
	background: #FADA0A;
	transform: scale(1.03);
}

.rx-persona-btn-kakao svg {
	width: 13px;
	height: 13px;
}

.rx-persona-btn-header {
	background: transparent;
	border: none;
	color: #FFFFFF;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.15s ease;
	padding: 0;
}

.rx-persona-btn-header:hover {
	background: rgba(255, 255, 255, 0.2);
}

.rx-persona-btn-header svg {
	width: 18px;
	height: 18px;
}

/* 4. 추천 질문 칩 바 */
.rx-persona-chips-bar {
	background: #F8FAFC;
	border-bottom: 1px solid #E2E8F0;
	padding: 8px 12px;
	flex-shrink: 0;
	overflow: hidden;
}

.rx-persona-chips-scroll {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 2px 0;
}

.rx-persona-chips-scroll::-webkit-scrollbar {
	display: none;
}

.rx-persona-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #FFFFFF;
	border: 1px solid #CBD5E1;
	border-radius: 16px;
	padding: 5px 11px;
	font-size: 12px;
	font-weight: 600;
	color: #334155;
	white-space: nowrap;
	cursor: pointer;
	transition: all 0.18s ease;
	flex-shrink: 0;
}

.rx-persona-chip:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.rx-persona-chip svg {
	width: 12px;
	height: 12px;
	opacity: 0.7;
}

/* 5. 메시지 스크롤 영역 */
.rx-persona-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px 14px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	background: #F8FAFC;
	scroll-behavior: smooth;
}

.rx-chat-row {
	display: flex;
	gap: 9px;
	max-width: 88%;
}

.rx-chat-row-bot {
	align-self: flex-start;
}

.rx-chat-row-user {
	align-self: flex-end;
	flex-direction: row-reverse;
}

/* 원형 아바타 (말풍선 옆) */
.rx-chat-avatar-mini {
	width: 34px;
	height: 34px;
	border-radius: 50% !important;
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: #F472B6;
	overflow: hidden;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.rx-chat-avatar-mini .rx-counselor-img {
	width: 100%;
	height: 100%;
	border-radius: 50% !important;
	object-fit: cover;
}

.rx-chat-avatar-mini svg {
	width: 20px;
	height: 20px;
}

.rx-chat-bubble-wrap {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.rx-chat-row-user .rx-chat-bubble-wrap {
	align-items: flex-end;
}

.rx-chat-bubble {
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 13.5px;
	line-height: 1.55;
	word-break: break-word;
}

.rx-chat-bubble-bot {
	background: #FFFFFF;
	color: #1E293B;
	border: 1px solid #E2E8F0;
	border-top-left-radius: 3px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.rx-chat-bubble-user {
	background: linear-gradient(135deg, #F472B6 0%, #E11D48 100%);
	color: #FFFFFF;
	border-top-right-radius: 3px;
}

.rx-chat-meta {
	font-size: 10.5px;
	color: #94A3B8;
	padding: 0 2px;
}

/* 6. 타이핑 인디케이터 */
.rx-persona-typing-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 16px;
	background: #F1F5F9;
	border-top: 1px solid #E2E8F0;
	font-size: 12px;
	color: #475569;
}

.rx-typing-bubble {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	background: #FFFFFF;
	padding: 4px 8px;
	border-radius: 10px;
	border: 1px solid #E2E8F0;
}

.rx-typing-dot {
	width: 5px;
	height: 5px;
	background: #F472B6;
	border-radius: 50%;
	animation: rx-bounce 1.4s infinite ease-in-out both;
}

.rx-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.rx-typing-dot:nth-child(2) { animation-delay: -0.16s; }

/* 7. 입력 바 */
.rx-persona-input-bar {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px 14px;
	background: #FFFFFF;
	border-top: 1px solid #E2E8F0;
	flex-shrink: 0;
}

.rx-input-container {
	flex: 1;
	background: #F8FAFC;
	border: 1px solid #CBD5E1;
	border-radius: 12px;
	padding: 6px 12px;
	display: flex;
	align-items: center;
}

.rx-input-container textarea {
	width: 100%;
	border: none;
	background: transparent;
	resize: none;
	outline: none;
	font-size: 13.5px;
	line-height: 1.4;
	color: #1E293B;
	max-height: 90px;
	font-family: inherit;
	box-shadow: none !important;
}

.rx-send-btn {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #FFFFFF;
	flex-shrink: 0;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.rx-send-btn:hover {
	transform: scale(1.05);
}

.rx-send-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.rx-send-btn svg {
	width: 18px;
	height: 18px;
}

/* 8. 푸터 안내 */
.rx-persona-footer {
	text-align: center;
	font-size: 10.5px;
	color: #94A3B8;
	padding: 5px 12px;
	background: #FFFFFF;
	border-top: 1px solid #F1F5F9;
	flex-shrink: 0;
}

/* 마크다운 표 및 스타일 */
.rx-chat-bubble-bot table {
	border-collapse: collapse;
	width: 100%;
	margin: 8px 0;
	font-size: 12px;
}
.rx-chat-bubble-bot th, .rx-chat-bubble-bot td {
	border: 1px solid #E2E8F0;
	padding: 6px 8px;
	text-align: left;
}
.rx-chat-bubble-bot th {
	background: #F1F5F9;
	font-weight: 700;
}
.rx-chat-bubble-bot ul, .rx-chat-bubble-bot ol {
	margin: 6px 0;
	padding-left: 20px;
}
.rx-chat-bubble-bot li {
	margin: 3px 0;
}

@keyframes rx-slide-up {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes rx-bounce {
	0%, 80%, 100% { transform: scale(0); }
	40% { transform: scale(1); }
}
