/* ==========================================================================
   UCDREAMS FLOATING HUB, WHATSAPP, QUICK ENQUIRY & AI CHATBOT STYLES
   ========================================================================== */

:root {
	--ucd-hub-red: #C5453E;
	--ucd-hub-red-hover: #D6524B;
	--ucd-hub-wa-green: #25D366;
	--ucd-hub-wa-green-hover: #20BA5A;
	--ucd-hub-dark-bg: #121316;
	--ucd-hub-card-bg: #1A1C23;
	--ucd-hub-border: rgba(255, 255, 255, 0.12);
	--ucd-hub-text: #F1F5F9;
	--ucd-hub-text-muted: #94A3B8;
	--ucd-hub-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
	--ucd-hub-card-bg: #FFFFFF;
	--ucd-hub-border: rgba(0, 0, 0, 0.1);
	--ucd-hub-text: #0F172A;
	--ucd-hub-text-muted: #64748B;
	--ucd-hub-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* ==================== FLOATING LAUNCHER CONTAINER ==================== */
.ucd-floating-hub {
	position: fixed;
	bottom: 26px;
	z-index: 99990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ucd-floating-hub.ucd-pos-right {
	right: 26px;
	align-items: flex-end;
}

.ucd-floating-hub.ucd-pos-left {
	left: 26px;
	align-items: flex-start;
}

/* Tooltip / Greeting Bubble */
.ucd-hub-greeting-bubble {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--ucd-hub-card-bg);
	color: var(--ucd-hub-text);
	border: 1px solid var(--ucd-hub-border);
	padding: 10px 16px;
	border-radius: 9999px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
	margin-bottom: 12px;
	font-size: 13.5px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	animation: ucdFadeInUp 0.4s ease forwards;
	backdrop-filter: blur(12px);
}

.ucd-hub-greeting-bubble:hover {
	transform: translateY(-2px);
	border-color: var(--ucd-hub-red);
}

.ucd-greeting-close {
	background: none;
	border: none;
	color: var(--ucd-hub-text-muted);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.ucd-greeting-close:hover {
	opacity: 1;
	color: var(--ucd-hub-red);
}

/* Main FAB Button */
.ucd-hub-fab {
	position: relative;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: linear-gradient(135deg, #C5453E 0%, #A83630 100%);
	color: #FFFFFF;
	border: none;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(197, 69, 62, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
	outline: none;
	user-select: none;
}

.ucd-hub-fab:hover {
	transform: scale(1.08);
	box-shadow: 0 10px 28px rgba(197, 69, 62, 0.6);
}

.ucd-hub-fab:active {
	transform: scale(0.95);
}

.ucd-fab-icon-default,
.ucd-fab-icon-close {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.ucd-fab-icon-close {
	opacity: 0;
	transform: rotate(-90deg) scale(0.8);
}

.ucd-floating-hub.active .ucd-fab-icon-default {
	opacity: 0;
	transform: rotate(90deg) scale(0.8);
}

.ucd-floating-hub.active .ucd-fab-icon-close {
	opacity: 1;
	transform: rotate(0) scale(1);
}

/* Pulse animation on FAB */
.ucd-fab-pulse {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 2px solid #C5453E;
	animation: ucdPulseRing 2.4s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
	pointer-events: none;
	opacity: 0.8;
}

.ucd-floating-hub.active .ucd-fab-pulse {
	display: none;
}

.ucd-floating-hub.active .ucd-hub-greeting-bubble {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Expandable Menu Quick Actions */
.ucd-hub-menu {
	position: absolute;
	bottom: 72px;
	right: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end !important;
	gap: 12px;
	margin-bottom: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px) scale(0.92);
	transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
	pointer-events: none;
	z-index: 99992;
}

.ucd-floating-hub.ucd-pos-left .ucd-hub-menu {
	right: auto;
	left: 0;
	align-items: flex-start !important;
}

.ucd-floating-hub.active .ucd-hub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.ucd-hub-item {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	text-decoration: none;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: inherit;
	transition: transform 0.2s ease;
	width: auto;
}

.ucd-floating-hub.ucd-pos-left .ucd-hub-item {
	flex-direction: row-reverse;
}

.ucd-hub-item:hover {
	transform: translateX(-3px);
}

.ucd-floating-hub.ucd-pos-left .ucd-hub-item:hover {
	transform: translateX(3px);
}

.ucd-hub-item-label {
	background: var(--ucd-hub-card-bg);
	color: var(--ucd-hub-text);
	border: 1px solid var(--ucd-hub-border);
	padding: 6px 12px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
	white-space: nowrap;
	backdrop-filter: blur(8px);
}

.ucd-hub-item-icon {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #FFFFFF;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s;
	flex-shrink: 0;
	margin-right: 7px;
}

.ucd-floating-hub.ucd-pos-left .ucd-hub-item-icon {
	margin-right: 0;
	margin-left: 7px;
}

.ucd-hub-item:hover .ucd-hub-item-icon {
	transform: scale(1.1);
}

.wa-bg {
	background: #25D366;
}

.enquiry-bg {
	background: #3B82F6;
}

.bot-bg {
	background: linear-gradient(135deg, #C5453E 0%, #8E24AA 100%);
}

/* ==================== POPUP MODAL: QUICK ENQUIRY ==================== */
.ucd-enquiry-modal-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(8px);
	z-index: 99995;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ucd-enquiry-modal-backdrop.open {
	opacity: 1;
	visibility: visible;
}

.ucd-enquiry-modal-dialog {
	width: 100%;
	max-width: 540px;
	max-height: 90vh;
	overflow-y: auto;
	background: var(--ucd-hub-card-bg);
	border: 1px solid var(--ucd-hub-border);
	border-radius: 16px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
	color: var(--ucd-hub-text);
	transform: translateY(30px) scale(0.95);
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ucd-enquiry-modal-backdrop.open .ucd-enquiry-modal-dialog {
	transform: translateY(0) scale(1);
}

.ucd-enquiry-modal-header {
	position: relative;
	padding: 24px 24px 16px;
	border-bottom: 1px solid var(--ucd-hub-border);
}

.ucd-enquiry-header-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(197, 69, 62, 0.12);
	color: #FF8580;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 4px 10px;
	border-radius: 9999px;
	margin-bottom: 10px;
}

.ucd-badge-dot {
	width: 7px;
	height: 7px;
	background: #FF8580;
	border-radius: 50%;
}

.ucd-enquiry-title {
	font-size: 22px;
	font-weight: 800;
	margin: 0 0 6px 0;
	color: var(--ucd-hub-text);
	letter-spacing: -0.02em;
}

.ucd-enquiry-subtitle {
	font-size: 13.5px;
	color: var(--ucd-hub-text-muted);
	margin: 0;
	line-height: 1.45;
}

.ucd-modal-close-btn {
	position: absolute;
	top: 20px;
	right: 20px;
	background: none;
	border: none;
	color: var(--ucd-hub-text-muted);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 4px;
	transition: color 0.2s;
}

.ucd-modal-close-btn:hover {
	color: var(--ucd-hub-red);
}

.ucd-enquiry-modal-body {
	padding: 24px;
}

.ucd-form-row {
	margin-bottom: 16px;
}

.ucd-form-row.ucd-2col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.ucd-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ucd-form-group label {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ucd-hub-text);
}

.ucd-form-group .req {
	color: var(--ucd-hub-red);
}

.ucd-form-group input,
.ucd-form-group select,
.ucd-form-group textarea {
	width: 100%;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--ucd-hub-border);
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 16px !important;
	color: var(--ucd-hub-text);
	font-family: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

[data-theme="light"] .ucd-form-group input,
[data-theme="light"] .ucd-form-group select,
[data-theme="light"] .ucd-form-group textarea {
	background: #F8FAFC;
}

.ucd-form-group input:focus,
.ucd-form-group select:focus,
.ucd-form-group textarea:focus {
	outline: none;
	border-color: var(--ucd-hub-red);
	box-shadow: 0 0 0 3px rgba(197, 69, 62, 0.18);
}

.ucd-form-feedback {
	margin-top: 12px;
	font-size: 13.5px;
	line-height: 1.4;
	display: none;
	padding: 10px 14px;
	border-radius: 8px;
}

.ucd-form-feedback.success {
	display: block;
	background: rgba(34, 197, 94, 0.12);
	color: #22C55E;
	border: 1px solid rgba(34, 197, 94, 0.25);
}

.ucd-form-feedback.error {
	display: block;
	background: rgba(239, 68, 68, 0.12);
	color: #EF4444;
	border: 1px solid rgba(239, 68, 68, 0.25);
}

.ucd-modal-footer {
	margin-top: 20px;
}

.ucd-enquiry-submit-btn {
	width: 100%;
	background: #C5453E;
	color: #FFFFFF;
	border: none;
	padding: 13px 20px;
	border-radius: 9999px;
	font-size: 14.5px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background 0.2s, transform 0.15s;
}

.ucd-enquiry-submit-btn:hover {
	background: #D6524B;
	transform: translateY(-1px);
}

.ucd-enquiry-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ==================== AI CHATBOT WINDOW ==================== */
.ucd-chatbot-window {
	position: fixed;
	bottom: 96px;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 540px;
	max-height: calc(100vh - 120px);
	background: var(--ucd-hub-card-bg);
	border: 1px solid var(--ucd-hub-border);
	border-radius: 18px;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
	z-index: 99992;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(20px) scale(0.95);
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	backdrop-filter: blur(16px);
}

.ucd-floating-hub.ucd-pos-right ~ .ucd-chatbot-window,
.ucd-chatbot-window {
	right: 26px;
}

.ucd-floating-hub.ucd-pos-left ~ .ucd-chatbot-window {
	left: 26px;
	right: auto;
}

.ucd-chatbot-window.open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

/* Chatbot Header */
.ucd-bot-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	background: rgba(197, 69, 62, 0.08);
	border-bottom: 1px solid var(--ucd-hub-border);
}

.ucd-bot-header-avatar {
	position: relative;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	overflow: visible;
}

.ucd-bot-header-avatar img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 50%;
	background: #FFFFFF;
	padding: 2px;
}

.ucd-bot-status-indicator {
	position: absolute;
	bottom: -1px;
	right: -1px;
	width: 10px;
	height: 10px;
	background: #22C55E;
	border: 2px solid var(--ucd-hub-card-bg);
	border-radius: 50%;
}

.ucd-bot-header-info {
	flex: 1;
}

.ucd-bot-title {
	font-size: 15px;
	font-weight: 700;
	color: var(--ucd-hub-text);
	margin: 0;
}

.ucd-bot-subtitle {
	font-size: 11.5px;
	color: var(--ucd-hub-text-muted);
}

.ucd-bot-header-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ucd-bot-action-btn {
	background: none;
	border: none;
	color: var(--ucd-hub-text-muted);
	font-size: 20px;
	cursor: pointer;
	padding: 4px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s, background 0.2s;
}

.ucd-bot-action-btn:hover {
	color: var(--ucd-hub-text);
	background: rgba(255, 255, 255, 0.08);
}

/* Chatbot Messages List */
.ucd-bot-messages {
	flex: 1 1 auto !important;
	min-height: 0 !important;
	overflow-y: auto !important;
	overflow-x: hidden !important;
	overscroll-behavior: contain !important;
	-webkit-overflow-scrolling: touch !important;
	touch-action: pan-y !important;
	padding: 16px !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 14px !important;
	scrollbar-width: thin !important;
	scrollbar-color: rgba(197, 69, 62, 0.45) transparent !important;
}

.ucd-bot-messages::-webkit-scrollbar {
	width: 6px !important;
	display: block !important;
}

.ucd-bot-messages::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.05) !important;
	border-radius: 4px !important;
}

[data-theme="dark"] .ucd-bot-messages::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.04) !important;
}

.ucd-bot-messages::-webkit-scrollbar-thumb {
	background: rgba(197, 69, 62, 0.45) !important;
	border-radius: 4px !important;
}

.ucd-bot-messages::-webkit-scrollbar-thumb:hover {
	background: rgba(197, 69, 62, 0.8) !important;
}

.ucd-bot-msg-row {
	display: flex;
	gap: 10px;
	max-width: 88%;
}

.ucd-bot-msg-row.ucd-bot-incoming {
	align-self: flex-start;
}

.ucd-bot-msg-row.ucd-bot-outgoing {
	align-self: flex-end;
	flex-direction: row-reverse;
}

.ucd-msg-avatar img {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #FFFFFF;
	padding: 1px;
}

.ucd-msg-bubble {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--ucd-hub-border);
	padding: 10px 14px;
	border-radius: 14px;
	color: var(--ucd-hub-text);
	font-size: 13.5px;
	line-height: 1.5;
	position: relative;
	word-break: break-word;
}

[data-theme="light"] .ucd-bot-incoming .ucd-msg-bubble {
	background: #F1F5F9;
}

.ucd-bot-outgoing .ucd-msg-bubble {
	background: #C5453E;
	color: #FFFFFF;
	border-color: #C5453E;
}

.ucd-msg-text p {
	margin: 0 0 6px 0;
}

.ucd-msg-text p:last-child {
	margin-bottom: 0;
}

.ucd-msg-text a {
	color: #60A5FA;
	text-decoration: underline;
}

.ucd-bot-outgoing .ucd-msg-text a {
	color: #FFFFFF;
}

.ucd-msg-time {
	display: block;
	font-size: 10px;
	color: var(--ucd-hub-text-muted);
	margin-top: 4px;
	text-align: right;
}

.ucd-bot-outgoing .ucd-msg-time {
	color: rgba(255, 255, 255, 0.7);
}

/* Typing Indicator Animation */
.ucd-typing-indicator {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 8px 12px;
}

.ucd-typing-dot {
	width: 6px;
	height: 6px;
	background: var(--ucd-hub-text-muted);
	border-radius: 50%;
	animation: ucdBounce 1.4s infinite ease-in-out both;
}

.ucd-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ucd-typing-dot:nth-child(2) { animation-delay: -0.16s; }

/* Quick Suggested Prompt Pills */
.ucd-bot-quick-prompts {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding: 6px 14px 10px;
	white-space: nowrap;
	scrollbar-width: none;
}

.ucd-bot-quick-prompts::-webkit-scrollbar {
	display: none;
}

.ucd-prompt-pill {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	background: rgba(255, 255, 255, 0.06) !important;
	border: 1px solid var(--ucd-hub-border) !important;
	color: var(--ucd-hub-text) !important;
	padding: 6px 12px !important;
	border-radius: 9999px !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	cursor: pointer !important;
	white-space: nowrap !important;
	transition: all 0.2s ease !important;
}

.ucd-prompt-pill svg {
	flex-shrink: 0 !important;
	stroke: var(--ucd-hub-red, #C5453E) !important;
	transition: transform 0.2s ease !important;
}

.ucd-prompt-pill:hover svg {
	transform: scale(1.15) !important;
}
	cursor: pointer;
	transition: all 0.2s;
	flex-shrink: 0;
}

.ucd-prompt-pill:hover {
	background: rgba(197, 69, 62, 0.15);
	border-color: var(--ucd-hub-red);
	color: #FF8580;
}

/* Chat Input Footer */
.ucd-bot-footer {
	padding: 10px 14px;
	border-top: 1px solid var(--ucd-hub-border);
	background: var(--ucd-hub-card-bg);
}

.ucd-bot-footer form {
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--ucd-hub-border);
	border-radius: 9999px;
	padding: 4px 6px 4px 14px;
}

[data-theme="light"] .ucd-bot-footer form {
	background: #F8FAFC;
}

.ucd-bot-footer input {
	flex: 1;
	background: none;
	border: none;
	outline: none;
	color: var(--ucd-hub-text);
	font-size: 16px !important;
	font-family: inherit;
	line-height: 1.4;
}

.ucd-bot-footer button {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #C5453E;
	color: #FFFFFF;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.ucd-bot-footer button:hover {
	background: #D6524B;
}

/* Keyframes */
@keyframes ucdFadeInUp {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes ucdPulseRing {
	0% { transform: scale(0.95); opacity: 0.8; }
	50% { transform: scale(1.35); opacity: 0; }
	100% { transform: scale(1.35); opacity: 0; }
}

@keyframes ucdBounce {
	0%, 80%, 100% { transform: scale(0); }
	40% { transform: scale(1); }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
	.ucd-floating-hub {
		bottom: 20px;
	}
	.ucd-floating-hub.ucd-pos-right {
		right: 18px;
	}
	.ucd-floating-hub.ucd-pos-left {
		left: 18px;
	}
	.ucd-chatbot-window {
		bottom: 86px;
		right: 16px !important;
		left: 16px !important;
		width: calc(100vw - 32px);
		height: 480px;
	}
	.ucd-form-row.ucd-2col {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	.ucd-enquiry-modal-dialog {
		padding: 0;
	}
}


/* ==========================================================================
   IOS SAFARI ZERO-ZOOM ON INPUT FOCUS FIX
   ========================================================================== */
#ucdBotInput,
.ucd-bot-footer input,
.ucd-form-group input,
.ucd-form-group select,
.ucd-form-group textarea {
	font-size: 16px !important;
}
