/* Better Boss AI Chat — widget styles v2.2 (premium HUD, dark + light, themable). */
.bbac, .bbac * { box-sizing: border-box; }
.bbac {
	--bbac-accent: #00E96B;
	--bbac-accent2: #5E46F4;
	--bbac-cyan: #16B4E6;
	--bbac-bg: #08121F;
	--bbac-panel: #0C1A2E;
	--bbac-bubble: #1C2F4B;
	--bbac-elev: rgba(255,255,255,.05);
	--bbac-line: rgba(255,255,255,.11);
	--bbac-ink: #EDF2FB;
	--bbac-soft: #AEB7CC;
	--bbac-muted: #8E97B5;
	--bbac-grid: rgba(255,255,255,.028);
	--bbac-field: rgba(0,0,0,.28);
	--bbac-linkink: #2BF583;
	/* CTA accent (driven by bubble-color variant; defaults set per .bbac--launch-*) */
	--bbac-cta-a: #FFD24A;
	--bbac-cta-b: #F5A623;
	--bbac-cta-fg: #3d2a00;
	--bbac-cta-shadow: rgba(245,166,35,.32);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}
/* ---- light theme ---- */
.bbac[data-bbac-theme="light"] {
	--bbac-bg: #FFFFFF;
	--bbac-panel: #F3F6FC;
	--bbac-bubble: #F1F4FA;
	--bbac-elev: #FFFFFF;
	--bbac-line: rgba(7,16,31,.12);
	--bbac-ink: #0C1A2E;
	--bbac-soft: #475067;
	--bbac-muted: #8A93A8;
	--bbac-grid: rgba(7,16,31,.04);
	--bbac-field: #FFFFFF;
	--bbac-linkink: #0E9E57;
}
/* CTA color variants (drive launcher + send + in-chat buttons + user bubble) */
.bbac--launch-gold { --bbac-cta-a: #FFD24A; --bbac-cta-b: #F5A623; --bbac-cta-fg: #3d2a00; --bbac-cta-shadow: rgba(245,166,35,.32); }
.bbac--launch-green { --bbac-cta-a: #00E96B; --bbac-cta-b: #13E29C; --bbac-cta-fg: #04210f; --bbac-cta-shadow: rgba(0,233,107,.28); }
.bbac--launch-purple { --bbac-cta-a: #7A3DF2; --bbac-cta-b: #5E46F4; --bbac-cta-fg: #FFFFFF; --bbac-cta-shadow: rgba(94,70,244,.34); }
.bbac-bolt { width: 56%; height: 56%; display: block; }
.bbac-avatar .bbac-bolt path { fill: #04210f; }

/* ---- host-theme hardening: stop the site's CSS from restyling the widget ---- */
.bbac button { -webkit-appearance: none !important; appearance: none !important; margin: 0 !important; text-transform: none !important; letter-spacing: normal !important; min-height: 0 !important; font-family: inherit !important; line-height: normal !important; }
.bbac button:focus, .bbac button:focus-visible, .bbac input:focus { outline: none !important; }
.bbac input { -webkit-appearance: none !important; appearance: none !important; font-family: inherit !important; min-height: 0 !important; }
.bbac-input { border-radius: 999px !important; height: 46px !important; }
.bbac-send { border-radius: 50% !important; width: 46px !important; height: 46px !important; }
.bbac-launcher { border-radius: 50% !important; }
.bbac-chip { border-radius: 999px !important; }
.bbac-book-btn, .bbac-lead-send, .bbac-book-fallbackbtn { border-radius: 12px !important; }
/* header icon buttons must stay flat in every state (kills theme focus/active red) */
.bbac .bbac-reset, .bbac .bbac-close, .bbac .bbac-theme-toggle,
.bbac .bbac-reset:focus, .bbac .bbac-close:focus, .bbac .bbac-theme-toggle:focus,
.bbac .bbac-reset:focus-visible, .bbac .bbac-close:focus-visible, .bbac .bbac-theme-toggle:focus-visible,
.bbac .bbac-reset:active, .bbac .bbac-close:active, .bbac .bbac-theme-toggle:active {
	background: transparent !important; background-color: transparent !important;
	box-shadow: none !important; border: none !important; outline: none !important; color: var(--bbac-soft) !important;
	width: 34px !important; height: 34px !important; padding: 0 !important;
	display: flex !important; align-items: center !important; justify-content: center !important;
}
.bbac .bbac-reset svg, .bbac .bbac-close svg, .bbac .bbac-theme-toggle svg, .bbac .bbac-send svg { display: block !important; margin: 0 auto !important; }
.bbac .bbac-reset:hover, .bbac .bbac-close:hover, .bbac .bbac-theme-toggle:hover { background: var(--bbac-elev) !important; background-color: var(--bbac-elev) !important; color: var(--bbac-ink) !important; }
/* keep the action buttons gold in every state — theme can't turn them red */
.bbac .bbac-send, .bbac .bbac-send:hover, .bbac .bbac-send:focus, .bbac .bbac-send:active,
.bbac .bbac-launcher, .bbac .bbac-launcher:hover, .bbac .bbac-launcher:focus,
.bbac .bbac-book-btn, .bbac .bbac-lead-send { background-image: linear-gradient(135deg, var(--bbac-cta-a), var(--bbac-cta-b)) !important; border-color: transparent !important; outline: none !important; }
/* send button: force the arrow color + perfect centering (theme was tinting it red / off-center) */
.bbac .bbac-send { color: var(--bbac-cta-fg) !important; display: flex !important; align-items: center !important; justify-content: center !important; padding: 0 !important; line-height: 0 !important; }
.bbac .bbac-send svg { stroke: var(--bbac-cta-fg) !important; color: var(--bbac-cta-fg) !important; display: block !important; margin: 0 !important; }

/* ---------- floating launcher (color variants) ---------- */
.bbac--float { position: fixed; bottom: 22px; right: 22px; z-index: 2147483000; }
.bbac--float.bbac--left { right: auto; left: 22px; }
.bbac-launcher {
	position: relative; display: flex; align-items: center; justify-content: center;
	border: none; cursor: pointer;
	width: 64px; height: 64px; border-radius: 50%; padding: 0;
	background: linear-gradient(135deg, var(--bbac-cta-a), var(--bbac-cta-b));
	color: var(--bbac-cta-fg);
	box-shadow: 0 14px 38px var(--bbac-cta-shadow), 0 2px 10px rgba(0,0,0,.3);
	transition: transform .18s ease, box-shadow .18s ease;
}
.bbac-launcher:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 22px 54px var(--bbac-cta-shadow); }
.bbac-launcher .bbac-bolt path { fill: var(--bbac-cta-fg); }
.bbac-launcher-icon { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; }
.bbac-launcher-icon .bbac-bolt { width: 22px; height: 30px; }
.bbac-launcher-txt { display: none; }
.bbac-launcher-pulse { position: absolute; inset: 0; border-radius: 999px; z-index: -1; opacity: .5; background: var(--bbac-cta-b); animation: bbac-pulse 2.4s ease-out infinite; }
@keyframes bbac-pulse { 0% { transform: scale(1); opacity: .5; } 70% { transform: scale(1.18); opacity: 0; } 100% { opacity: 0; } }
.bbac--open .bbac-launcher { display: none; }

/* greeting peek bubble */
.bbac-peek {
	position: absolute; bottom: 80px; right: 0; width: 270px;
	background: var(--bbac-bubble); color: var(--bbac-ink);
	border: 1px solid var(--bbac-line); border-radius: 16px;
	padding: 14px 30px 14px 16px; font-size: 14px; font-weight: 500; line-height: 1.5;
	box-shadow: 0 18px 44px rgba(0,0,0,.5); cursor: pointer; animation: bbac-pop .3s ease;
}
.bbac[data-bbac-theme="light"] .bbac-peek { box-shadow: 0 18px 44px rgba(7,16,31,.22); }
.bbac--left .bbac-peek { right: auto; left: 0; }
.bbac-peek::after { content: ''; position: absolute; bottom: -7px; right: 28px; width: 14px; height: 14px; background: var(--bbac-panel); border-right: 1px solid var(--bbac-line); border-bottom: 1px solid var(--bbac-line); transform: rotate(45deg); }
.bbac--left .bbac-peek::after { right: auto; left: 28px; }
.bbac-peek-x { position: absolute; top: 6px; right: 8px; background: none; border: none; color: var(--bbac-soft); font-size: 17px; cursor: pointer; line-height: 1; padding: 2px; }
.bbac-peek-x:hover { color: var(--bbac-ink); }
.bbac--open .bbac-peek { display: none; }

/* ---------- panel ---------- */
.bbac-panel {
	position: relative; display: none; flex-direction: column; overflow: hidden;
	background:
		radial-gradient(85% 55% at 100% 0%, rgba(245,166,35,.08), transparent 55%),
		var(--bbac-bg);
	border: 1px solid var(--bbac-line); border-radius: 22px;
	box-shadow: 0 34px 90px rgba(0,0,0,.5); color: var(--bbac-ink);
}
.bbac[data-bbac-theme="light"] .bbac-panel { box-shadow: 0 24px 70px rgba(7,16,31,.22); }
.bbac-panel::before {
	content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .6;
	background-image: linear-gradient(var(--bbac-grid) 1px, transparent 1px), linear-gradient(90deg, var(--bbac-grid) 1px, transparent 1px);
	background-size: 26px 26px; mask-image: linear-gradient(180deg, rgba(0,0,0,.6), transparent 60%);
}
.bbac--float .bbac-panel { position: fixed; bottom: 22px; right: 22px; width: 416px; max-width: calc(100vw - 32px); height: min(686px, calc(100vh - 44px)); height: min(686px, calc(100dvh - 44px)); }
.bbac--float.bbac--left .bbac-panel { right: auto; left: 22px; }
.bbac--float.bbac--open .bbac-panel { display: flex; animation: bbac-pop .24s cubic-bezier(.2,.8,.2,1); }
@keyframes bbac-pop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.bbac--inline { width: 100%; }
.bbac--inline .bbac-panel { display: flex; width: 100%; height: 100%; border-radius: 18px; }
.bbac-inline { width: 100%; }

.bbac-topbar { height: 3px; flex: 0 0 auto; background: linear-gradient(90deg, var(--bbac-cta-a), var(--bbac-cta-b), var(--bbac-cta-a)); background-size: 200% 100%; animation: bbac-slide 6s linear infinite; }
@keyframes bbac-slide { to { background-position: 200% 0; } }
/* layout contract: only the message body scrolls — everything else is fixed height */
.bbac-header, .bbac-chipbar, .bbac-inputbar, .bbac-foot { flex: 0 0 auto; }

/* ---------- header ---------- */
.bbac-header { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 15px 14px 15px 16px; background: linear-gradient(180deg, var(--bbac-elev), transparent); border-bottom: 1px solid var(--bbac-line); }
.bbac-avatar { position: relative; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--bbac-cta-a), var(--bbac-cta-b)); }
.bbac-avatar .bbac-bolt path { fill: var(--bbac-cta-fg); }
.bbac-avatar--lg { width: 44px; height: 44px; border-radius: 13px; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 8px 22px var(--bbac-cta-shadow); }
.bbac-avatar--sm { width: 28px; height: 28px; border-radius: 8px; }
.bbac-head-txt { line-height: 1.15; flex: 1 1 auto; min-width: 0; }
.bbac-title { font-family: Anton, Inter, sans-serif; font-weight: 400; font-size: 22px; letter-spacing: .6px; text-transform: uppercase; color: var(--bbac-ink); }
.bbac-sub { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: .2px; color: var(--bbac-soft); display: flex; align-items: center; gap: 6px; margin-top: 3px; min-width: 0; }
.bbac-sub-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bbac-online { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: #00E96B; animation: bbac-live 2s infinite; }
@keyframes bbac-live { 0% { box-shadow: 0 0 0 0 rgba(0,233,107,.5); } 70% { box-shadow: 0 0 0 6px rgba(0,233,107,0); } 100% { box-shadow: 0 0 0 0 rgba(0,233,107,0); } }
.bbac-reset, .bbac-close, .bbac-theme-toggle { background: transparent; border: none; color: var(--bbac-soft); cursor: pointer; width: 32px; height: 32px; padding: 0; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.bbac-reset:hover, .bbac-close:hover, .bbac-theme-toggle:hover { background: var(--bbac-elev); color: var(--bbac-ink); }
.bbac-close { font-size: 16px; }

/* ---------- body ---------- */
.bbac-body { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 14px; display: flex; flex-direction: column; gap: 13px; }
.bbac-body::-webkit-scrollbar { width: 8px; }
.bbac-body::-webkit-scrollbar-thumb { background: var(--bbac-line); border-radius: 8px; }
.bbac-msg { display: flex; gap: 9px; align-items: flex-end; max-width: 100%; }
.bbac-msg--user { justify-content: flex-end; }
.bbac-bubble { max-width: 85%; padding: 12px 15px; border-radius: 16px; font-size: 14.5px; line-height: 1.55; word-wrap: break-word; overflow-wrap: anywhere; animation: bbac-fade .2s ease; }
@keyframes bbac-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
.bbac-msg--assistant .bbac-bubble { background: var(--bbac-bubble); color: var(--bbac-ink); border: 1px solid var(--bbac-line); border-bottom-left-radius: 6px; }
.bbac-msg--user .bbac-bubble { background: linear-gradient(135deg, var(--bbac-cta-a), var(--bbac-cta-b)); color: var(--bbac-cta-fg); font-weight: 600; border-bottom-right-radius: 6px; box-shadow: 0 8px 20px var(--bbac-cta-shadow); }
.bbac-bubble p { margin: 0 0 8px; }
.bbac-bubble p:last-child { margin-bottom: 0; }
.bbac-bubble ul { margin: 6px 0; padding-left: 18px; }
.bbac-bubble li { margin: 3px 0; }
.bbac-bubble a { color: var(--bbac-linkink); font-weight: 600; }
.bbac-msg--user .bbac-bubble a { color: var(--bbac-cta-fg); text-decoration: underline; }

.bbac-dots { display: inline-flex; gap: 4px; padding: 2px 0; }
.bbac-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--bbac-accent); animation: bbac-blink 1.2s infinite ease-in-out; }
.bbac-dots i:nth-child(2) { animation-delay: .2s; background: var(--bbac-cyan); }
.bbac-dots i:nth-child(3) { animation-delay: .4s; background: var(--bbac-accent2); }
@keyframes bbac-blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* booking card */
.bbac-bubble--book { width: 100%; max-width: 100%; }
.bbac-book-row { display: flex; flex-direction: column; gap: 7px; }
.bbac-book-btn { background: linear-gradient(135deg, var(--bbac-cta-a), var(--bbac-cta-b)); color: var(--bbac-cta-fg); border: none; font-weight: 800; padding: 12px 14px; border-radius: 12px; cursor: pointer; font-size: 14px; box-shadow: 0 8px 20px var(--bbac-cta-shadow); }
.bbac-book-btn:hover { filter: brightness(1.05); }
.bbac-book-btn:disabled { opacity: .7; cursor: default; }
.bbac-book-call { font-size: 12.5px; color: var(--bbac-soft); text-decoration: none; text-align: center; }
.bbac-book-fallbackbtn { display: inline-block; background: linear-gradient(135deg, var(--bbac-cta-a), var(--bbac-cta-b)); color: var(--bbac-cta-fg); font-weight: 800; padding: 11px 14px; border-radius: 11px; text-decoration: none; }
.bbac-cal { width: 100%; min-height: 470px; background: #fff; border-radius: 10px; overflow: hidden; margin-top: 10px; }
.bbac-cal-fallback { display: inline-block; margin-top: 8px; font-size: 12.5px; color: var(--bbac-linkink); }

/* lead form */
.bbac-lead { display: flex; flex-direction: column; gap: 8px; }
.bbac-lead-h { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.bbac-lead input { width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 14px; border: 1px solid var(--bbac-line); background: var(--bbac-field); color: var(--bbac-ink); }
.bbac-lead input::placeholder { color: var(--bbac-muted); }
.bbac-lead-send { background: linear-gradient(135deg, var(--bbac-cta-a), var(--bbac-cta-b)); color: var(--bbac-cta-fg); border: none; font-weight: 800; padding: 11px; border-radius: 11px; cursor: pointer; box-shadow: 0 8px 20px var(--bbac-cta-shadow); }
.bbac-lead-skip { background: transparent; border: none; color: var(--bbac-muted); font-size: 12.5px; cursor: pointer; }

/* ---------- starter quick-replies (under greeting, empty state only) ---------- */
.bbac-starter { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 2px 37px; animation: bbac-fade .25s ease; }
.bbac-chip { cursor: pointer; flex: 0 1 auto; max-width: 100%; font-size: 13px; font-weight: 600; color: var(--bbac-ink); background: var(--bbac-elev); border: 1px solid var(--bbac-line); padding: 9px 14px; border-radius: 999px; transition: transform .14s ease, background .14s ease, border-color .14s ease; white-space: normal; line-height: 1.2; }
.bbac-chip:hover { background: linear-gradient(135deg, var(--bbac-cta-a), var(--bbac-cta-b)); border-color: transparent; color: var(--bbac-cta-fg); transform: translateY(-1px); box-shadow: 0 6px 16px var(--bbac-cta-shadow); }
.bbac-chip:disabled { opacity: .4; cursor: default; transform: none; }

/* ---------- input ---------- */
.bbac-inputbar { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; padding: 12px 14px 14px; border-top: 1px solid var(--bbac-line); }
.bbac-input { flex: 1 1 auto; min-width: 0; height: 46px; padding: 0 18px; border-radius: 999px; font-size: 14.5px; border: 1px solid var(--bbac-line); background: var(--bbac-field); color: var(--bbac-ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.bbac-input:focus { border-color: var(--bbac-cta-b); box-shadow: 0 0 0 3px var(--bbac-cta-shadow); }
.bbac-input::placeholder { color: var(--bbac-muted); }
.bbac-input:disabled { opacity: .6; }
.bbac-send { flex: 0 0 auto; width: 46px; height: 46px; border: none; cursor: pointer; border-radius: 50%; background: linear-gradient(135deg, var(--bbac-cta-a), var(--bbac-cta-b)); color: var(--bbac-cta-fg); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px var(--bbac-cta-shadow); transition: transform .14s ease, filter .14s ease; }
.bbac-send:hover { filter: brightness(1.07); transform: translateY(-1px); }
.bbac-send:disabled { opacity: .5; cursor: default; box-shadow: none; transform: none; }

.bbac-foot { position: relative; z-index: 1; text-align: center; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; letter-spacing: .2px; color: var(--bbac-muted); padding: 0 0 10px; }
.bbac-foot a { color: var(--bbac-soft); text-decoration: none; }

/* ---------- mobile ---------- */
@media (max-width: 480px) {
	.bbac--float .bbac-panel {
		width: 100vw; max-width: 100vw; left: 0; right: 0; bottom: 0; border-radius: 0;
		height: 100vh; height: 100dvh;
	}
	.bbac--float { bottom: 16px; right: 16px; }
	.bbac--float.bbac--left { left: 16px; }
	.bbac-peek { width: min(270px, calc(100vw - 90px)); }
	.bbac-launcher-txt { display: none; }
	.bbac-launcher { padding: 15px; }
	.bbac-cal { min-height: 60vh; }
}
/* tablets / short screens: keep the panel inside the viewport */
@media (min-width: 481px) and (max-width: 900px) {
	.bbac--float .bbac-panel { height: min(640px, calc(100dvh - 40px)); }
}
