.cspf-widget {
	--cspf-accent: #c8952a;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}
.cspf-widget *,
.cspf-widget *::before,
.cspf-widget *::after {
	box-sizing: border-box;
}

/* Floating bubble positioning */
.cspf-floating {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 999999;
}

.cspf-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--cspf-accent);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 12px 18px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.cspf-toggle:hover {
	filter: brightness(0.95);
}
.cspf-toggle-icon {
	font-size: 18px;
}

.cspf-panel {
	width: 340px;
	max-width: calc(100vw - 32px);
	height: 440px;
	max-height: 70vh;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	margin-top: 10px;
}
.cspf-inline .cspf-panel {
	position: static;
	width: 100%;
	max-width: 480px;
	margin-top: 0;
}
.cspf-floating .cspf-panel {
	position: absolute;
	bottom: 56px;
	right: 0;
}
.cspf-panel[hidden] {
	display: none;
}

.cspf-header {
	background: var(--cspf-accent);
	color: #fff;
	padding: 12px 14px;
	font-weight: 600;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.cspf-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.cspf-messages {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #f7f7f8;
}

.cspf-msg {
	max-width: 85%;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: 13px;
	line-height: 1.4;
}
.cspf-msg-bot {
	background: #fff;
	border: 1px solid #e5e5e5;
	align-self: flex-start;
}
.cspf-msg-user {
	background: var(--cspf-accent);
	color: #fff;
	align-self: flex-end;
}
.cspf-msg-typing {
	font-style: italic;
	color: #888;
}

.cspf-product-card {
	display: flex;
	gap: 10px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	padding: 10px;
	align-self: flex-start;
	max-width: 95%;
	text-decoration: none;
	color: inherit;
}
.cspf-product-card img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 6px;
	flex-shrink: 0;
	background: #f0f0f0;
}
.cspf-product-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.cspf-product-name {
	font-size: 13px;
	font-weight: 600;
	color: #111;
}
.cspf-product-price {
	font-size: 12px;
	color: var(--cspf-accent);
	font-weight: 600;
}
.cspf-product-reason {
	font-size: 11.5px;
	color: #666;
}

.cspf-form {
	display: flex;
	border-top: 1px solid #e5e5e5;
	padding: 8px;
	gap: 6px;
	background: #fff;
}
.cspf-input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 10px;
	font-size: 13px;
}
.cspf-input:focus {
	outline: 2px solid var(--cspf-accent);
}
.cspf-send {
	background: var(--cspf-accent);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.cspf-send:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}
