/* AIBooking AI Chat — floating widget */

.abc-chat {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
	font-size: 14px;
}

.abc-chat__toggle {
	width: 56px;
	height: 56px;
	padding: 0;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	background: #1e6fd9;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease, background 0.15s ease;
}

.abc-chat__toggle:hover {
	background: #155bb3;
	transform: scale(1.05);
}

.abc-chat__toggle img {
	width: 28px;
	height: 28px;
	max-width: none;
	flex: 0 0 auto;
	display: block;
}

.abc-chat__panel {
	position: absolute;
	right: 0;
	bottom: 68px;
	width: 340px;
	max-width: calc(100vw - 40px);
	height: 460px;
	max-height: calc(100vh - 120px);
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.abc-chat__panel[hidden] {
	display: none;
}

.abc-chat__header {
	background: #1e6fd9;
	color: #fff;
	padding: 12px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.abc-chat__title {
	font-weight: 600;
}

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

.abc-chat__messages {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
	background: #f5f7fa;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.abc-msg {
	max-width: 82%;
	padding: 8px 12px;
	border-radius: 14px;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-word;
}

.abc-msg--user {
	align-self: flex-end;
	background: #1e6fd9;
	color: #fff;
	border-bottom-right-radius: 4px;
}

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

.abc-msg--bot a {
	color: #1e6fd9;
	text-decoration: underline;
	word-break: break-all;
}

.abc-msg--bot a:hover {
	color: #0f4e9e;
}

.abc-msg--error {
	align-self: center;
	background: #fdecea;
	color: #b3261e;
	font-size: 13px;
}

.abc-msg--typing {
	color: #888;
	font-style: italic;
}

.abc-chat__teaser {
	position: absolute;
	right: 64px;
	bottom: 14px;
	width: 220px;
	background: #fff;
	border: 1px solid #e3e6ea;
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
	padding: 10px 26px 10px 12px;
	cursor: pointer;
	font-size: 13px;
	line-height: 1.4;
}

.abc-chat__teaser::after {
	content: "";
	position: absolute;
	right: -7px;
	bottom: 14px;
	border: 7px solid transparent;
	border-left-color: #fff;
	border-right: 0;
}

.abc-chat__teaser[hidden] {
	display: none;
}

.abc-chat__teaser-close {
	position: absolute;
	top: 4px;
	right: 6px;
	border: none;
	background: none;
	font-size: 16px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 2px 4px;
}

.abc-chat__quick {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 8px 12px 0;
	background: #f5f7fa;
}

.abc-chat__quick:empty {
	display: none;
}

.abc-quick-btn {
	border: 1px solid #1e6fd9;
	background: #fff;
	color: #1e6fd9;
	border-radius: 14px;
	padding: 4px 12px;
	font-size: 13px;
	cursor: pointer;
}

.abc-quick-btn:hover {
	background: #1e6fd9;
	color: #fff;
}

.abc-chat__composer {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #e3e6ea;
	background: #fff;
}

.abc-chat__input {
	flex: 1;
	resize: none;
	border: 1px solid #d5dae0;
	border-radius: 8px;
	padding: 8px 10px;
	font: inherit;
	max-height: 90px;
}

.abc-chat__input:focus {
	outline: none;
	border-color: #1e6fd9;
}

.abc-chat__send {
	border: none;
	background: #1e6fd9;
	color: #fff;
	border-radius: 8px;
	padding: 0 16px;
	cursor: pointer;
	font: inherit;
}

.abc-chat__send:disabled {
	background: #9db9dd;
	cursor: not-allowed;
}

.abc-chat__mic {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border: 1px solid #d5dae0;
	border-radius: 8px;
	background: #fff;
	color: #666;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.abc-chat__mic svg {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
}

.abc-chat__mic:hover {
	border-color: #1e6fd9;
	color: #1e6fd9;
}

.abc-chat__mic--on {
	background: #d63638;
	border-color: #d63638;
	color: #fff;
	animation: abc-mic-pulse 1.2s ease-in-out infinite;
}

@keyframes abc-mic-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(214, 54, 56, 0.5); }
	50% { box-shadow: 0 0 0 6px rgba(214, 54, 56, 0); }
}

@media (max-width: 480px) {
	.abc-chat__panel {
		width: calc(100vw - 40px);
		height: 60vh;
	}
}
