/*
 * Dizting AI Chatbot - front-end widget styles.
 * Uses simple, self-contained selectors (all prefixed .dac-) so the
 * plugin never collides with theme styles.
 */

.dac-widget {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.dac-widget--inline {
	position: relative;
	right: auto;
	bottom: auto;
	max-width: 420px;
}

.dac-bubble-toggle {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	background: #1a73e8;
	color: #fff;
	font-size: 26px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
}

.dac-bubble-toggle:hover {
	transform: scale(1.06);
}

.dac-panel {
	display: none;
	flex-direction: column;
	width: 340px;
	max-width: calc(100vw - 40px);
	height: 480px;
	max-height: 70vh;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	overflow: hidden;
	position: absolute;
	right: 0;
	bottom: 74px;
}

.dac-widget--inline .dac-panel {
	display: flex;
	position: static;
	width: 100%;
	height: 520px;
	max-height: none;
}

.dac-widget--bubble.dac-widget--open .dac-panel {
	display: flex;
}

.dac-panel-header {
	background: #1a73e8;
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
}

.dac-panel-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
}

.dac-panel-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #f7f8fa;
}

.dac-msg {
	max-width: 85%;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.dac-msg--bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e3e5e8;
	color: #222;
	border-bottom-left-radius: 2px;
}

.dac-msg--user {
	align-self: flex-end;
	background: #1a73e8;
	color: #fff;
	border-bottom-right-radius: 2px;
}

.dac-msg--typing {
	align-self: flex-start;
	color: #888;
	font-style: italic;
}

.dac-panel-form {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #e3e5e8;
	background: #fff;
}

.dac-panel-input {
	flex: 1;
	resize: none;
	border: 1px solid #dcdfe3;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
	font-family: inherit;
	max-height: 90px;
}

.dac-panel-send {
	background: #1a73e8;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 0 16px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
}

.dac-panel-send:disabled {
	opacity: 0.6;
	cursor: default;
}
