/* Julian AI Chatbot Widget
   Brand-color-driven palette via CSS custom properties, Montserrat font
   Features: floating toggle (Lottie), voice intro overlay with gradient orb,
   chat area, cute send/receive tones, shimmer thinking indicator, quick replies,
   markdown rendering, configurable position, customizable brand colors */

/* ═══ Default brand color values — overridden by JS at runtime ═══ */
:root {
	--julian-cb-brand: #0D1B4C;
	--julian-cb-brand-light: #1a2a6c;
	--julian-cb-accent: #B89A4A;
	--julian-cb-brand-08: rgba(13, 27, 76, 0.08);
	--julian-cb-brand-06: rgba(13, 27, 76, 0.06);
	--julian-cb-brand-12: rgba(13, 27, 76, 0.12);
	--julian-cb-brand-15: rgba(13, 27, 76, 0.15);
	--julian-cb-brand-25: rgba(13, 27, 76, 0.25);
	--julian-cb-accent-15: rgba(184, 154, 74, 0.15);
	--julian-cb-accent-25: rgba(184, 154, 74, 0.25);
	--julian-cb-accent-30: rgba(184, 154, 74, 0.30);
	--julian-cb-accent-60: rgba(184, 154, 74, 0.60);
}

/* ════════════════════════════════════════════════════════════════════
   Floating toggle button — Lottie only (no gold ring, no image)
   ════════════════════════════════════════════════════════════════════ */
#julian-chatbot-toggle {
	position: fixed;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: transparent;
	border: none;
	cursor: pointer;
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	overflow: visible;
	box-shadow: none;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Position variants for the toggle ── */
#julian-chatbot-toggle.julian-cb-pos-bottom-right  { bottom: 24px; right: 24px; }
#julian-chatbot-toggle.julian-cb-pos-right-center  { top: 50%; right: 24px; transform: translateY(-50%); }
#julian-chatbot-toggle.julian-cb-pos-top-right     { top: 24px; right: 24px; }
#julian-chatbot-toggle.julian-cb-pos-bottom-center { bottom: 24px; left: 50%; transform: translateX(-50%); }
#julian-chatbot-toggle.julian-cb-pos-bottom-left   { bottom: 24px; left: 24px; }
#julian-chatbot-toggle.julian-cb-pos-left-center   { top: 50%; left: 24px; transform: translateY(-50%); }
#julian-chatbot-toggle.julian-cb-pos-top-left      { top: 24px; left: 24px; }

/* Keep hover transform relative to base position */
#julian-chatbot-toggle.julian-cb-pos-bottom-right:hover  { transform: translateY(-3px) scale(1.05); }
#julian-chatbot-toggle.julian-cb-pos-top-right:hover     { transform: translateY(3px) scale(1.05); }
#julian-chatbot-toggle.julian-cb-pos-bottom-left:hover   { transform: translateY(-3px) scale(1.05); }
#julian-chatbot-toggle.julian-cb-pos-top-left:hover      { transform: translateY(3px) scale(1.05); }
#julian-chatbot-toggle.julian-cb-pos-bottom-center:hover { transform: translateX(-50%) translateY(-3px) scale(1.05); }
#julian-chatbot-toggle.julian-cb-pos-right-center:hover  { transform: translateY(-50%) translateX(-3px) scale(1.05); }
#julian-chatbot-toggle.julian-cb-pos-left-center:hover   { transform: translateY(-50%) translateX(3px) scale(1.05); }

#julian-chatbot-toggle:active {
	transform: scale(0.95);
}

/* Lottie container fills the toggle; no gold ring, no border */
#julian-chatbot-toggle dotlottie-wc {
	width: 100% !important;
	height: 100% !important;
	display: block;
}

/* Subtle pulse ring — very faint, just to hint at interactivity */
#julian-chatbot-toggle::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 1.5px solid var(--julian-cb-accent-25);
	animation: julian-cb-pulse 2.8s ease-out infinite;
	pointer-events: none;
}

#julian-chatbot-toggle.is-open::before {
	display: none;
}

@keyframes julian-cb-pulse {
	0%   { transform: scale(1);   opacity: 0.7; }
	100% { transform: scale(1.35); opacity: 0; }
}

/* ════════════════════════════════════════════════════════════════════
   Chat panel
   ════════════════════════════════════════════════════════════════════ */
#julian-chatbot-panel {
	position: fixed;
	width: 380px;
	max-width: calc(100vw - 48px);
	height: 560px;
	max-height: calc(100vh - 130px);
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 20px 60px var(--julian-cb-brand-25);
	z-index: 99999;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: translateY(20px) scale(0.95);
	opacity: 0;
	pointer-events: none;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

/* ── Position variants for the panel ── */
#julian-chatbot-panel.julian-cb-pos-bottom-right  { bottom: 96px; right: 24px; }
#julian-chatbot-panel.julian-cb-pos-right-center  { top: 50%; right: 24px; transform: translateY(-50%) scale(0.95); }
#julian-chatbot-panel.julian-cb-pos-top-right     { top: 96px; right: 24px; transform: translateY(-20px) scale(0.95); }
#julian-chatbot-panel.julian-cb-pos-bottom-center { bottom: 96px; left: 50%; transform: translateX(-50%) translateY(20px) scale(0.95); }
#julian-chatbot-panel.julian-cb-pos-bottom-left   { bottom: 96px; left: 24px; }
#julian-chatbot-panel.julian-cb-pos-left-center   { top: 50%; left: 24px; transform: translateY(-50%) scale(0.95); }
#julian-chatbot-panel.julian-cb-pos-top-left      { top: 96px; left: 24px; transform: translateY(-20px) scale(0.95); }

/* Open state — must reset transform per position */
#julian-chatbot-panel.is-open.julian-cb-pos-bottom-right  { transform: translateY(0) scale(1); }
#julian-chatbot-panel.is-open.julian-cb-pos-right-center  { transform: translateY(-50%) scale(1); }
#julian-chatbot-panel.is-open.julian-cb-pos-top-right     { transform: translateY(0) scale(1); }
#julian-chatbot-panel.is-open.julian-cb-pos-bottom-center { transform: translateX(-50%) translateY(0) scale(1); }
#julian-chatbot-panel.is-open.julian-cb-pos-bottom-left   { transform: translateY(0) scale(1); }
#julian-chatbot-panel.is-open.julian-cb-pos-left-center   { transform: translateY(-50%) scale(1); }
#julian-chatbot-panel.is-open.julian-cb-pos-top-left      { transform: translateY(0) scale(1); }

#julian-chatbot-panel.is-open {
	opacity: 1;
	pointer-events: auto;
}

/* ════════════════════════════════════════════════════════════════════
   Voice intro overlay
   ════════════════════════════════════════════════════════════════════ */
.julian-cb-voice-overlay {
	position: absolute;
	inset: 0;
	z-index: 10;
	background: #0a0a12;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	transition: opacity 0.6s ease, visibility 0.6s ease;
}

.julian-cb-voice-overlay.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

#julian-cb-orb-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.julian-cb-voice-content {
	position: relative;
	z-index: 2;
	text-align: center;
	pointer-events: none;
}

.julian-cb-voice-name {
	font-family: 'Montserrat', sans-serif;
	font-size: 28px;
	font-weight: 800;
	color: #fff;
	letter-spacing: -0.5px;
	text-shadow: 0 0 30px var(--julian-cb-accent-60);
	margin-bottom: 8px;
}

.julian-cb-voice-status {
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.6);
	letter-spacing: 1px;
	text-transform: uppercase;
}

.julian-cb-voice-status.is-done {
	color: var(--julian-cb-accent);
}

.julian-cb-voice-skip {
	position: absolute;
	bottom: 20px;
	right: 20px;
	z-index: 3;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: rgba(255, 255, 255, 0.7);
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 600;
	padding: 8px 16px;
	border-radius: 20px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	backdrop-filter: blur(8px);
}

.julian-cb-voice-skip:hover {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.4);
}

/* ════════════════════════════════════════════════════════════════════
   Chat header
   ════════════════════════════════════════════════════════════════════ */
.julian-cb-header {
	background: linear-gradient(135deg, var(--julian-cb-brand) 0%, var(--julian-cb-brand-light) 100%);
	color: #fff;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.julian-cb-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--julian-cb-accent-25);
	border: 2px solid var(--julian-cb-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden;
}

.julian-cb-avatar svg {
	width: 20px;
	height: 20px;
	color: var(--julian-cb-accent);
}

.julian-cb-header-info {
	flex: 1;
	min-width: 0;
}

.julian-cb-header-name {
	font-family: 'Montserrat', sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.julian-cb-header-status {
	font-size: 11px;
	color: rgba(255, 255, 255, 0.7);
	display: flex;
	align-items: center;
	gap: 5px;
	margin-top: 2px;
}

.julian-cb-header-status::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.julian-cb-export {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	padding: 4px;
	border-radius: 6px;
	transition: color 0.2s, background 0.2s, transform 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.julian-cb-export:hover {
	color: var(--julian-cb-accent);
	background: var(--julian-cb-accent-15);
	transform: translateY(-1px);
}

.julian-cb-export:active {
	transform: scale(0.9);
}

.julian-cb-export svg {
	width: 18px;
	height: 18px;
}

.julian-cb-close {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	padding: 4px;
	border-radius: 6px;
	transition: color 0.2s, background 0.2s;
}

.julian-cb-close:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
}

.julian-cb-close svg {
	width: 20px;
	height: 20px;
}

/* ════════════════════════════════════════════════════════════════════
   Messages area
   ════════════════════════════════════════════════════════════════════ */
.julian-cb-messages {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	scroll-behavior: smooth;
	background: #f8f9fb;
	min-height: 0;
}

.julian-cb-messages::-webkit-scrollbar {
	width: 5px;
}

.julian-cb-messages::-webkit-scrollbar-thumb {
	background: var(--julian-cb-brand-15);
	border-radius: 3px;
}

.julian-cb-messages::-webkit-scrollbar-track {
	background: transparent;
}

/* ════════════════════════════════════════════════════════════════════
   Message bubbles — Framer Motion-style slide-in
   ════════════════════════════════════════════════════════════════════ */
.julian-cb-msg {
	display: flex;
	flex-direction: column;
	max-width: 85%;
	will-change: transform, opacity;
	animation: julian-cb-msg-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes julian-cb-msg-in {
	0%   { opacity: 0; transform: translateY(20px) scale(0.92); }
	60%  { opacity: 1; transform: translateY(-3px) scale(1.02); }
	100% { opacity: 1; transform: translateY(0) scale(1); }
}

.julian-cb-msg-user {
	transform-origin: bottom right;
}

.julian-cb-msg-bot {
	transform-origin: bottom left;
}

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

.julian-cb-msg-user {
	align-self: flex-end;
	align-items: flex-end;
}

.julian-cb-bubble {
	padding: 11px 15px;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.55;
	font-family: 'Montserrat', sans-serif;
	word-wrap: break-word;
	white-space: pre-wrap;
}

.julian-cb-msg-bot .julian-cb-bubble {
	background: #fff;
	color: #1e293b;
	border: 1px solid var(--julian-cb-brand-08);
	border-bottom-left-radius: 4px;
	box-shadow: 0 2px 8px var(--julian-cb-brand-06);
}

.julian-cb-msg-user .julian-cb-bubble {
	background: var(--julian-cb-brand);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.julian-cb-msg-time {
	font-size: 10px;
	color: #94a3b8;
	margin-top: 4px;
	padding: 0 4px;
}

/* ── Markdown rendering inside bot bubbles ── */
.julian-cb-bubble-md {
	white-space: normal;
}

.julian-cb-bubble-md ul,
.julian-cb-bubble-md ol {
	margin: 6px 0;
	padding-left: 20px;
}

.julian-cb-bubble-md li {
	margin: 2px 0;
}

.julian-cb-bubble-md strong {
	font-weight: 700;
	color: var(--julian-cb-brand);
}

.julian-cb-bubble-md em {
	font-style: italic;
}

.julian-cb-bubble-md code {
	background: var(--julian-cb-brand-08);
	padding: 1px 5px;
	border-radius: 4px;
	font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
	font-size: 12px;
}

.julian-cb-bubble-md a {
	color: var(--julian-cb-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 600;
}

.julian-cb-bubble-md a:hover {
	color: var(--julian-cb-brand);
}

/* ════════════════════════════════════════════════════════════════════
   Quick reply buttons
   ════════════════════════════════════════════════════════════════════ */
.julian-cb-quick-replies {
	flex-shrink: 0;
	display: flex;
	gap: 8px;
	padding: 8px 16px 4px;
	background: #fff;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.julian-cb-quick-replies::-webkit-scrollbar {
	display: none;
}

.julian-cb-quick-replies:empty {
	display: none;
}

.julian-cb-quick-reply {
	flex-shrink: 0;
	background: var(--julian-cb-brand-06);
	border: 1.5px solid var(--julian-cb-brand-15);
	color: var(--julian-cb-brand);
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 600;
	padding: 8px 14px;
	border-radius: 16px;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.2s ease;
}

.julian-cb-quick-reply:hover {
	background: var(--julian-cb-brand);
	color: #fff;
	border-color: var(--julian-cb-brand);
	transform: translateY(-1px);
}

.julian-cb-quick-reply:active {
	transform: scale(0.96);
}

/* ════════════════════════════════════════════════════════════════════
   Thinking indicator — orb + black shimmer text (no pill/background)
   ════════════════════════════════════════════════════════════════════ */
.julian-cb-typing {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	max-width: 85%;
	padding: 4px 0;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	overflow: visible;
	animation: julian-cb-typing-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes julian-cb-typing-in {
	from { opacity: 0; transform: translateY(10px) scale(0.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.julian-cb-typing canvas {
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	display: block;
}

.julian-cb-shimmer-text {
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	font-weight: 500;
	background: linear-gradient(
		110deg,
		#404040,
		35%,
		#000,
		50%,
		#404040,
		75%,
		#404040
	);
	background-size: 200% 100%;
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	animation: julian-cb-shimmer 2s linear infinite;
	white-space: nowrap;
}

@keyframes julian-cb-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* ════════════════════════════════════════════════════════════════════
   Feedback controls (thumbs up/down)
   ════════════════════════════════════════════════════════════════════ */
.julian-cb-feedback {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--julian-cb-brand-06);
}

.julian-cb-feedback-q {
	font-family: 'Montserrat', sans-serif;
	font-size: 11px;
	color: #94a3b8;
	font-weight: 500;
}

.julian-cb-fb-btn {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1.5px solid var(--julian-cb-brand-12);
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: all 0.2s ease;
}

.julian-cb-fb-btn svg {
	width: 14px;
	height: 14px;
	color: #94a3b8;
	transition: color 0.2s;
}

.julian-cb-fb-btn:hover {
	border-color: var(--julian-cb-accent);
	transform: scale(1.1);
}

.julian-cb-btn:hover svg {
	color: var(--julian-cb-accent);
}

.julian-cb-fb-up.is-active {
	background: rgba(34, 197, 94, 0.15);
	border-color: #22c55e;
}

.julian-cb-fb-up.is-active svg {
	color: #22c55e;
}

.julian-cb-fb-down.is-active {
	background: rgba(239, 68, 68, 0.15);
	border-color: #ef4444;
}

.julian-cb-fb-down.is-active svg {
	color: #ef4444;
}

.julian-cb-fb-comment-box {
	display: flex;
	gap: 6px;
	margin-top: 8px;
	animation: julian-cb-msg-in 0.25s ease;
}

.julian-cb-fb-comment-box input {
	flex: 1;
	border: 1.5px solid var(--julian-cb-brand-12);
	border-radius: 8px;
	padding: 6px 10px;
	/* >= 16px to prevent iOS zoom on focus */
	font-size: 16px;
	font-family: 'Montserrat', sans-serif;
	outline: none;
	transition: border-color 0.2s;
	-webkit-appearance: none;
	appearance: none;
}

.julian-cb-fb-comment-box input:focus {
	border-color: var(--julian-cb-accent);
}

.julian-cb-fb-send {
	background: var(--julian-cb-brand);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 600;
	font-family: 'Montserrat', sans-serif;
	cursor: pointer;
	transition: background 0.2s;
}

.julian-cb-fb-send:hover {
	background: var(--julian-cb-accent);
	color: var(--julian-cb-brand);
}

.julian-cb-fb-toast {
	margin-top: 6px;
	font-size: 11px;
	color: #22c55e;
	font-weight: 600;
	font-family: 'Montserrat', sans-serif;
	animation: julian-cb-msg-in 0.3s ease;
}

/* ════════════════════════════════════════════════════════════════════
   Agent shuffle overlay (shown during handoff)
   ════════════════════════════════════════════════════════════════════ */
.julian-cb-agent-shuffle {
	display: none;
	padding: 20px 16px 16px;
	text-align: center;
}

.julian-cb-agent-shuffle.is-visible {
	display: block;
	animation: julian-cb-shuffle-in 0.3s ease;
}

@keyframes julian-cb-shuffle-in {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.julian-cb-shuffle-track {
	display: flex;
	align-items: center;
	gap: 10px;
	justify-content: center;
	min-height: 56px;
	margin-bottom: 12px;
	overflow: hidden;
	white-space: nowrap;
}

.julian-cb-shuffle-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	border: 2px solid var(--julian-cb-accent);
	box-shadow: 0 2px 8px rgba(13, 27, 76, 0.12);
	background: linear-gradient(135deg, var(--julian-cb-brand), #2a3a7c);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	text-transform: uppercase;
	font-family: 'Montserrat', sans-serif;
}

.julian-cb-shuffle-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.julian-cb-shuffle-placeholder {
	background: linear-gradient(135deg, var(--julian-cb-brand), #2a3a7c);
}

/* The selected avatar after shuffle resolves — pops in with a spring */
.julian-cb-shuffle-selected {
	width: 56px;
	height: 56px;
	border-width: 3px;
	animation: julian-cb-shuffle-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes julian-cb-shuffle-pop {
	0%   { transform: scale(0.3); opacity: 0; }
	60%  { transform: scale(1.15); opacity: 1; }
	100% { transform: scale(1); opacity: 1; }
}

.julian-cb-shuffle-label {
	font-size: 13px;
	color: var(--julian-cb-brand);
	font-weight: 600;
	font-family: 'Montserrat', sans-serif;
	line-height: 1.4;
}

/* ════════════════════════════════════════════════════════════════════
   Handoff banner
   ════════════════════════════════════════════════════════════════════ */
.julian-cb-handoff-banner {
	background: var(--julian-cb-accent-15);
	border: 1px solid var(--julian-cb-accent-30);
	border-radius: 10px;
	opacity: 0.9;
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 12px;
	color: #8a7332;
	text-align: center;
	margin: 0 16px 12px;
	display: none;
}

.julian-cb-handoff-banner.is-visible {
	display: block;
	animation: julian-cb-banner-in 0.3s ease;
}

@keyframes julian-cb-banner-in {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════════════
   Input area — light, rounded, single-line with circular send button
   ════════════════════════════════════════════════════════════════════ */
.julian-cb-input-area {
	flex-shrink: 0;
	padding: 12px 16px;
	background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
	border-top: 1px solid var(--julian-cb-brand-08);
	display: flex;
	gap: 10px;
	align-items: center;
}

#julian-chatbot-input {
	flex: 1;
	border: 1.5px solid var(--julian-cb-brand-12);
	border-radius: 999px;
	padding: 12px 18px;
	background: #ffffff;
	color: var(--julian-cb-brand);
	/* font-size MUST be >= 16px to stop iOS Safari from zooming on focus */
	font-size: 16px;
	font-family: 'Montserrat', sans-serif;
	outline: none;
	line-height: 1.4;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
	box-shadow: 0 2px 6px var(--julian-cb-brand-06);
}

#julian-chatbot-input:focus {
	background: #ffffff;
	border-color: var(--julian-cb-accent-60);
	box-shadow: 0 0 0 3px var(--julian-cb-accent-15), 0 2px 6px var(--julian-cb-brand-06);
}

#julian-chatbot-input::placeholder {
	color: #94a3b8;
}

#julian-chatbot-send {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--julian-cb-brand);
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
	box-shadow: 0 4px 12px var(--julian-cb-brand-25);
}

#julian-chatbot-send:hover {
	background: var(--julian-cb-accent);
	box-shadow: 0 4px 14px var(--julian-cb-accent-30);
}

#julian-chatbot-send:active {
	transform: scale(0.92);
}

#julian-chatbot-send svg {
	width: 18px;
	height: 18px;
}

#julian-chatbot-send:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	background: #94a3b8;
	box-shadow: none;
}

/* ════════════════════════════════════════════════════════════════════
   Footer
   ════════════════════════════════════════════════════════════════════ */
.julian-cb-footer {
	padding: 6px 16px 8px;
	text-align: center;
	font-size: 10px;
	color: #64748b;
	background: #f8f9fb;
	border-top: 1px solid var(--julian-cb-brand-06, 0.04);
	flex-shrink: 0;
}

.julian-cb-footer a {
	color: #64748b;
	text-decoration: none;
	font-weight: 600;
	font-family: 'Montserrat', sans-serif;
	letter-spacing: 0.03em;
	transition: color 0.2s ease;
}

.julian-cb-footer a:hover {
	color: var(--julian-cb-brand);
}

/* ════════════════════════════════════════════════════════════════════
   Responsive: mobile — full-screen chat, no zoom on inputs
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
	#julian-chatbot-toggle {
		width: 64px;
		height: 64px;
	}

	/* ── Mobile position: reset ALL desktop positions first, then apply the
	   mobile position from the data-pos-mobile attribute via attribute selectors.
	   This lets the admin set a different position for mobile vs desktop. ── */
	#julian-chatbot-toggle {
		top: auto !important;
		bottom: auto !important;
		left: auto !important;
		right: auto !important;
		transform: none !important;
	}

	/* Mobile: bottom-right */
	#julian-chatbot-toggle[data-pos-mobile="bottom-right"] { bottom: 16px; right: 16px; }
	/* Mobile: bottom-left */
	#julian-chatbot-toggle[data-pos-mobile="bottom-left"] { bottom: 16px; left: 16px; }
	/* Mobile: top-right */
	#julian-chatbot-toggle[data-pos-mobile="top-right"] { top: 16px; right: 16px; }
	/* Mobile: top-left */
	#julian-chatbot-toggle[data-pos-mobile="top-left"] { top: 16px; left: 16px; }
	/* Mobile: bottom-center */
	#julian-chatbot-toggle[data-pos-mobile="bottom-center"] { bottom: 16px; left: 50%; transform: translateX(-50%) !important; }
	/* Mobile: right-center → dock bottom-right for thumb reach on mobile */
	#julian-chatbot-toggle[data-pos-mobile="right-center"] { bottom: 16px; right: 16px; }
	/* Mobile: left-center → dock bottom-left for thumb reach on mobile */
	#julian-chatbot-toggle[data-pos-mobile="left-center"] { bottom: 16px; left: 16px; }

	/* Hover effects on mobile (simplified) */
	#julian-chatbot-toggle[data-pos-mobile="bottom-right"]:hover,
	#julian-chatbot-toggle[data-pos-mobile="bottom-left"]:hover,
	#julian-chatbot-toggle[data-pos-mobile="top-right"]:hover,
	#julian-chatbot-toggle[data-pos-mobile="top-left"]:hover,
	#julian-chatbot-toggle[data-pos-mobile="right-center"]:hover,
	#julian-chatbot-toggle[data-pos-mobile="left-center"]:hover { transform: scale(1.05) !important; }
	#julian-chatbot-toggle[data-pos-mobile="bottom-center"]:hover { transform: translateX(-50%) scale(1.05) !important; }

	/* Full-screen panel on mobile regardless of position */
	#julian-chatbot-panel {
		bottom: 0 !important;
		right: 0 !important;
		left: 0 !important;
		top: 0 !important;
		width: 100vw !important;
		max-width: 100vw !important;
		height: 100dvh !important;
		max-height: 100dvh !important;
		border-radius: 0 !important;
		transform: translateY(20px) scale(0.95) !important;
	}

	#julian-chatbot-panel.is-open {
		transform: translateY(0) scale(1) !important;
	}

	.julian-cb-messages {
		padding: 16px;
		flex: 1 1 auto;
		min-height: 0;
		-webkit-overflow-scrolling: touch;
	}

	.julian-cb-header {
		padding-top: calc(16px + env(safe-area-inset-top, 0px));
		flex-shrink: 0;
	}

	.julian-cb-input-area {
		padding: 10px 12px;
		padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
		flex-shrink: 0;
	}

	#julian-chatbot-input {
		padding: 11px 16px;
	}

	.julian-cb-voice-name {
		font-size: 32px;
	}
}
