/* Demo chatbot — dark theme to match the Solid State redesign.
   IDs and classes must stay in sync with chatbot.js. */

#chat-toggle {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #ff8200;
	color: #1c1e28;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
	transition: transform 0.15s ease, background 0.15s ease;
}

#chat-toggle:hover {
	background: #ff9a2e;
	transform: scale(1.05);
}

#chat-panel {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 370px;
	max-width: calc(100vw - 32px);
	height: 500px;
	max-height: calc(100vh - 48px);
	background: #232533;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 14px;
	display: none;
	flex-direction: column;
	z-index: 10000;
	overflow: hidden;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}

#chat-panel.open {
	display: flex;
}

#chat-head {
	background: #ff8200;
	color: #1c1e28;
	padding: 0.75em 1em;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-shrink: 0;
}

#chat-head .chat-title {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

#chat-head .chat-title strong {
	font-size: 0.95em;
	letter-spacing: 0.04em;
}

#chat-head .chat-title span {
	font-size: 0.72em;
	opacity: 0.75;
}

#chat-close {
	background: none;
	border: none;
	color: #1c1e28;
	font-size: 1.6em;
	line-height: 1;
	cursor: pointer;
	padding: 0 0.15em;
}

#chat-log {
	flex: 1;
	overflow-y: auto;
	padding: 1em;
	display: flex;
	flex-direction: column;
	gap: 0.6em;
}

.chat-msg {
	max-width: 85%;
	padding: 0.6em 0.9em;
	border-radius: 14px;
	font-size: 0.88em;
	line-height: 1.5;
	word-wrap: break-word;
}

.chat-msg.bot {
	align-self: flex-start;
	background: #2e3141;
	color: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-bottom-left-radius: 4px;
}

.chat-msg.bot a {
	color: #ff9a2e;
	border-bottom: dotted 1px rgba(255, 154, 46, 0.6);
}

.chat-msg.user {
	align-self: flex-end;
	background: #ff8200;
	color: #1c1e28;
	border-bottom-right-radius: 4px;
	font-weight: 600;
}

#chat-input-row {
	display: flex;
	gap: 0.5em;
	padding: 0.75em;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	flex-shrink: 0;
	background: #20232f;
}

#chat-input {
	flex: 1;
	background: #2e3141;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	color: #ffffff;
	padding: 0.6em 0.8em;
	font-size: 0.88em;
	outline: none;
	min-width: 0;
}

#chat-input:focus {
	border-color: #ff8200;
}

#chat-input::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

#chat-send {
	background: #ff8200;
	color: #1c1e28;
	border: none;
	border-radius: 8px;
	padding: 0.6em 1.1em;
	font-weight: 700;
	font-size: 0.85em;
	letter-spacing: 0.05em;
	cursor: pointer;
	flex-shrink: 0;
}

#chat-send:hover {
	background: #ff9a2e;
}

@media screen and (max-width: 480px) {
	#chat-toggle {
		right: 16px;
		bottom: 16px;
	}
	#chat-panel {
		right: 16px;
		bottom: 16px;
	}
}
