/**
 * POWER+RADACH AI – Front-end chatbot widget styles.
 */

#wpai-pr-chat-toggle {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	width: 56px;
	height: 56px;
	border: 0;
	border-radius: 50%;
	background: #1e1e1e;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba( 0, 0, 0, 0.25 );
	display: flex;
	align-items: center;
	justify-content: center;
}

#wpai-pr-chat-toggle .dashicons {
	width: 26px;
	height: 26px;
	font-size: 26px;
}

#wpai-pr-chat-widget {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	width: 340px;
	max-width: calc( 100vw - 40px );
	height: 480px;
	max-height: calc( 100vh - 40px );
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 30px rgba( 0, 0, 0, 0.25 );
	font-size: 14px;
	color: #1e1e1e;
}

#wpai-pr-chat-widget[hidden],
#wpai-pr-chat-toggle[hidden] {
	display: none;
}

#wpai-pr-chat-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	background: #1e1e1e;
	color: #fff;
}

#wpai-pr-chat-title {
	font-weight: 600;
}

#wpai-pr-chat-close {
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

#wpai-pr-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #f6f7f7;
}

.wpai-pr-chat-message {
	display: flex;
}

.wpai-pr-chat-message span {
	display: inline-block;
	padding: 8px 11px;
	border-radius: 12px;
	max-width: 85%;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.wpai-pr-chat-message-user {
	justify-content: flex-end;
}

.wpai-pr-chat-message-user span {
	background: #1e1e1e;
	color: #fff;
	border-bottom-right-radius: 2px;
}

.wpai-pr-chat-message-assistant span {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-bottom-left-radius: 2px;
}

#wpai-pr-chat-error {
	display: none;
	padding: 8px 14px;
	color: #b32d2e;
	font-size: 13px;
}

#wpai-pr-chat-input-row {
	display: flex;
	gap: 6px;
	padding: 10px;
	border-top: 1px solid #e0e0e0;
	background: #fff;
}

#wpai-pr-chat-input {
	flex: 1;
	padding: 8px 10px;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	font-size: 14px;
}

#wpai-pr-chat-send {
	border: 0;
	border-radius: 8px;
	background: #1e1e1e;
	color: #fff;
	padding: 0 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

#wpai-pr-chat-send:disabled {
	opacity: 0.5;
	cursor: default;
}
