/**
 * Frontend Styles for Worldwide Limousines AI Concierge
 * Luxury Dark Theme Matching Brand Identity
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
	--worldwide-bg: #0c0d0f;
	--worldwide-card: #141619;
	--worldwide-border: rgba(191, 155, 48, 0.25);
	--worldwide-border-active: #bf9b30;
	--worldwide-gold: #bf9b30;
	--worldwide-gold-rgb: 191, 155, 48;
	--worldwide-text: #e5e7eb;
	--worldwide-text-muted: #9ca3af;
	--worldwide-bubble-bot: #1c1e22;
	--worldwide-bubble-user: #bf9b30;
	--worldwide-text-user: #0a0b0d;
	--worldwide-font: 'Outfit', sans-serif;
}

/* Floating Trigger Button */
.worldwide-ai-trigger-btn {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: 1px solid var(--worldwide-gold);
	color: #0a0b0d;
	cursor: pointer;
	box-shadow: 0 8px 32px rgba(191, 155, 48, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
	padding: 0;
}

.worldwide-ai-trigger-btn.pos-bottom-left {
	bottom: 24px;
	left: 24px;
	right: auto;
}

.worldwide-ai-trigger-btn.pos-top-right {
	top: 24px;
	right: 24px;
	bottom: auto;
}

.worldwide-ai-trigger-btn.pos-top-left {
	top: 24px;
	left: 24px;
	right: auto;
	bottom: auto;
}

.worldwide-ai-trigger-btn:hover {
	transform: scale(1.08);
	box-shadow: 0 12px 40px rgba(191, 155, 48, 0.45);
}

.worldwide-ai-trigger-btn:focus {
	outline: none;
}

.worldwide-ai-trigger-btn .trigger-icon {
	width: 24px;
	height: 24px;
	stroke: #0a0b0d;
}

/* Main Chat Container */
.worldwide-ai-chat-box {
	display: flex;
	flex-direction: column;
	background-color: var(--worldwide-bg);
	border: 1px solid var(--worldwide-border);
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
	overflow: hidden;
	font-family: var(--worldwide-font);
	z-index: 999998;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

.worldwide-ai-chat-box * {
	box-sizing: border-box;
}

/* Floating Widget Mode */
.worldwide-ai-chat-box.worldwide-ai-widget-mode {
	position: fixed;
	bottom: 96px;
	right: 24px;
	width: 380px;
	height: 580px;
	max-height: calc(100vh - 120px);
	max-width: calc(100vw - 48px);
	border-radius: 16px;
	transform: translateY(20px);
	opacity: 0;
	pointer-events: none;
}

.worldwide-ai-chat-box.worldwide-ai-widget-mode.pos-bottom-left {
	bottom: 96px;
	left: 24px;
	right: auto;
}

.worldwide-ai-chat-box.worldwide-ai-widget-mode.pos-top-right {
	top: 96px;
	right: 24px;
	bottom: auto;
	transform: translateY(-20px);
}

.worldwide-ai-chat-box.worldwide-ai-widget-mode.pos-top-left {
	top: 96px;
	left: 24px;
	right: auto;
	bottom: auto;
	transform: translateY(-20px);
}

.worldwide-ai-chat-box.worldwide-ai-widget-mode.chat-open {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
}

/* Inline Shortcode Mode */
.worldwide-ai-chat-box.worldwide-ai-inline-mode {
	width: 100%;
	height: 600px;
	max-height: 100%;
	border-radius: 12px;
	margin: 20px 0;
}

/* Chat Header */
.worldwide-ai-chat-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	background-color: var(--worldwide-card);
	border-bottom: 1px solid var(--worldwide-border);
}

.header-branding {
	display: flex;
	align-items: center;
}

.header-branding .brand-logo {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1.5px solid var(--worldwide-gold);
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 12px;
}

.header-branding .brand-logo .dashicons {
	color: var(--worldwide-gold);
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.brand-info {
	display: flex;
	flex-direction: column;
}

.brand-info h2.brand-name {
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	margin: 0;
	line-height: 1.2;
}

.brand-info .brand-status {
	font-size: 11px;
	color: var(--worldwide-text-muted);
	display: flex;
	align-items: center;
	margin-top: 2px;
}

.brand-info .brand-status .status-indicator {
	width: 6px;
	height: 6px;
	background-color: #10b981;
	border-radius: 50%;
	margin-right: 6px;
}

.worldwide-ai-close-btn {
	background: none;
	border: none;
	color: var(--worldwide-text-muted);
	font-size: 28px;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	transition: color 0.2s ease;
}

.worldwide-ai-close-btn:hover {
	color: #fff;
}

/* Message Log Area */
.worldwide-ai-chat-messages {
	flex: 1;
	padding: 20px;
	overflow-y: auto;
	background-color: var(--worldwide-bg);
	display: flex;
	flex-direction: column;
	gap: 16px;
	scroll-behavior: smooth;
}

/* Custom Scrollbar */
.worldwide-ai-chat-messages::-webkit-scrollbar {
	width: 6px;
}
.worldwide-ai-chat-messages::-webkit-scrollbar-track {
	background: var(--worldwide-bg);
}
.worldwide-ai-chat-messages::-webkit-scrollbar-thumb {
	background: rgba(191, 155, 48, 0.15);
	border-radius: 3px;
}
.worldwide-ai-chat-messages::-webkit-scrollbar-thumb:hover {
	background: rgba(191, 155, 48, 0.4);
}

/* Chat Messages */
.chat-message {
	display: flex;
	flex-direction: column;
	max-width: 85%;
	animation: messageFadeIn 0.3s ease forwards;
	opacity: 0;
	transform: translateY(10px);
}

@keyframes messageFadeIn {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.chat-message.bot-message {
	align-self: flex-start;
}

.chat-message.user-message {
	align-self: flex-end;
}

.chat-message .message-bubble {
	padding: 12px 16px;
	font-size: 13.5px;
	line-height: 1.5;
	border-radius: 12px;
}

.chat-message.bot-message .message-bubble {
	background-color: var(--worldwide-bubble-bot);
	color: var(--worldwide-text);
	border-bottom-left-radius: 2px;
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-message.user-message .message-bubble {
	background-color: var(--worldwide-bubble-user);
	color: var(--worldwide-text-user);
	border-bottom-right-radius: 2px;
	font-weight: 500;
}

/* Welcome message custom rendering */
.welcome-wrapper .message-bubble {
	border-color: var(--worldwide-border);
	background-color: rgba(191, 155, 48, 0.04);
}

/* Quick Actions */
.worldwide-ai-quick-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
	animation: messageFadeIn 0.4s ease forwards;
}

.quick-action-btn {
	background: none;
	border: 1px solid var(--worldwide-border);
	color: var(--worldwide-gold);
	border-radius: 20px;
	padding: 8px 14px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: var(--worldwide-font);
}

.quick-action-btn:hover {
	background-color: var(--worldwide-gold);
	color: #0a0b0d;
	border-color: var(--worldwide-gold);
}

/* Source Citation */
.message-sources {
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 11px;
}

.message-sources .sources-title {
	display: block;
	color: var(--worldwide-text-muted);
	font-weight: bold;
	margin-bottom: 4px;
	text-transform: uppercase;
	font-size: 9px;
	letter-spacing: 0.5px;
}

.message-sources ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.message-sources li a {
	display: inline-block;
	background-color: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 2px 6px;
	border-radius: 4px;
	color: var(--worldwide-gold);
	text-decoration: none;
	transition: all 0.2s ease;
	white-space: nowrap;
	max-width: 140px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.message-sources li a:hover {
	background-color: rgba(191, 155, 48, 0.1);
	border-color: var(--worldwide-gold);
}

/* Typing Indicator */
.worldwide-ai-typing-indicator {
	align-self: flex-start;
	background-color: var(--worldwide-bubble-bot);
	border: 1px solid rgba(255, 255, 255, 0.05);
	padding: 10px 16px;
	border-radius: 12px;
	border-bottom-left-radius: 2px;
	margin-left: 20px;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 4px;
}

.worldwide-ai-typing-indicator .dot {
	width: 6px;
	height: 6px;
	background-color: var(--worldwide-text-muted);
	border-radius: 50%;
	opacity: 0.3;
	animation: typingDot 1.4s infinite ease-in-out both;
}

.worldwide-ai-typing-indicator .dot:nth-child(2) {
	animation-delay: 0.2s;
}

.worldwide-ai-typing-indicator .dot:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes typingDot {
	0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
	40% { transform: scale(1); opacity: 1; }
}

/* Chat Input Form */
.worldwide-ai-chat-input-form {
	padding: 16px 20px;
	background-color: var(--worldwide-card);
	border-top: 1px solid var(--worldwide-border);
}

.input-wrapper {
	display: flex;
	align-items: center;
	background-color: rgba(0, 0, 0, 0.35);
	border: 1px solid var(--worldwide-border);
	border-radius: 24px;
	padding: 4px 6px 4px 16px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper:focus-within {
	border-color: var(--worldwide-gold);
	box-shadow: 0 0 0 2px rgba(191, 155, 48, 0.15);
}

.chat-input-field {
	flex: 1;
	background: none;
	border: none;
	resize: none;
	color: #fff;
	font-family: var(--worldwide-font);
	font-size: 13.5px;
	padding: 8px 0;
	height: 34px;
	line-height: 1.35;
}

.chat-input-field::placeholder {
	color: var(--worldwide-text-muted);
}

.chat-input-field:focus {
	outline: none;
	box-shadow: none;
}

.chat-send-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s ease;
}

.chat-send-btn:hover {
	background-color: rgba(255, 255, 255, 0.05);
}

.chat-send-btn .send-icon {
	width: 18px;
	height: 18px;
}

.chat-footer-note {
	text-align: center;
	margin-top: 8px;
	font-size: 9.5px;
	color: var(--worldwide-text-muted);
	letter-spacing: 0.3px;
	text-transform: uppercase;
}

/* Mobile Responsive */
@media (max-width: 480px) {
	.worldwide-ai-chat-box.worldwide-ai-widget-mode {
		bottom: 0;
		right: 0;
		width: 100vw;
		height: 100vh;
		max-height: 100vh;
		max-width: 100vw;
		border-radius: 0;
	}

	.worldwide-ai-trigger-btn {
		bottom: 16px;
		right: 16px;
		width: 54px;
		height: 54px;
	}
}
