/* Nocodevn Botchat — scoped under #bc-widget */
#bc-widget {
	--bc-red: #d32f2f;
	--bc-red-dark: #b71c1c;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

#bc-widget.bc-widget-root--inline .bc-chat-launcher,
#bc-widget.bc-widget-root--inline .bc-chat-tooltip {
	display: none;
}

#bc-widget.bc-widget-root--inline .bc-chat-container {
	position: relative;
	bottom: auto;
	right: auto;
	opacity: 1;
	transform: none;
	pointer-events: auto;
	width: 100%;
	max-width: 420px;
	height: 520px;
	max-height: 70vh;
}

.bc-chat-tooltip {
	position: fixed;
	bottom: 32px;
	right: 95px;
	background: white;
	color: #333;
	padding: 10px 16px;
	border-radius: 12px;
	font-size: 13.5px;
	font-weight: 500;
	box-shadow: 0 4px 15px rgba(0,0,0,0.1);
	white-space: nowrap;
	z-index: 1000;
	pointer-events: none;
	
	/* Hiệu ứng ẩn hiện */
	opacity: 0;
	transform: translateX(15px);
	transition: all 0.4s ease;
}

.bc-chat-tooltip::after {
	content: '';
	position: absolute;
	right: -6px;
	top: 50%;
	transform: translateY(-50%);
	border-width: 6px 0 6px 6px;
	border-style: solid;
	border-color: transparent transparent transparent white;
}

.bc-chat-tooltip.show {
	opacity: 1;
	transform: translateX(0);
}

.bc-chat-launcher {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 60px;
	height: 60px;
	background: linear-gradient(135deg, #e53935, #b71c1c);
	color: white;
	border: none;
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(211, 47, 47, 0.4);
	z-index: 1001;
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bc-chat-launcher:hover {
	transform: scale(1.08) translateY(-2px);
	box-shadow: 0 10px 28px rgba(211, 47, 47, 0.5);
}

.bc-chat-launcher .bc-icon-chat, 
.bc-chat-launcher .bc-icon-close {
	position: absolute;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bc-chat-launcher .bc-icon-close {
	opacity: 0;
	transform: rotate(-180deg) scale(0.5);
}

.bc-chat-launcher.active {
	background: #333; 
	box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.bc-chat-launcher.active .bc-icon-chat {
	opacity: 0;
	transform: rotate(180deg) scale(0.5);
}

.bc-chat-launcher.active .bc-icon-close {
	opacity: 1;
	transform: rotate(0) scale(1);
}

.bc-chat-container {
	position: fixed;
	bottom: 95px;
	right: 20px;
	width: 380px;
	max-width: 90vw;
	height: 70vh;
	max-height: 580px;
	background: #ffffff;
	border-radius: 24px;
	box-shadow: 0 12px 40px rgba(0,0,0,0.16);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 999;
	
	opacity: 0;
	transform: translateY(30px) scale(0.92);
	transform-origin: bottom right;
	pointer-events: none;
	transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bc-chat-container.active {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.bc-chat-header {
	background: linear-gradient(135deg, #d32f2f, #9a0007); 
	color: white; 
	padding: 16px 20px;
	font-weight: 700; 
	font-size: 1.05rem;
	letter-spacing: 0.5px;
	box-shadow: 0 4px 10px rgba(0,0,0,0.05);
	flex-shrink: 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.bc-clear-btn {
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: white;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: background 0.2s, transform 0.1s;
}

.bc-clear-btn:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: scale(1.05);
}

.bc-clear-btn svg {
	stroke: white;
	width: 15px;
	height: 15px;
}

.bc-chat-box {
	flex: 1; 
	padding: 20px; 
	overflow-y: auto;
	display: flex; 
	flex-direction: column; 
	gap: 14px; 
	background: #fafafa;
}

.bc-message { 
	padding: 12px 16px; 
	border-radius: 18px; 
	max-width: 82%; 
	font-size: 14px; 
	white-space: pre-wrap; 
	line-height: 1.5; 
	box-shadow: 0 2px 4px rgba(0,0,0,0.02); 
}

.bc-message.user { 
	align-self: flex-end; 
	background: #d32f2f; 
	color: white; 
	border-bottom-right-radius: 4px; 
}

.bc-message.bot { 
	align-self: flex-start; 
	background: #ffffff; 
	color: #333; 
	border-bottom-left-radius: 4px; 
	border: 1px solid #eaeaea; 
}

.bc-message.typing {
	opacity: 0.7;
	font-style: italic;
}

.bc-bus-card {
	background: white; 
	border: 1px solid #e0e0e0; 
	border-radius: 16px;
	padding: 16px; 
	margin-top: 5px; 
	box-shadow: 0 4px 12px rgba(0,0,0,0.04);
	transition: transform 0.2s;
	align-self: flex-start;
	max-width: 92%;
	width: 100%;
	box-sizing: border-box;
}

.bc-bus-card:hover { 
	transform: translateY(-2px); 
}

.bc-bus-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	margin-bottom: 12px;
	gap: 10px;
}

.bc-route-title {
	font-size: 14.5px;
	font-weight: 700;
	color: #222;
}

.bc-bus-card-price {
	font-size: 15.5px;
	font-weight: 700;
	color: #d32f2f;
	white-space: nowrap;
}

.bc-bus-card-timeline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 12px 0;
	padding: 10px 8px;
	background: #f9f9f9;
	border-radius: 12px;
	border: 1px solid #f0f0f0;
	gap: 8px;
	width: 100%;
	box-sizing: border-box;
}

.bc-time-node {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 60px;
}

.bc-time-val {
	font-size: 16px;
	font-weight: 700;
	color: #111;
	line-height: 1.2;
}

.bc-time-lbl {
	font-size: 11px;
	color: #666;
	margin-top: 3px;
	max-width: 75px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-align: center;
}

.bc-time-arrow {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	position: relative;
	justify-content: center;
}

.bc-duration {
	font-size: 10px;
	color: #777;
	background: white;
	padding: 2px 8px;
	border-radius: 20px;
	border: 1px solid #e0e0e0;
	margin-bottom: -5px;
	z-index: 1;
	font-weight: 600;
	white-space: nowrap;
}

.bc-line {
	display: block;
	width: 100%;
	height: 2px;
	border-top: 2px dashed #d0d0d0;
}

.bc-bus-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 11.5px;
	color: #666;
	margin-bottom: 12px;
	width: 100%;
}

.bc-bus-card-meta span {
	background: #f5f5f5;
	padding: 3px 8px;
	border-radius: 6px;
	white-space: nowrap;
}

.bc-message.bot ul, .bc-message.bot ol {
	margin: 8px 0 0 20px;
	padding: 0;
}

.bc-message.bot li {
	margin-bottom: 4px;
}

.bc-btn-book {
	display: block;
	width: 100%; 
	text-align: center;
	background: linear-gradient(135deg, #d32f2f, #b71c1c); 
	color: white !important; 
	border: none;
	padding: 11px; 
	border-radius: 10px; 
	cursor: pointer; 
	font-weight: bold; 
	margin-top: 12px;
	text-decoration: none;
	transition: opacity 0.2s;
}

.bc-btn-book:hover { 
	opacity: 0.9; 
}

/* Booking Card Styles */
.bc-booking-card {
	background: white;
	border: 1px solid #e0e0e0;
	border-radius: 16px;
	padding: 16px;
	margin-top: 5px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.04);
	align-self: flex-start;
	max-width: 92%;
}

.bc-booking-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px dashed #e0e0e0;
	padding-bottom: 12px;
	margin-bottom: 12px;
}

.bc-booking-card-header strong {
	color: var(--bc-red-dark);
	font-size: 15px;
}

.bc-booking-status {
	font-size: 11px;
	padding: 4px 8px;
	border-radius: 20px;
	font-weight: 600;
	background: #f5f5f5;
	color: #666;
}

.bc-status-chờ-xử-lý { background: #fff3e0; color: #e65100; }
.bc-status-đã-thanh-toán--thành-công- { background: #e8f5e9; color: #2e7d32; }
.bc-status-đã-hoàn-tất-chuyến-đi { background: #e3f2fd; color: #1565c0; }
.bc-status-đã-hủy { background: #ffebee; color: #c62828; }
.bc-status-đang-giữ-chỗ--chưa-thanh-toán- { background: #fff8e1; color: #f57f17; }

.bc-booking-card-body p {
	margin: 6px 0;
	font-size: 13.5px;
	color: #444;
	line-height: 1.4;
}

.bc-booking-card-body p strong {
	color: #222;
	font-weight: 600;
	margin-right: 4px;
}

.bc-price {
	color: var(--bc-red);
	font-weight: 700;
	font-size: 15px;
}

.bc-suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 16px 10px;
	background: #fafafa;
}

.bc-suggestion-chip {
	border: 1px solid #e0e0e0;
	background: #fff;
	border-radius: 16px;
	padding: 6px 12px;
	font-size: 12px;
	cursor: pointer;
	color: #444;
}

.bc-suggestion-chip:hover {
	border-color: var(--bc-red);
	color: var(--bc-red);
}

.bc-chat-input-area {
	display: flex; 
	align-items: flex-end; 
	padding: 15px 20px;
	background: white; 
	border-top: 1px solid #f0f0f0; 
	gap: 10px;
	flex-shrink: 0;
}

#bcUserInput {
	flex: 1; 
	border: 1px solid #e0e0e0; 
	padding: 12px 16px;
	border-radius: 20px; 
	outline: none; 
	resize: none;
	max-height: 120px; 
	min-height: 44px; 
	line-height: 20px;
	background: #f9f9f9; 
	transition: border 0.2s;
	font-family: inherit;
	font-size: 14px;
}

#bcUserInput:focus { 
	border-color: #d32f2f; 
	background: #fff; 
}

.bc-send-btn {
	background: #d32f2f; 
	color: white; 
	border: none;
	width: 44px; 
	height: 44px; 
	border-radius: 50%;
	cursor: pointer; 
	display: flex; 
	justify-content: center; 
	align-items: center; 
	flex-shrink: 0;
	transition: background 0.2s, transform 0.1s;
}

.bc-send-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.bc-send-btn:not(:disabled):hover { 
	background: #b71c1c; 
	transform: scale(1.05); 
}

/* Thẻ đặt vé cá nhân hóa điền sẵn thông tin (Smart Autofill Booking Card) */
.bc-personalized-booking-card {
	background: #fff9f9; 
	border: 1px solid #ffcccc; 
	border-radius: 16px;
	padding: 16px; 
	margin-top: 8px; 
	box-shadow: 0 4px 12px rgba(211, 47, 47, 0.08);
	transition: transform 0.2s, box-shadow 0.2s;
	align-self: flex-start;
	max-width: 92%;
	width: 100%;
	box-sizing: border-box;
}

.bc-personalized-booking-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(211, 47, 47, 0.12);
}

.bc-pbook-header {
	border-bottom: 1px solid #ffebeb;
	padding-bottom: 8px;
	margin-bottom: 12px;
}

.bc-pbook-header strong {
	color: #b71c1c;
	font-size: 15px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.bc-pbook-body {
	font-size: 13.5px;
	color: #444;
	line-height: 1.6;
	margin-bottom: 14px;
}

.bc-pbook-body p {
	margin: 6px 0;
	display: flex;
	justify-content: space-between;
}

.bc-pbook-body strong {
	color: #666;
	font-weight: 500;
}

/* ── Ask-input nổi bật (hỏi tên / SĐT từng bước) ── */
.bc-ask-input-wrap {
	align-self: flex-start;
	width: calc(100% - 0px);
	max-width: 96%;
	background: linear-gradient(135deg, #fff9f9, #fff3f3);
	border: 2px solid #d32f2f;
	border-radius: 16px;
	padding: 16px;
	box-sizing: border-box;
	box-shadow: 0 4px 16px rgba(211, 47, 47, 0.13);
	animation: bc-pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	margin-top: 4px;
}

.bc-ask-input-wrap.bc-ask-done {
	opacity: 0.55;
	pointer-events: none;
}

@keyframes bc-pop-in {
	from { opacity: 0; transform: scale(0.88) translateY(8px); }
	to   { opacity: 1; transform: scale(1) translateY(0); }
}

.bc-ask-label {
	font-size: 14px;
	font-weight: 700;
	color: #b71c1c;
	margin-bottom: 12px;
	line-height: 1.4;
}

.bc-ask-field {
	display: flex;
	gap: 8px;
	align-items: center;
}

.bc-ask-input {
	flex: 1;
	border: 1.5px solid #e0e0e0;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 14px;
	outline: none;
	font-family: inherit;
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.bc-ask-input:focus {
	border-color: #d32f2f;
	box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

.bc-ask-input--error {
	border-color: #ff5252 !important;
	animation: bc-shake 0.35s ease;
}

@keyframes bc-shake {
	0%, 100% { transform: translateX(0); }
	25%       { transform: translateX(-6px); }
	75%       { transform: translateX(6px); }
}

.bc-ask-submit {
	background: linear-gradient(135deg, #d32f2f, #b71c1c);
	color: white;
	border: none;
	padding: 10px 16px;
	border-radius: 10px;
	cursor: pointer;
	font-weight: 700;
	font-size: 13.5px;
	white-space: nowrap;
	transition: opacity 0.2s, transform 0.15s;
	font-family: inherit;
	flex-shrink: 0;
}

.bc-ask-submit:hover:not(:disabled) {
	opacity: 0.88;
	transform: scale(1.03);
}

.bc-ask-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Nút ĐẶT VÉ NGAY cuối cùng (to hơn, có pulse) ── */
.bc-btn-book--final {
	background: linear-gradient(135deg, #d32f2f, #9a0007) !important;
	font-size: 15px !important;
	padding: 14px !important;
	letter-spacing: 0.4px;
	box-shadow: 0 4px 16px rgba(211, 47, 47, 0.35);
	animation: bc-pulse 1.8s ease-in-out infinite;
}

@keyframes bc-pulse {
	0%, 100% { box-shadow: 0 4px 16px rgba(211, 47, 47, 0.35); }
	50%       { box-shadow: 0 6px 24px rgba(211, 47, 47, 0.55); transform: translateY(-1px); }
}

/* ── Labels trong personalized booking card ── */
.bc-pbook-lbl {
	font-weight: 600;
	color: #666;
	font-size: 12.5px;
	min-width: 110px;
}

