/* McDan Group Chatbot — widget styles */

.mcdan-fchat-wrapper {
	--mcdan-primary: #0b3d2e;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}
.mcdan-fchat-wrapper *,
.mcdan-fchat-wrapper *::before,
.mcdan-fchat-wrapper *::after {
	box-sizing: inherit;
}

/* Floating (auto-injected) mode */
.mcdan-fchat-floating {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
}

.mcdan-fchat-launcher {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--mcdan-primary);
	color: #fff;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
	font-size: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
}
.mcdan-fchat-launcher:hover {
	transform: scale(1.06);
}

.mcdan-fchat-floating .mcdan-fchat-panel {
	position: absolute;
	right: 0;
	bottom: 76px;
	width: 360px;
	max-width: calc(100vw - 40px);
	height: 480px;
	max-height: 70vh;
}

/* Inline (shortcode) mode */
.mcdan-fchat-inline .mcdan-fchat-panel {
	position: relative;
	width: 100%;
	max-width: 480px;
	height: 520px;
}

.mcdan-fchat-panel {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.06);
}
.mcdan-fchat-panel[hidden] {
	display: none;
}

.mcdan-fchat-header {
	background: var(--mcdan-primary);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
	font-size: 15px;
}

.mcdan-fchat-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.mcdan-fchat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: #f7f8f7;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mcdan-fchat-msg {
	max-width: 85%;
	padding: 10px 13px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.mcdan-fchat-msg-bot {
	background: #fff;
	border: 1px solid #e6e6e6;
	align-self: flex-start;
	border-bottom-left-radius: 3px;
}

.mcdan-fchat-msg-user {
	background: var(--mcdan-primary);
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 3px;
}

.mcdan-fchat-msg-error {
	background: #fdecea;
	color: #611a15;
	border: 1px solid #f5c6cb;
	align-self: flex-start;
}

.mcdan-fchat-msg-typing {
	background: #fff;
	border: 1px solid #e6e6e6;
	align-self: flex-start;
	font-style: italic;
	color: #777;
}

.mcdan-fchat-sources {
	margin-top: 6px;
	font-size: 12px;
	opacity: 0.85;
}
.mcdan-fchat-sources a {
	color: inherit;
	text-decoration: underline;
	display: block;
	margin-top: 2px;
}

.mcdan-fchat-form {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #eee;
	background: #fff;
}

.mcdan-fchat-input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 9px 11px;
	font-size: 14px;
	outline: none;
}
.mcdan-fchat-input:focus {
	border-color: var(--mcdan-primary);
}

.mcdan-fchat-send {
	background: var(--mcdan-primary);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 0 16px;
	font-size: 14px;
	cursor: pointer;
	font-weight: 600;
}
.mcdan-fchat-send:disabled {
	opacity: 0.6;
	cursor: default;
}

@media (max-width: 480px) {
	.mcdan-fchat-floating .mcdan-fchat-panel {
		width: calc(100vw - 24px);
		right: -8px;
	}
}
