.nutsforpress-chatbot-widget {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nutsforpress-chatbot-button {
	background-color: #0073AA;
	color: #ffffff;
	border: 0;
	border-radius: 999px;
	padding: 10px 16px;
	cursor: pointer;
	font-size: 14px;
}

.nutsforpress-chatbot-button:hover,
.nutsforpress-chatbot-button:focus {
	background-color: #00A0D2;
}

.nutsforpress-chatbot-panel {
	width: 360px;
	max-width: calc(100vw - 24px);
	max-height: 520px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	box-shadow: 0 14px 40px rgba(15, 23, 42, 0.18);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.nutsforpress-chatbot-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	border-bottom: 1px solid #eef2f7;
	background: #f8fafc;
}

.nutsforpress-chatbot-title {
	font-size: 13px;
	font-weight: 700;
	color: #1f2937;
}

.nutsforpress-chatbot-actions {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.nutsforpress-chatbot-reset {
	appearance: none;
	border: 1px solid #d1d5db;
	background: #ffffff;
	color: #374151;
	font-size: 11px;
	font-weight: 600;
	border-radius: 999px;
	padding: 3px 8px;
	cursor: pointer;
}

.nutsforpress-chatbot-reset:hover,
.nutsforpress-chatbot-reset:focus {
	border-color: #9ca3af;
	color: #111827;
}

.nutsforpress-chatbot-close {
	appearance: none;
	border: 0;
	background: transparent;
	color: #6b7280;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 2px 4px;
}

.nutsforpress-chatbot-close:hover,
.nutsforpress-chatbot-close:focus {
	color: #111827;
}

.nutsforpress-chatbot-messages {
	padding: 12px;
	overflow-y: auto;
	flex: 1;
	background: #f5f7fb;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nutsforpress-message {
	max-width: 86%;
	padding: 9px 11px;
	border-radius: 12px;
	font-size: 13px;
	line-height: 1.45;
	word-break: break-word;
}

.nutsforpress-message-user {
	align-self: flex-end;
	background: #0073AA;
	color: #ffffff;
	border-bottom-right-radius: 4px;
}

.nutsforpress-message-assistant {
	align-self: flex-start;
	background: #ffffff;
	color: #111827;
	border: 1px solid #e5e7eb;
	border-bottom-left-radius: 4px;
}

.nutsforpress-message-assistant p {
	margin: 0 0 8px;
}

.nutsforpress-message-assistant p:last-child {
	margin-bottom: 0;
}

.nutsforpress-message-assistant ul,
.nutsforpress-message-assistant ol {
	margin: 6px 0 6px 18px;
	padding: 0;
}

.nutsforpress-message-assistant li {
	margin: 2px 0;
}

.nutsforpress-message-assistant strong {
	font-weight: 700;
}

.nutsforpress-typing {
	display: inline-flex;
	gap: 4px;
	align-items: center;
}

.nutsforpress-typing-dot {
	width: 5px;
	height: 5px;
	border-radius: 999px;
	background: #6b7280;
	animation: nutsforpressTyping 1s infinite ease-in-out;
}

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

.nutsforpress-typing-dot:nth-child(3) {
	animation-delay: 0.32s;
}

@keyframes nutsforpressTyping {
	0%, 80%, 100% {
		opacity: 0.25;
		transform: translateY(0);
	}
	40% {
		opacity: 1;
		transform: translateY(-2px);
	}
}

.nutsforpress-chatbot-form {
	border-top: 1px solid #eef2f7;
	padding: 10px;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
	background: #ffffff;
}

.nutsforpress-chatbot-input {
	width: 100%;
	min-height: 44px;
	max-height: 130px;
	resize: none;
	font-size: 13px;
	line-height: 1.35;
	padding: 10px 11px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	background: #f8fafc;
}

.nutsforpress-chatbot-input:focus {
	outline: none;
	border-color: #0073AA;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.12);
	background: #ffffff;
}

.nutsforpress-chatbot-submit {
	align-self: end;
	background-color: #0073AA;
	color: #ffffff;
	border: none;
	border-radius: 10px;
	padding: 10px 13px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
}

.nutsforpress-chatbot-submit:hover,
.nutsforpress-chatbot-submit:focus {
	background-color: #00A0D2;
}

@media (max-width: 640px) {
	.nutsforpress-chatbot-widget {
		right: 10px;
		left: 10px;
		bottom: 10px;
	}

	.nutsforpress-chatbot-panel {
		width: 100%;
		max-height: 72vh;
	}
}
