/* 챗봇 독립 CSS 파일 */
#chatbot-container {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 10000;
	font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

/* 말풍선 스타일 */
#chatbot-tooltip {
	background: #333;
	color: white;
	padding: 10px 18px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	white-space: nowrap;
	position: relative;
	animation: tooltip-bounce 2s ease-in-out infinite;
}

/* 말풍선 꼬리 */
#chatbot-tooltip::after {
	content: '';
	position: absolute;
	bottom: -8px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-top: 8px solid #333;
}

/* 말풍선 애니메이션 */
@keyframes tooltip-bounce {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-5px);
	}
}

#chatbot-toggle {
	background: white;
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	transition: transform 0.15s ease;
	border: none;
	font-size: 16px;
	font-weight: 600;
	position: relative;
	width: 80px;
	height: 80px;
}

#chatbot-toggle:hover {
	transform: scale(1.1);
}

/* 챗봇 토글 버튼 아이콘 */
.chatbot-toggle-icon {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

#chatbot-toggle span {
	font-weight: 700;
	letter-spacing: -0.3px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#chatbot-window {
	position: absolute;
	bottom: 0px;
	right: 0;
	width: 380px;
	height: 650px;
	background: white;
	border-radius: 8px;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	border: 1px solid #e5e5e5;
	overflow: hidden;
	animation: chatbot-fadeIn 0.3s ease-out;
	display: flex;
	flex-direction: column;
}

@keyframes chatbot-fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

#chatbot-header {
	background: #667eea;
	color: white;
	padding: 24px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.chatbot-title {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: 1;
}

.chatbot-avatar {
	font-size: 32px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(10px);
	border: 2px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 챗봇 아바타 이미지 */
.chatbot-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.chatbot-name {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 4px;
	letter-spacing: -0.5px;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.chatbot-status {
	font-size: 13px;
	opacity: 0.85;
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
}

.chatbot-status::before {
	content: '';
	width: 8px;
	height: 8px;
	background: #4ade80;
	border-radius: 50%;
	box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
	animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.6; }
}

#chatbot-close {
	background: none;
	border: none;
	color: white;
	font-size: 24px;
	cursor: pointer;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s;
}

#chatbot-close:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

#chatbot-messages {
	height: 440px;
	overflow-y: auto;
	padding: 20px 20px 30px 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.main-shortcuts {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 12px 0 0 0;
	padding: 12px 0 0 0;
	border-top: 1px solid rgba(102, 126, 234, 0.15);
}

.shortcut-button {
	padding: 12px 16px;
	width: 100%;
	background: white;
	color: #667eea;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.15s ease;
	text-align: center;
}

.shortcut-button:hover {
	background: rgba(159, 161, 163, 0.58);
	transform: scale(1.02);
}

.shortcut-button:active {
	transform: scale(1);
}

.message {
	display: flex;
	gap: 10px;
	max-width: 100%;
}

.message-avatar {
	font-size: 20px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

/* 메시지 아바타 이미지 */
.message-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.message-content {
	flex: 1;
}

.message-text {
	background: #e0e0e0;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.4;
	word-wrap: break-word;
}

.bot-message .message-text {
	background: rgba(229, 232, 235, 0.584);
	border-bottom-left-radius: 6px;
}

.user-message {
	flex-direction: row-reverse;
}

.user-message .message-text {
	background: #15C093;
	color: white;
	border-bottom-right-radius: 6px;
}

.user-message .message-avatar {
	color: #15C093;
}

.message-time {
	font-size: 11px;
	color: #999;
	margin-top: 4px;
	text-align: right;
}

.user-message .message-time {
	text-align: left;
}

.source-info {
	margin-top: 8px;
	font-size: 12px;
	color: #666;
	font-style: italic;
}

#chatbot-input-area {
	padding: 12px 20px 16px 20px;
	border-top: 1px solid rgba(102, 126, 234, 0.1);
	background: #f8fafc;
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	flex-shrink: 0;
}

#chatbot-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 12px 0;
	margin-bottom: 8px;
}

.loading-dots {
	display: flex;
	gap: 6px;
	align-items: center;
}

.loading-dots span {
	width: 8px;
	height: 8px;
	background: #667eea;
	border-radius: 50%;
	animation: loading-fade 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes loading-fade {
	0%, 80%, 100% {
		opacity: 0.3;
	}
	40% {
		opacity: 1;
	}
}

#chatbot-form {
	display: flex;
	gap: 12px;
	align-items: center;
	position: relative;
}

#chatbot-input {
	flex: 1;
	border: 2px solid rgba(102, 126, 234, 0.2);
	border-radius: 8px;
	padding: 14px 20px;
	font-size: 15px;
	outline: none;
	transition: border-color 0.15s ease;
	background: white;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

#chatbot-input:focus {
	border-color: #667eea;
}

#chatbot-input::placeholder {
	color: #94a3b8;
	font-weight: 400;
}

#chatbot-send {
	width: 48px;
	height: 48px;
	border: none;
	background: #667eea;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	position: relative;
}

#chatbot-send:hover {
	transform: scale(1.05);
}

#chatbot-send:active {
	transform: scale(1);
}

#chatbot-send:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}


/* 링크 버튼 스타일 */
.link-buttons {
	margin: 12px 0 0 0;
	padding: 12px 0 0 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
	border-top: 1px solid rgba(102, 126, 234, 0.15);
}

.link-button {
	background: white;
	color: #667eea;
	border-radius: 8px;
	padding: 12px 16px;
	width: 100%;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s ease;
}

.link-button:hover {
	background: rgba(159, 161, 163, 0.58);
	transform: scale(1.02);
}

.link-button:active {
	transform: scale(1);
}

/* 카카오톡 전용 스타일 */
.link-button.kakao-button {
	background: white;
	color: #3C1E1E;
}

.link-button.kakao-button:hover {
	background: rgba(159, 161, 163, 0.58);
}

/* 유튜브 전용 스타일 */
.link-button.youtube-button {
	background: white;
	color: #FF0000;
}

.link-button.youtube-button:hover {
	background: rgba(159, 161, 163, 0.58);
}

/* 버튼 컨테이너 스타일 */
.select-options,
.consultation-button-area {
	margin: 12px 0 0 0;
	padding: 12px 0 0 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
	border-top: 1px solid rgba(102, 126, 234, 0.15);
}

/* 선택 옵션 버튼 - shortcut-button과 동일한 스타일 */
.select-option-btn {
	padding: 12px 16px;
	width: 100%;
	background: white;
	color: #667eea;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.15s ease;
	text-align: center;
}

.select-option-btn:hover {
	background: rgba(159, 161, 163, 0.58);
	transform: scale(1.02);
}

.select-option-btn:active {
	transform: scale(1);
}

/* 상담 버튼 */
.consultation-button {
	width: 100%;
	padding: 12px 16px;
	background: #667eea;
	color: white;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	white-space: nowrap;
	transition: all 0.15s ease;
}

.consultation-button:hover {
	background: #5a6fd6;
	transform: scale(1.02);
}

.consultation-button:active {
	transform: scale(1);
}

/* 상담 폼 전체 화면 스타일 */
.consultation-full-screen {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: white;
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	z-index: 10;
	overflow: hidden;
}

.consultation-header {
	background: #667eea;
	color: white;
	padding: 20px 24px;
	border-radius: 8px 8px 0 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}

.consultation-header h4 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	flex: 1;
	text-align: center;
}

.close-btn {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	transition: background-color 0.15s ease;
}

.close-btn:hover {
	background-color: rgba(255, 255, 255, 0.3);
}

.consultation-content {
	flex: 1;
	padding: 20px 24px 16px 24px;
	overflow-y: auto;
	max-height: calc(100% - 160px);
	min-height: 300px;
}

.consultation-content .form-item {
	margin-bottom: 16px;
}

.consultation-content .form-item:last-child {
	margin-bottom: 24px;
}

.consultation-content .form-row {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.consultation-content label {
	font-size: 14px;
	color: #333;
	font-weight: 600;
}

.consultation-content .input-contact-quick,
.consultation-content .textarea-contact-quick {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #e1e5e9;
	border-radius: 8px;
	font-size: 14px;
	outline: none;
	box-sizing: border-box;
	font-family: inherit;
	background: white;
	transition: border-color 0.3s ease;
}

.consultation-content .input-contact-quick:focus,
.consultation-content .textarea-contact-quick:focus {
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.consultation-content .phone-inputs {
	display: flex;
	align-items: center;
	gap: 8px;
}

.consultation-content .phone-select {
	width: 70px;
	flex-shrink: 0;
}

.consultation-content .phone-input {
	flex: 1;
}

.consultation-content .phone-separator {
	font-size: 14px;
	color: #666;
	font-weight: 600;
	flex-shrink: 0;
}

.consultation-content .textarea-contact-quick {
	resize: none;
	min-height: 100px;
}

.consultation-content .agree-box {
	margin-top: 15px;
	padding: 15px;
	background: #f8f9fa;
	border-radius: 8px;
}

.consultation-content .form-check-wrapper {
	display: flex;
	align-items: center;
	gap: 12px;
	justify-content: space-between;
}

.consultation-content .form-check-input {
	margin: 0;
	width: 18px;
	height: 18px;
	cursor: pointer;
	flex-shrink: 0;
}

.consultation-content .form-check-wrapper label {
	font-size: 14px;
	color: #333;
	margin: 0 0 0 24px;
	padding: 0;
	cursor: pointer;
	font-weight: 500;
}

.consultation-content .btn-line-gr {
	background: transparent;
	border: 1px solid #6c757d;
	color: #6c757d;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.consultation-content .btn-line-gr:hover {
	background: #6c757d;
	color: white;
}

/* 개인정보 아코디언 - 새 디자인 */
.privacy-accordion {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.3s ease;
	margin: 8px 0 16px 0;
	padding: 16px;
}

/* 체크박스, 레이블, 토글 버튼이 한 줄에 배치 */
.privacy-header-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.privacy-checkbox {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: #667eea;
	margin: 0;
	flex-shrink: 0;
}

.privacy-header-row label {
	font-size: 14px;
	font-weight: 500;
	color: #333;
	cursor: pointer;
	margin: 0;
	flex: 1;
}

/* 토글 버튼 - 레이블과 같은 줄에 위치 */
.privacy-toggle-btn {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: white;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	color: #6b7280;
	flex-shrink: 0;
	padding: 0;
}

.privacy-toggle-btn:hover {
	background: #f3f4f6;
	border-color: #667eea;
	color: #667eea;
}

.privacy-accordion.expanded .privacy-toggle-btn {
	transform: rotate(180deg);
	background: #667eea;
	border-color: #667eea;
	color: white;
}

/* 펼쳐지는 내용 영역 */
.privacy-accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.privacy-accordion.expanded .privacy-accordion-content {
	max-height: 600px;
}

.privacy-content-inner {
	padding: 16px 0 0 0;
	background: transparent;
}

.privacy-content-inner p {
	margin: 0 0 12px 0;
	font-size: 13px;
	line-height: 1.6;
	color: #4b5563;
}

.privacy-content-inner p:last-child {
	margin-bottom: 0;
}

.privacy-content-inner strong {
	color: #1f2937;
	font-weight: 600;
}

.privacy-content-inner p[style*="margin-left"] {
	padding-left: 16px;
}

.privacy-content-inner p[style*="margin-top"] {
	margin-top: 16px !important;
}


.text-danger {
	color: #dc3545;
	font-weight: bold;
}

.consultation-footer {
	padding: 20px 24px;
	background: #f8f9fa;
	border-radius: 0 0 8px 8px;
	border-top: 1px solid #e1e5e9;
	display: flex;
	gap: 12px;
	flex-shrink: 0;
	position: relative;
	z-index: 1;
}

.consultation-footer .btn-submit,
.consultation-footer .btn-cancel {
	flex: 1;
	padding: 14px 20px;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.consultation-footer .btn-submit {
	background: #667eea;
	color: white;
	transition: transform 0.15s ease;
}

.consultation-footer .btn-submit:hover {
	transform: scale(1.02);
}

.consultation-footer .btn-cancel {
	background: #e9ecef;
	color: #666;
	border: 1px solid #ddd;
}

.consultation-footer .btn-cancel:hover {
	background: #dee2e6;
	border-color: #bbb;
}

/* 모바일 반응형 */
@media (max-width: 480px) {
	#chatbot-window {
		width: calc(100vw - 40px);
		height: 500px;
		right: -10px;
	}

	#chatbot-toggle {
		padding: 10px 16px;
		font-size: 13px;
	}

	#chatbot-toggle span {
		display: none;
	}

	#chatbot-messages {
		height: 360px;
	}

	.consultation-header {
		padding: 16px 20px;
	}

	.consultation-header h4 {
		font-size: 16px;
	}

	.consultation-content {
		padding: 16px 20px;
		max-height: calc(100% - 140px);
		min-height: 280px;
	}

	.consultation-content .input-contact-quick,
	.consultation-content .textarea-contact-quick {
		padding: 10px 12px;
		font-size: 13px;
	}

	.consultation-footer {
		padding: 16px 20px;
	}

	.consultation-footer .btn-submit,
	.consultation-footer .btn-cancel {
		padding: 12px 16px;
		font-size: 14px;
	}

	.consultation-content .form-check-wrapper {
		flex-direction: row;
		align-items: center;
		gap: 8px;
		justify-content: space-between;
	}

	.privacy-accordion {
		padding: 12px;
	}

	.privacy-header-row label {
		font-size: 13px;
	}

	.privacy-checkbox {
		width: 16px;
		height: 16px;
	}

	.privacy-toggle-btn {
		width: 22px;
		height: 22px;
	}

	.privacy-toggle-btn svg {
		width: 12px;
		height: 12px;
	}

	.privacy-content-inner {
		padding: 12px 0 0 0;
	}

	.privacy-content-inner p {
		font-size: 12px;
	}
}

/* 유효성 텍스트 스타일 */
.validation-text {
	font-size: 12px;
	color: #DC2626;
	margin-top: 4px;
	min-height: 16px;
	line-height: 1.4;
	padding-left: 4px;
}
