/**
 * BeU AI Concierge - Front-End Luxury Styling
 * Matches warm organic luxury aesthetic (Ivory #FAF9F7, Charcoal #1A1A1A, Rose #C70072).
 */

.beu-concierge-container {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 99998;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Floating Teaser Balloon - Hidden for Clean Minimalist Look */
.beu-concierge-teaser {
	display: none !important;
}

/* ==========================================================================
   Floating Action Launcher Button - Compact Luxury Icon FAB
   ========================================================================== */
.beu-concierge-launcher {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #1A1A1A;
	color: #FAF8F5;
	border: 1px solid rgba(255, 255, 255, 0.18);
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
	cursor: pointer;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.22s ease, border-color 0.2s ease;
	outline: none;
	user-select: none;
	box-sizing: border-box;
}

.beu-concierge-launcher:hover {
	background: #C70072;
	border-color: #C70072;
	box-shadow: 0 8px 26px rgba(199, 0, 114, 0.38);
	transform: translateY(-2px) scale(1.05);
}

.beu-concierge-launcher:active {
	transform: translateY(0) scale(0.96);
}

.beu-concierge-launcher.beu-is-open {
	background: #262422;
	border-color: rgba(255, 255, 255, 0.25);
}

.beu-concierge-launcher.beu-is-open:hover {
	background: #C70072;
	border-color: #C70072;
}

.beu-fab-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #FAF8F5;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.beu-online-beacon {
	position: absolute;
	top: 1px;
	right: 1px;
	width: 10px;
	height: 10px;
	background: #10B981;
	border: 2px solid #1A1A1A;
	border-radius: 50%;
	box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
	pointer-events: none;
	transition: border-color 0.2s ease;
}

.beu-concierge-launcher:hover .beu-online-beacon {
	border-color: #C70072;
}


/* ==========================================================================
   Slide-Out Chat Drawer (Popup Window)
   ========================================================================== */
.beu-concierge-drawer {
	position: fixed;
	bottom: 84px;
	right: 24px;
	width: 384px;
	max-width: calc(100vw - 32px);
	height: 580px;
	max-height: calc(100vh - 104px);
	background: #FAF9F7;
	border: 1px solid #E8E2D6;
	border-radius: 20px;
	box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.22), 0 0 1px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 99999;
	animation: beuSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

@keyframes beuSlideUp {
	from {
		opacity: 0;
		transform: translateY(16px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Header */
.beu-drawer-header {
	background: #1A1A1A;
	color: #FFF;
	padding: 13px 18px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.beu-header-profile {
	display: flex;
	align-items: center;
	gap: 11px;
}

.beu-avatar-wrap {
	position: relative;
	width: 38px;
	height: 38px;
	flex-shrink: 0;
}

.beu-avatar-wrap img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 1.5px solid rgba(255, 255, 255, 0.5);
	display: block;
}

.beu-online-dot {
	position: absolute;
	bottom: -1px;
	right: -1px;
	width: 10px;
	height: 10px;
	background: #10B981;
	border: 2px solid #1A1A1A;
	border-radius: 50%;
	box-shadow: 0 0 5px rgba(16, 185, 129, 0.8);
}

.beu-profile-name-row {
	display: flex;
	align-items: center;
	gap: 5px;
}

.beu-profile-name {
	margin: 0;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	color: #FFFFFF;
	letter-spacing: 0.01em;
	line-height: 1.2;
}

.beu-verified-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.beu-profile-tagline {
	font-size: 11px;
	color: #BDB7AB;
	letter-spacing: 0.01em;
	line-height: 1.3;
	margin-top: 2px;
	display: block;
}

.beu-header-controls {
	display: flex;
	align-items: center;
	gap: 6px;
}

.beu-ctrl-btn {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #FAF9F7;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	outline: none;
	padding: 0;
}

.beu-ctrl-btn:hover {
	background: rgba(255, 255, 255, 0.22);
	color: #FFF;
	transform: scale(1.06);
}

.beu-ctrl-btn .material-symbols-outlined {
	font-size: 17px;
}

/* ==========================================================================
   Chat Messages Scroll Area
   ========================================================================== */
.beu-drawer-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #FAF9F7;
	scroll-behavior: smooth;
}

.beu-drawer-messages::-webkit-scrollbar {
	width: 5px;
}
.beu-drawer-messages::-webkit-scrollbar-thumb {
	background: #DCD4C6;
	border-radius: 9999px;
}

.beu-msg {
	display: flex;
	gap: 8px;
	max-width: 88%;
	animation: beuFadeIn 0.22s ease-out;
}

@keyframes beuFadeIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.beu-msg-bot {
	align-self: flex-start;
}

.beu-msg-user {
	align-self: flex-end;
	flex-direction: row-reverse;
}

.beu-msg-avatar {
	flex-shrink: 0;
}

.beu-msg-avatar img {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	object-fit: cover;
	margin-top: 2px;
	border: 1px solid #E2DCD0;
	display: block;
}

.beu-msg-bubble {
	padding: 11px 15px;
	font-size: 13px;
	line-height: 1.55;
	word-break: break-word;
}

.beu-msg-bot .beu-msg-bubble {
	background: #FFFFFF;
	color: #1F1E1D;
	border: 1px solid #ECE7DE;
	border-radius: 16px;
	border-top-left-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.beu-msg-user .beu-msg-bubble {
	background: #1A1A1A;
	color: #FAF8F5;
	border-radius: 16px;
	border-top-right-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.beu-msg-text p {
	margin: 0 0 8px 0;
}
.beu-msg-text p:last-child {
	margin-bottom: 0;
}
.beu-msg-text a {
	color: #C70072;
	font-weight: 600;
	text-decoration: underline;
}

/* Quick Prompt Suggestion Chips */
.beu-prompt-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed #ECE7DE;
}

.beu-prompt-chip {
	background: #FAF9F7;
	border: 1px solid #DDD6C8;
	color: #2A2825;
	padding: 5px 12px;
	border-radius: 9999px;
	font-size: 11.5px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.18s ease;
	line-height: 1.3;
}

.beu-prompt-chip:hover {
	background: #1A1A1A;
	color: #FFFFFF;
	border-color: #1A1A1A;
	transform: translateY(-1px);
}

/* Product Cards Grid inside chat */
.beu-cards-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
	margin-top: 10px;
	width: 100%;
}

.beu-chat-prod-card {
	background: #FFF;
	border: 1px solid #E5DFD3;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.beu-chat-prod-card:hover {
	border-color: #1A1A1A;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.beu-chat-prod-img {
	aspect-ratio: 1 / 1;
	background: #FAF9F7;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
}

.beu-chat-prod-img img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.beu-chat-prod-body {
	padding: 8px 10px;
}

.beu-chat-prod-title {
	font-size: 11.5px;
	font-weight: 600;
	color: #1A1A1A;
	margin: 0 0 4px 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
	text-decoration: none;
}

.beu-chat-prod-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 4px;
}

.beu-chat-prod-price {
	font-weight: 700;
	font-size: 12px;
	color: #1A1A1A;
}

.beu-chat-add-bag-btn {
	background: #1C1B1A;
	color: #FFF;
	border: none;
	padding: 4px 9px;
	border-radius: 999px;
	font-size: 10.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.beu-chat-add-bag-btn:hover {
	background: #C70072;
}

/* B2B Inline Form inside chat */
.beu-b2b-form-card {
	background: #FFF;
	border: 1px solid #E5DFD3;
	border-radius: 14px;
	padding: 14px;
	margin-top: 10px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.beu-b2b-form-card h4 {
	margin: 0 0 10px 0;
	font-size: 13px;
	font-weight: 700;
	color: #1A1A1A;
	display: flex;
	align-items: center;
	gap: 6px;
}

.beu-b2b-field {
	margin-bottom: 8px;
}

.beu-b2b-field label {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	color: #555049;
	margin-bottom: 3px;
}

.beu-b2b-field input,
.beu-b2b-field textarea {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid #DDD6C8;
	border-radius: 8px;
	font-size: 12px;
	box-sizing: border-box;
	outline: none;
	background: #FAF9F7;
	color: #1A1A1A;
}

.beu-b2b-field input:focus,
.beu-b2b-field textarea:focus {
	border-color: #C70072;
	background: #FFF;
}

.beu-b2b-submit-btn {
	width: 100%;
	padding: 9px;
	background: #1C1B1A;
	color: #FFF;
	border: none;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s;
	margin-top: 6px;
}

.beu-b2b-submit-btn:hover {
	background: #C70072;
}

/* Typing Indicator */
.beu-typing-indicator {
	padding: 10px 18px;
	background: #FAF9F7;
	display: flex;
	align-items: center;
	gap: 6px;
}

.beu-typing-dots {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.beu-typing-dots span {
	width: 6px;
	height: 6px;
	background: #C70072;
	border-radius: 50%;
	display: inline-block;
	animation: beuPulse 1.2s infinite ease-in-out;
}

.beu-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.beu-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

.beu-typing-label {
	font-size: 11px;
	color: #888;
	margin-left: 4px;
}

@keyframes beuPulse {
	0%, 100% { transform: scale(0.6); opacity: 0.4; }
	50% { transform: scale(1.1); opacity: 1; }
}

/* ==========================================================================
   Footer Composer
   ========================================================================== */
.beu-drawer-footer {
	background: #FFFFFF;
	border-top: 1px solid #ECE7DE;
	padding: 11px 14px 9px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.beu-chat-form {
	display: flex;
	align-items: center;
	gap: 8px;
}

.beu-chat-input {
	flex: 1;
	border: 1px solid #DDD6C8;
	padding: 9px 14px;
	border-radius: 9999px;
	font-size: 12.5px;
	outline: none;
	background: #FAF9F7;
	color: #1A1A1A;
	transition: all 0.2s ease;
}

.beu-chat-input:focus {
	border-color: #1A1A1A;
	background: #FFFFFF;
	box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.05);
}

.beu-send-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #1A1A1A;
	color: #FFFFFF;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: all 0.2s ease;
	outline: none;
	padding: 0;
}

.beu-send-btn:hover {
	background: #C70072;
	transform: scale(1.05);
}

.beu-drawer-legal {
	font-size: 9.5px;
	color: #8C867E;
	text-align: center;
	letter-spacing: 0.02em;
}

/* ==========================================================================
   Responsive Mobile Fullscreen Sheet
   ========================================================================== */
@media (max-width: 640px) {
	.beu-concierge-container {
		bottom: 16px;
		right: 16px;
	}
	.beu-concierge-drawer {
		bottom: 0;
		right: 0;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		max-height: 100vh;
		border-radius: 0;
	}
}
