/* CEOTS Wizard - Floating Guide Ball */

.wizard__ball {
	position: fixed;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #fff;
	box-shadow:
		0 4px 20px rgba(0, 0, 0, 0.15),
		0 2px 8px rgba(0, 0, 0, 0.1);
	cursor: pointer;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition:
		left 0.5s cubic-bezier(0.4, 0, 0.2, 1),
		right 0.5s cubic-bezier(0.4, 0, 0.2, 1),
		top 0.5s cubic-bezier(0.4, 0, 0.2, 1),
		bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.3s ease,
		box-shadow 0.3s ease;
	opacity: 0;
	transform: scale(0);
}

.wizard__ball--ready {
	opacity: 1;
	transform: scale(1);
	animation: wizard_ball_entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wizard__ball img {
	width: 36px;
	height: 36px;
	object-fit: contain;
	pointer-events: none;
}

.wizard__ball:hover {
	box-shadow:
		0 6px 24px rgba(0, 0, 0, 0.2),
		0 4px 12px rgba(0, 0, 0, 0.15);
	transform: scale(1.08);
}

.wizard__ball--guiding {
	box-shadow:
		0 6px 24px rgba(46, 125, 50, 0.3),
		0 4px 12px rgba(46, 125, 50, 0.2);
}

.wizard__ball--chat-open {
	box-shadow:
		0 6px 24px rgba(46, 125, 50, 0.4),
		0 4px 12px rgba(46, 125, 50, 0.3);
}

.wizard__ball__pulse {
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid rgba(46, 125, 50, 0.5);
	animation: wizard_ball_pulse 2s ease-in-out infinite;
	pointer-events: none;
}

.wizard__ball--guiding .wizard__ball__pulse,
.wizard__ball--chat-open .wizard__ball__pulse {
	display: none;
}

@keyframes wizard_ball_entrance {
	0% {
		opacity: 0;
		transform: scale(0) rotate(-180deg);
	}
	100% {
		opacity: 1;
		transform: scale(1) rotate(0);
	}
}

@keyframes wizard_ball_pulse {
	0%, 100% {
		transform: scale(1);
		opacity: 1;
	}
	50% {
		transform: scale(1.4);
		opacity: 0;
	}
}

/* Chat Window */
.wizard__chat {
	position: fixed;
	right: 20px;
	bottom: 90px;
	width: 320px;
	max-height: 400px;
	background: #fff;
	border-radius: 12px;
	box-shadow:
		0 8px 32px rgba(0, 0, 0, 0.2),
		0 4px 16px rgba(0, 0, 0, 0.1);
	z-index: 99998;
	display: flex;
	flex-direction: column;
	opacity: 0;
	transform: translateY(20px) scale(0.95);
	pointer-events: none;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.wizard__chat--open {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.wizard__chat__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	border-bottom: 1px solid #eee;
	background: #2e7d32;
	border-radius: 12px 12px 0 0;
}

.wizard__chat__title {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
}

.wizard__chat__close {
	background: none;
	border: none;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	opacity: 0.8;
}

.wizard__chat__close:hover {
	opacity: 1;
}

.wizard__chat__messages {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	min-height: 200px;
	max-height: 280px;
}

.wizard__chat__msg {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	padding: 8px 12px;
	border-radius: 12px;
	margin-bottom: 8px;
	max-width: 85%;
}

.wizard__chat__msg--assistant {
	background: #f0f0f0;
	color: #333;
	border-bottom-left-radius: 4px;
}

.wizard__chat__msg--user {
	background: #2e7d32;
	color: #fff;
	margin-left: auto;
	border-bottom-right-radius: 4px;
}

.wizard__chat__input_wrap {
	display: flex;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid #eee;
}

.wizard__chat__input {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 20px;
	font-family: inherit;
	font-size: 14px;
	outline: none;
}

.wizard__chat__input:focus {
	border-color: #2e7d32;
}

.wizard__chat__input:disabled {
	background: #f5f5f5;
}

.wizard__chat__send {
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: #2e7d32;
	color: #fff;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.wizard__chat__send:hover {
	background: #256329;
}

/* Tooltip */
.wizard__tooltip {
	position: fixed;
	z-index: 999997;
	background: #1a1a1e;
	border: 1px solid #3a3a3e;
	border-radius: 8px;
	padding: 12px 16px;
	max-width: 280px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.4);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
	cursor: pointer;
}
.wizard__tooltip--visible {
	opacity: 1;
	pointer-events: auto;
}
.wizard__tooltip__name {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #e0e0e0;
	margin-bottom: 4px;
}
.wizard__tooltip__desc {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	color: #a0a0a0;
	line-height: 1.4;
	margin-bottom: 8px;
}
.wizard__tooltip__hint {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 11px;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.wizard__tooltip:hover .wizard__tooltip__hint {
	color: #96d4ee;
}

/* Choice Menu */
.wizard__choice_menu {
	position: fixed;
	z-index: 999997;
	background: #1a1a1e;
	border: 1px solid #96d4ee;
	border-radius: 8px;
	padding: 16px;
	min-width: 200px;
	max-width: 320px;
	box-shadow: 0 4px 24px rgba(150, 212, 238, 0.2);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
}
.wizard__choice_menu--visible {
	opacity: 1;
	pointer-events: auto;
}
.wizard__choice_title {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: #e0e0e0;
	margin-bottom: 6px;
}
.wizard__choice_desc {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	color: #a0a0a0;
	line-height: 1.4;
	margin-bottom: 12px;
}
.wizard__choice_options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.wizard__choice_btn {
	padding: 10px 16px;
	background: #2a2a2e;
	border: 1px solid #3a3a3e;
	border-radius: 6px;
	color: #e0e0e0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.15s;
	text-align: left;
}
.wizard__choice_btn:hover {
	background: rgba(150, 212, 238, 0.15);
	border-color: #96d4ee;
}

/* Tour Menu */
.wizard__menu {
	position: fixed;
	z-index: 999998;
	background: #1a1a1e;
	border: 1px solid #3a3a3e;
	border-radius: 8px;
	min-width: 200px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.4);
	opacity: 0;
	transform: translateY(10px);
	pointer-events: none;
	transition: opacity 0.2s, transform 0.2s;
}
.wizard__menu--open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.wizard__menu__title {
	padding: 12px 16px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #888;
	border-bottom: 1px solid #3a3a3e;
}
.wizard__menu__list {
	padding: 8px 0;
}
.wizard__menu__item {
	padding: 10px 16px;
	border-bottom: 1px solid #2a2a2e;
}
.wizard__menu__item:last-child {
	border-bottom: none;
}
.wizard__menu__item_header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}
.wizard__menu__name {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	color: #e0e0e0;
}
.wizard__menu__count {
	font-size: 11px;
	color: #888;
	background: #2a2a2e;
	padding: 2px 8px;
	border-radius: 10px;
}
.wizard__menu__modes {
	display: flex;
	gap: 8px;
}
.wizard__menu__mode {
	flex: 1;
	padding: 6px 12px;
	background: #2a2a2e;
	border: 1px solid #3a3a3e;
	border-radius: 4px;
	color: #a0a0a0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.15s;
}
.wizard__menu__mode:hover {
	background: rgba(150, 212, 238, 0.2);
	border-color: #96d4ee;
	color: #e0e0e0;
}
.wizard__menu__empty {
	padding: 16px;
	color: #666;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	text-align: center;
}

@media screen and (max-width: 480px) {
	.wizard__ball {
		width: 48px;
		height: 48px;
	}

	.wizard__ball img {
		width: 30px;
		height: 30px;
	}

	.wizard__chat {
		left: 10px;
		right: 10px;
		width: auto;
		bottom: 70px;
	}

	.wizard__menu {
		min-width: 180px;
	}
}
