/* Oncostore Chatbot v0.8.3 */

#oncostore-chatbot-root {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
	font-size: 14px; line-height: 1.5; color: #1F2937;
	--ocb-primary: #1F4E79; --ocb-primary-light: #2A5F92;
	--ocb-bg: #FAFBFC; --ocb-card: #FFFFFF;
	--ocb-border: #EAECF0; --ocb-border-light: #F2F4F7;
	--ocb-text: #1F2937; --ocb-muted: #667085;
	--ocb-success: #10B981;
	--ocb-shadow-sm: 0 1px 2px rgba(15,23,42,0.05);
	--ocb-shadow-lg: 0 16px 48px rgba(15,23,42,0.16);
}
#oncostore-chatbot-root *,
#oncostore-chatbot-root *::before,
#oncostore-chatbot-root *::after { box-sizing: border-box; }

#oncostore-chatbot-root .ocb-launcher {
	position: fixed; bottom: 24px; right: 24px;
	width: 60px; height: 60px; border-radius: 50%;
	background: linear-gradient(135deg, var(--ocb-primary) 0%, var(--ocb-primary-light) 100%);
	color: #fff; border: none; cursor: pointer;
	box-shadow: 0 6px 20px rgba(31,78,121,0.35);
	display: flex; align-items: center; justify-content: center;
	z-index: 999999; transition: transform 0.2s ease;
}
#oncostore-chatbot-root .ocb-launcher:hover { transform: scale(1.08); }
#oncostore-chatbot-root .ocb-launcher-pulse {
	position: absolute; inset: 0; border-radius: 50%;
	background: var(--ocb-primary); opacity: 0.4;
	animation: ocb-pulse 2.4s ease-out infinite;
}
@keyframes ocb-pulse { 0% { transform: scale(1); opacity: 0.4; } 100% { transform: scale(1.7); opacity: 0; } }

#oncostore-chatbot-root .ocb-panel {
	position: fixed; bottom: 24px; right: 24px;
	width: 400px; height: 620px; max-height: calc(100vh - 48px);
	background: var(--ocb-card); border-radius: 18px;
	box-shadow: var(--ocb-shadow-lg);
	display: flex; flex-direction: column;
	z-index: 999999; overflow: hidden;
	border: 1px solid var(--ocb-border);
	animation: ocb-panel-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#oncostore-chatbot-root .ocb-panel[hidden] { display: none; }
@keyframes ocb-panel-in {
	from { opacity: 0; transform: translateY(20px) scale(0.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

#oncostore-chatbot-root .ocb-header {
	background: var(--ocb-card); color: var(--ocb-text);
	padding: 14px 16px;
	display: flex; justify-content: space-between; align-items: center;
	flex-shrink: 0;
	border-bottom: 1px solid var(--ocb-border-light);
}
#oncostore-chatbot-root .ocb-header-left { display: flex; align-items: center; gap: 12px; }
#oncostore-chatbot-root .ocb-avatar {
	width: 36px; height: 36px; border-radius: 50%;
	background: linear-gradient(135deg, var(--ocb-primary) 0%, var(--ocb-primary-light) 100%);
	color: #fff; font-weight: 700; font-size: 14px;
	display: flex; align-items: center; justify-content: center;
}
#oncostore-chatbot-root .ocb-header-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.2; }
#oncostore-chatbot-root .ocb-header-name { font-weight: 600; font-size: 14px; color: var(--ocb-text); }
#oncostore-chatbot-root .ocb-header-status { font-size: 11.5px; color: var(--ocb-muted); display: flex; align-items: center; gap: 5px; }
#oncostore-chatbot-root .ocb-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ocb-success); }
#oncostore-chatbot-root .ocb-header-actions { display: flex; gap: 4px; }
#oncostore-chatbot-root .ocb-icon-btn {
	background: transparent; border: none; color: var(--ocb-muted);
	cursor: pointer; padding: 0;
	width: 30px; height: 30px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	transition: all 0.15s;
}
#oncostore-chatbot-root .ocb-icon-btn:hover { background: var(--ocb-bg); color: var(--ocb-text); }

#oncostore-chatbot-root .ocb-body {
	flex: 1 1 auto; overflow-y: auto;
	background: var(--ocb-card);
	display: flex; flex-direction: column;
}
#oncostore-chatbot-root .ocb-body-empty { padding: 0; }
#oncostore-chatbot-root .ocb-body-active { padding: 14px 16px 18px; background: var(--ocb-bg); gap: 8px; }
#oncostore-chatbot-root .ocb-body::-webkit-scrollbar { width: 6px; }
#oncostore-chatbot-root .ocb-body::-webkit-scrollbar-thumb { background: #D0D5DD; border-radius: 3px; }

#oncostore-chatbot-root .ocb-welcome { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 24px 28px; }
#oncostore-chatbot-root .ocb-welcome-avatar {
	width: 64px; height: 64px; border-radius: 50%;
	background: linear-gradient(135deg, var(--ocb-primary) 0%, var(--ocb-primary-light) 100%);
	color: #fff; display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 24px;
	box-shadow: 0 6px 16px rgba(31,78,121,0.25);
	margin-bottom: 18px;
}
#oncostore-chatbot-root .ocb-welcome-title { font-size: 20px; font-weight: 700; color: var(--ocb-text); margin: 0 0 6px; display: flex; align-items: center; gap: 6px; }
#oncostore-chatbot-root .ocb-wave { display: inline-block; animation: ocb-wave 2s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes ocb-wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
#oncostore-chatbot-root .ocb-welcome-subtitle { font-size: 14px; color: var(--ocb-muted); margin: 0; line-height: 1.45; }
#oncostore-chatbot-root .ocb-spacer { flex: 1 1 auto; min-height: 12px; }

#oncostore-chatbot-root .ocb-quick-options { display: flex; flex-direction: column; border-top: 1px solid var(--ocb-border-light); margin-top: 12px; }
#oncostore-chatbot-root .ocb-option {
	display: flex; align-items: center; gap: 14px;
	padding: 16px 20px;
	border: none; border-bottom: 1px solid var(--ocb-border-light);
	background: var(--ocb-card); cursor: pointer;
	font-family: inherit; font-size: 14px;
	color: var(--ocb-text); text-align: left;
	transition: background 0.15s; width: 100%;
}
#oncostore-chatbot-root .ocb-option:last-child { border-bottom: none; }
#oncostore-chatbot-root .ocb-option:hover { background: var(--ocb-bg); }
#oncostore-chatbot-root .ocb-option-icon { color: var(--ocb-primary); flex-shrink: 0; }
#oncostore-chatbot-root .ocb-option-text { flex: 1; font-weight: 500; }

#oncostore-chatbot-root .ocb-date-sep { align-self: center; font-size: 11px; color: var(--ocb-muted); padding: 4px 12px; margin: 4px 0 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

#oncostore-chatbot-root .ocb-bot-group {
	display: flex; gap: 8px; align-items: flex-end;
	align-self: flex-start; max-width: 92%;
	animation: ocb-msg-in 0.22s ease-out;
}
@keyframes ocb-msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
#oncostore-chatbot-root .ocb-bot-avatar {
	width: 28px; height: 28px; border-radius: 50%;
	background: linear-gradient(135deg, var(--ocb-primary) 0%, var(--ocb-primary-light) 100%);
	color: #fff; display: flex; align-items: center; justify-content: center;
	flex-shrink: 0; font-weight: 700; font-size: 12px;
	box-shadow: var(--ocb-shadow-sm);
}
#oncostore-chatbot-root .ocb-bot-bubbles { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
#oncostore-chatbot-root .ocb-bot-name { font-size: 11px; color: var(--ocb-muted); margin-left: 12px; font-weight: 500; }

#oncostore-chatbot-root .ocb-msg {
	padding: 10px 14px; border-radius: 16px;
	word-wrap: break-word; white-space: pre-wrap;
	font-size: 14px;
	animation: ocb-msg-in 0.22s ease-out;
	max-width: 100%;
}
#oncostore-chatbot-root .ocb-bot {
	background: var(--ocb-card); color: var(--ocb-text);
	align-self: flex-start;
	border: 1px solid var(--ocb-border);
	border-bottom-left-radius: 4px;
	box-shadow: var(--ocb-shadow-sm);
}
#oncostore-chatbot-root .ocb-user {
	background: linear-gradient(135deg, var(--ocb-primary) 0%, var(--ocb-primary-light) 100%);
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
	max-width: 82%;
}
#oncostore-chatbot-root .ocb-msg a { color: inherit; text-decoration: underline; }
#oncostore-chatbot-root .ocb-user a { color: #fff; }

/* Catalog product cards (multiple cards from availability/recommendation) */
#oncostore-chatbot-root .ocb-products { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 4px 36px; animation: ocb-msg-in 0.3s ease-out; }
#oncostore-chatbot-root .ocb-product {
	display: flex; align-items: center; gap: 12px;
	background: var(--ocb-card);
	border: 1px solid var(--ocb-border);
	border-radius: 14px; padding: 10px 12px;
	text-decoration: none; color: var(--ocb-text);
	box-shadow: var(--ocb-shadow-sm);
	transition: all 0.18s ease; cursor: pointer; max-width: 96%;
}
#oncostore-chatbot-root .ocb-product:hover { border-color: var(--ocb-primary); box-shadow: 0 6px 18px rgba(31,78,121,0.15); transform: translateY(-1px); }
#oncostore-chatbot-root .ocb-product-img { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 10px; background: var(--ocb-bg); display: flex; align-items: center; justify-content: center; overflow: hidden; color: #94A3B8; }
#oncostore-chatbot-root .ocb-product-img img { width: 100%; height: 100%; object-fit: cover; }
#oncostore-chatbot-root .ocb-product-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
#oncostore-chatbot-root .ocb-product-name { font-weight: 600; font-size: 13.5px; color: var(--ocb-text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
#oncostore-chatbot-root .ocb-product-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#oncostore-chatbot-root .ocb-product-price { font-weight: 700; font-size: 13px; color: var(--ocb-primary); white-space: nowrap; }
#oncostore-chatbot-root .ocb-product-old-price { font-weight: 500; color: var(--ocb-muted); text-decoration: line-through; margin-left: 4px; font-size: 12px; }
#oncostore-chatbot-root .ocb-product-qty { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; color: var(--ocb-primary); background: rgba(31,78,121,0.08); padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
#oncostore-chatbot-root .ocb-product-stock { font-size: 11.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
#oncostore-chatbot-root .ocb-product-stock.in { color: var(--ocb-success); }
#oncostore-chatbot-root .ocb-product-stock.out { color: #DC2626; }
#oncostore-chatbot-root .ocb-product-stock::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
#oncostore-chatbot-root .ocb-product-arrow { flex: 0 0 auto; color: #CBD5E1; transition: all 0.18s; }
#oncostore-chatbot-root .ocb-product:hover .ocb-product-arrow { color: var(--ocb-primary); transform: translateX(2px); }

/* Consolidated order card */
#oncostore-chatbot-root .ocb-order {
	background: var(--ocb-card);
	border: 1px solid var(--ocb-border);
	border-radius: 14px;
	margin: 4px 0 4px 36px;
	max-width: 96%;
	box-shadow: var(--ocb-shadow-sm);
	animation: ocb-msg-in 0.3s ease-out;
}
#oncostore-chatbot-root .ocb-order-header {
	display: flex; justify-content: space-between; align-items: center;
	padding: 12px 14px;
	background: var(--ocb-bg);
	border-bottom: 1px solid var(--ocb-border-light);
}
#oncostore-chatbot-root .ocb-order-id { font-weight: 700; font-size: 13.5px; color: var(--ocb-text); }
#oncostore-chatbot-root .ocb-order-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 11px; font-weight: 600;
	background: rgba(31,78,121,0.10);
	color: var(--ocb-primary);
	text-transform: capitalize;
}
#oncostore-chatbot-root .ocb-order-badge--completed,
#oncostore-chatbot-root .ocb-order-badge--processing { background: rgba(16,185,129,0.12); color: var(--ocb-success); }
#oncostore-chatbot-root .ocb-order-badge--cancelled,
#oncostore-chatbot-root .ocb-order-badge--failed,
#oncostore-chatbot-root .ocb-order-badge--refunded { background: rgba(220,38,38,0.10); color: #DC2626; }
#oncostore-chatbot-root .ocb-order-badge--onhold,
#oncostore-chatbot-root .ocb-order-badge--pending { background: rgba(245,158,11,0.12); color: #B45309; }

#oncostore-chatbot-root .ocb-order-items { display: flex; flex-direction: column; }
#oncostore-chatbot-root .ocb-order-item {
	display: flex; align-items: center; gap: 10px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--ocb-border-light);
	text-decoration: none; color: var(--ocb-text);
	transition: background 0.15s;
}
#oncostore-chatbot-root .ocb-order-item:last-child { border-bottom: none; }
#oncostore-chatbot-root a.ocb-order-item:hover { background: var(--ocb-bg); }
#oncostore-chatbot-root .ocb-order-item-img {
	flex: 0 0 44px; width: 44px; height: 44px;
	border-radius: 8px; background: var(--ocb-bg);
	display: flex; align-items: center; justify-content: center;
	overflow: hidden; color: #94A3B8;
}
#oncostore-chatbot-root .ocb-order-item-img img { width: 100%; height: 100%; object-fit: cover; }
#oncostore-chatbot-root .ocb-order-item-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#oncostore-chatbot-root .ocb-order-item-name { font-weight: 600; font-size: 13px; color: var(--ocb-text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
#oncostore-chatbot-root .ocb-order-item-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#oncostore-chatbot-root .ocb-order-item-price { font-size: 12px; font-weight: 600; color: var(--ocb-primary); white-space: nowrap; }
#oncostore-chatbot-root .ocb-order-item-qty { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 600; color: var(--ocb-muted); background: var(--ocb-bg); padding: 1px 7px; border-radius: 9px; white-space: nowrap; }

#oncostore-chatbot-root .ocb-order-footer { padding: 10px 14px 12px; background: var(--ocb-bg); border-top: 1px solid var(--ocb-border-light); }
#oncostore-chatbot-root .ocb-order-row { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; padding: 3px 0; color: var(--ocb-muted); }
#oncostore-chatbot-root .ocb-order-row span { color: var(--ocb-muted); }
#oncostore-chatbot-root .ocb-order-row--total { font-size: 14px; margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--ocb-border); }
#oncostore-chatbot-root .ocb-order-row--total span { color: var(--ocb-text); font-weight: 600; }
#oncostore-chatbot-root .ocb-order-row--total strong { font-weight: 700; color: var(--ocb-primary); font-size: 15px; }

#oncostore-chatbot-root .ocb-typing { display: flex; gap: 4px; align-items: center; padding: 12px 14px; background: var(--ocb-card); align-self: flex-start; border: 1px solid var(--ocb-border); border-radius: 16px; border-bottom-left-radius: 4px; }
#oncostore-chatbot-root .ocb-typing span { width: 7px; height: 7px; background: #94A3B8; border-radius: 50%; animation: ocb-blink 1.2s infinite; }
#oncostore-chatbot-root .ocb-typing span:nth-child(2) { animation-delay: 0.2s; }
#oncostore-chatbot-root .ocb-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ocb-blink { 0%,60%,100% { opacity: 0.3; } 30% { opacity: 1; } }

#oncostore-chatbot-root .ocb-input { border-top: 1px solid var(--ocb-border); padding: 12px; display: flex; gap: 8px; background: var(--ocb-card); flex-shrink: 0; }
#oncostore-chatbot-root .ocb-text { flex: 1 1 auto; padding: 11px 16px; border: 1.5px solid var(--ocb-border); border-radius: 22px; font-size: 14px; outline: none; font-family: inherit; color: var(--ocb-text); background: var(--ocb-card); transition: all 0.15s; }
#oncostore-chatbot-root .ocb-text:focus { border-color: var(--ocb-primary); box-shadow: 0 0 0 3px rgba(31,78,121,0.12); }
#oncostore-chatbot-root .ocb-send { background: linear-gradient(135deg, var(--ocb-primary) 0%, var(--ocb-primary-light) 100%); color: #fff; border: none; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; transition: all 0.15s; box-shadow: 0 2px 8px rgba(31,78,121,0.25); }
#oncostore-chatbot-root .ocb-send:hover { transform: scale(1.06); }

#oncostore-chatbot-root .ocb-footer { text-align: center; font-size: 11px; color: var(--ocb-muted); padding: 6px 12px 8px; background: var(--ocb-card); border-top: 1px solid var(--ocb-border-light); flex-shrink: 0; }

@media (max-width: 480px) {
	#oncostore-chatbot-root .ocb-panel { width: 100%; height: 100%; max-height: 100%; bottom: 0; right: 0; border-radius: 0; border: none; }
	#oncostore-chatbot-root .ocb-launcher { bottom: 16px; right: 16px; }
}
