/* WP Chatbot - Frontend widget */
:root {
	--wp-chatbot-primary: #2563eb;
	--wp-chatbot-bg: #fff;
	--wp-chatbot-text: #1f2937;
	--wp-chatbot-border: #e5e7eb;
	--wp-chatbot-radius: 12px;
	--wp-chatbot-shadow: 0 4px 24px rgba(0,0,0,.12);
}

.wp-chatbot {
	position: fixed;
	z-index: 999997;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}

.wp-chatbot-bottom-right {
	bottom: 20px;
	right: 20px;
}

.wp-chatbot-bottom-left {
	bottom: 20px;
	left: 20px;
}

.wp-chatbot-toggle {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: var(--wp-chatbot-primary);
	color: #fff;
	cursor: pointer;
	box-shadow: var(--wp-chatbot-shadow);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .2s, box-shadow .2s;
}

.wp-chatbot-toggle:hover {
	transform: scale(1.05);
	box-shadow: 0 6px 28px rgba(0,0,0,.18);
}

.wp-chatbot-window {
	display: none;
	position: absolute;
	bottom: 70px;
	width: 380px;
	max-width: calc(100vw - 24px);
	height: 520px;
	max-height: 80vh;
	background: var(--wp-chatbot-bg);
	border-radius: var(--wp-chatbot-radius);
	box-shadow: var(--wp-chatbot-shadow);
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--wp-chatbot-border);
}

.wp-chatbot-bottom-left .wp-chatbot-window {
	left: 0;
	right: auto;
}

.wp-chatbot-bottom-right .wp-chatbot-window {
	right: 0;
	left: auto;
}

.wp-chatbot-open .wp-chatbot-window {
	display: flex;
}

.wp-chatbot-open .wp-chatbot-toggle {
	display: none;
}

.wp-chatbot-header {
	display: flex;
	align-items: center;
	padding: 14px 16px;
	background: var(--wp-chatbot-primary);
	color: #fff;
	gap: 10px;
}

.wp-chatbot-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255,255,255,.25);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 18px;
}

.wp-chatbot-header-text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.wp-chatbot-header-text strong { font-size: 16px; }
.wp-chatbot-status { font-size: 12px; opacity: .9; }

.wp-chatbot-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	opacity: .9;
}

.wp-chatbot-close:hover { opacity: 1; }

.wp-chatbot-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #f9fafb;
}

.wp-chatbot-msg {
	max-width: 85%;
	align-self: flex-start;
}

.wp-chatbot-msg-user {
	align-self: flex-end;
}

.wp-chatbot-msg-text {
	padding: 10px 14px;
	border-radius: 16px;
	word-wrap: break-word;
}

.wp-chatbot-msg-bot .wp-chatbot-msg-text {
	background: #fff;
	border: 1px solid var(--wp-chatbot-border);
	border-bottom-left-radius: 4px;
}

.wp-chatbot-msg-user .wp-chatbot-msg-text {
	background: var(--wp-chatbot-primary);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.wp-chatbot-msg-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.wp-chatbot-msg-btn {
	padding: 8px 14px;
	border-radius: 20px;
	border: 1px solid var(--wp-chatbot-primary);
	background: #fff;
	color: var(--wp-chatbot-primary);
	cursor: pointer;
	font-size: 13px;
}

.wp-chatbot-msg-btn:hover {
	background: var(--wp-chatbot-primary);
	color: #fff;
}

.wp-chatbot-quick-actions {
	padding: 8px 16px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	background: #fff;
	border-top: 1px solid var(--wp-chatbot-border);
}

.wp-chatbot-quick-btn {
	padding: 6px 12px;
	border-radius: 8px;
	border: 1px solid var(--wp-chatbot-border);
	background: #fff;
	cursor: pointer;
	font-size: 13px;
	color: var(--wp-chatbot-text);
}

.wp-chatbot-quick-btn:hover {
	background: #f3f4f6;
	border-color: var(--wp-chatbot-primary);
	color: var(--wp-chatbot-primary);
}

.wp-chatbot-input-area {
	display: flex;
	gap: 8px;
	padding: 12px 16px;
	background: #fff;
	border-top: 1px solid var(--wp-chatbot-border);
}

.wp-chatbot-input {
	flex: 1;
	padding: 12px 16px;
	border: 1px solid var(--wp-chatbot-border);
	border-radius: 24px;
	font-size: 15px;
	outline: none;
}

.wp-chatbot-input:focus {
	border-color: var(--wp-chatbot-primary);
	box-shadow: 0 0 0 2px rgba(37, 99, 235, .2);
}

.wp-chatbot-send {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: var(--wp-chatbot-primary);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wp-chatbot-send:hover {
	opacity: .9;
}

.wp-chatbot[aria-hidden="true"] .wp-chatbot-toggle { display: flex; }
.wp-chatbot[aria-hidden="true"] .wp-chatbot-window { display: none; }
