.aspich-widget {
	position: fixed;
	right: var(--aspich-right-offset, 20px);
	bottom: 20px;
	z-index: 99999;
	font-family: Arial, sans-serif;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
}

.aspich-launcher {
	background: var(--aspich-primary);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 12px 18px;
	cursor: pointer;
	font-size: 14px;
}


.aspich-panel[hidden] {
	display: none !important;
}

.aspich-panel {
	width: 340px;
	height: 500px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 14px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.aspich-header {
	background: var(--aspich-primary);
	color: #fff;
	padding: 14px;
	font-weight: 600;
}

.aspich-messages {
	flex: 1;
	padding: 12px;
	overflow-y: auto;
	background: #f8fafc;
}

.aspich-message {
	margin-bottom: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	max-width: 85%;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.aspich-user {
	background: var(--aspich-primary);
	color: #fff;
	margin-left: auto;
}

.aspich-bot {
	background: #e5e7eb;
	color: #111827;
}

.aspich-thinking {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 18px;
}

.aspich-thinking span {
	width: 7px;
	height: 7px;
	background: #6b7280;
	border-radius: 50%;
	animation: aspich-bounce 1.2s infinite ease-in-out;
}

.aspich-thinking span:nth-child(2) {
	animation-delay: 0.15s;
}

.aspich-thinking span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes aspich-bounce {
	0%, 80%, 100% {
		transform: scale(0.4);
		opacity: 0.55;
	}
	40% {
		transform: scale(1);
		opacity: 1;
	}
}

.aspich-chips {
	padding: 10px 12px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.aspich-chip {
	border: 1px solid #d1d5db;
	background: #fff;
	color: #111827;
	border-radius: 999px;
	padding: 6px 10px;
	font-size: 12px;
	line-height: 1.3;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.aspich-chip:hover,
.aspich-chip:focus {
	background: var(--aspich-primary);
	color: #fff;
	border-color: var(--aspich-primary);
}

.aspich-chip:focus {
	outline: 2px solid transparent;
}

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

.aspich-input {
	flex: 1;
	padding: 10px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
}

.aspich-send {
	background: var(--aspich-primary);
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: 10px 14px;
	cursor: pointer;
}

.aspich-send:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.aspich-footer {
	padding: 8px 12px 12px;
	font-size: 12px;
	color: #6b7280;
	text-align: center;
}

.aspich-footer a {
	color: inherit;
	text-decoration: none;
}

.aspich-footer a:hover {
	text-decoration: underline;
}


.aspich-message-content {
	line-height: 1.55;
}

.aspich-bot .aspich-message-content {
	font-size: 14px;
}

.aspich-bot .aspich-message-content h1,
.aspich-bot .aspich-message-content h2,
.aspich-bot .aspich-message-content h3,
.aspich-bot .aspich-message-content h4 {
	margin: 0 0 8px;
	line-height: 1.25;
	font-weight: 700;
	color: #111827;
}

.aspich-bot .aspich-message-content h1 {
	font-size: 20px;
}

.aspich-bot .aspich-message-content h2 {
	font-size: 18px;
}

.aspich-bot .aspich-message-content h3 {
	font-size: 16px;
}

.aspich-bot .aspich-message-content h4 {
	font-size: 15px;
}

.aspich-bot .aspich-message-content p {
	margin: 0 0 10px;
}

.aspich-bot .aspich-message-content p:last-child {
	margin-bottom: 0;
}

.aspich-bot .aspich-message-content ul,
.aspich-bot .aspich-message-content ol {
	margin: 0 0 10px 18px;
	padding: 0;
}

.aspich-bot .aspich-message-content li {
	margin: 0 0 6px;
}

.aspich-bot .aspich-message-content strong {
	font-weight: 700;
}

.aspich-bot .aspich-message-content em {
	font-style: italic;
}

.aspich-bot .aspich-message-content code {
	padding: 1px 4px;
	border-radius: 4px;
	background: #dbe3ee;
	font-size: 12px;
	font-family: Consolas, Monaco, monospace;
}
