/* HBCOC Assistant: navy + gold, matches hbcoc-site-nav / premium tokens. */
#hbcoc-assistant {
	--hba-navy: #151923;
	--hba-navy-2: #0F131C;
	--hba-card: #1C2130;
	--hba-line: #2E3446;
	--hba-text: #ECEDF1;
	--hba-soft: #CDD0D8;
	--hba-muted: #8E94A3;
	--hba-gold: #D6A84E;
	--hba-gold-2: #F4D688;
	--hba-gold-3: #C08A3A;
	--hba-grad: linear-gradient(135deg, #F4D688 0%, #D6A84E 55%, #C08A3A 100%);
	--hba-ease: cubic-bezier(.2, .7, .2, 1);
	position: fixed;
	right: max(16px, env(safe-area-inset-right));
	bottom: max(16px, env(safe-area-inset-bottom));
	z-index: 99990;
	font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--hba-text);
}
#hbcoc-assistant *, #hbcoc-assistant *::before, #hbcoc-assistant *::after { box-sizing: border-box; }
#hbcoc-assistant button { font: inherit; cursor: pointer; }
#hbcoc-assistant svg { width: 20px; height: 20px; display: block; flex: none; }

/* launcher: the header "Banquet Tickets" liquid-metal button (hbcoc-site-nav v3.2),
   copied 1:1. A gold metal layer (shader canvas, or a static conic gradient
   without WebGL) shows as a 2px rim around a lit gold face. */
@keyframes hba-ripple {
	0% { transform: translate(-50%, -50%) scale(0); opacity: .55; }
	100% { transform: translate(-50%, -50%) scale(5); opacity: 0; }
}
#hbcoc-assistant .hba-launch {
	--hba-r: 12px;
	position: relative;
	display: inline-flex; align-items: center; justify-content: center; gap: 9px;
	min-height: 44px; padding: 0 22px;
	overflow: hidden; isolation: isolate;
	border: 0; border-radius: var(--hba-r);
	background: transparent;
	color: #1E1508;
	text-shadow: 0 1px 0 rgba(255, 243, 205, .5);
	font: 700 14px/1 "Plus Jakarta Sans", system-ui, sans-serif;
	letter-spacing: .1px; white-space: nowrap;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, .35),
		0 2px 5px rgba(0, 0, 0, .18),
		0 9px 9px rgba(0, 0, 0, .14),
		0 20px 12px rgba(0, 0, 0, .08);
	transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), box-shadow .15s cubic-bezier(.4, 0, .2, 1), opacity .2s;
}
.hba-metal {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	border-radius: inherit;
	pointer-events: none;
}
/* Rainbow rim: a big conic-gradient disc spinning behind the face. */
.hba-metal::before {
	content: "";
	position: absolute;
	left: 50%; top: 50%;
	width: 260px; height: 260px;
	margin: -130px 0 0 -130px;
	background: conic-gradient(#ff3b3b, #ff9a2e, #ffe14a, #4be26a, #2fd4ff, #4a6bff, #b04aff, #ff4fb3, #ff3b3b);
	filter: saturate(1.15) brightness(1.05);
	animation: hba-spin 4s linear infinite;
}
#hbcoc-assistant .hba-launch:hover .hba-metal::before { animation-duration: 2s; filter: saturate(1.35) brightness(1.15); }
@keyframes hba-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hba-metal::before { animation: none; } }
/* Face: inset 2px so the metal shows as a rim. */
#hbcoc-assistant .hba-launch::before {
	content: "";
	position: absolute; inset: 2px; z-index: 1;
	border-radius: calc(var(--hba-r) - 2px);
	background:
		radial-gradient(120% 90% at 50% -20%, rgba(255, 249, 226, .7) 0%, rgba(255, 249, 226, 0) 55%),
		linear-gradient(180deg, #F6DD97 0%, #E6BE66 40%, #CF9C43 72%, #B98232 100%);
	pointer-events: none;
	transition: box-shadow .15s cubic-bezier(.4, 0, .2, 1);
}
#hbcoc-assistant .hba-launch > :not(.hba-metal):not(.hba-ripple) { position: relative; z-index: 2; }
#hbcoc-assistant .hba-launch svg { width: 16px; height: 16px; margin-left: -2px; }
#hbcoc-assistant .hba-launch:hover {
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, .4),
		0 1px 2px rgba(0, 0, 0, .2),
		0 4px 4px rgba(0, 0, 0, .15),
		0 8px 5px rgba(0, 0, 0, .1),
		0 12px 6px rgba(0, 0, 0, .05);
}
#hbcoc-assistant .hba-launch:active { transform: translateY(1px) scale(.98); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 1px 2px rgba(0, 0, 0, .3); }
#hbcoc-assistant .hba-launch:active::before { box-shadow: inset 0 2px 4px rgba(0, 0, 0, .4), inset 0 1px 2px rgba(0, 0, 0, .3); }
.hba-ripple {
	position: absolute; z-index: 3;
	width: 20px; height: 20px; border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, .45) 0%, rgba(255, 255, 255, 0) 70%);
	pointer-events: none;
	animation: hba-ripple .6s ease-out forwards;
}
#hbcoc-assistant .hba-launch:focus-visible { outline: 2px solid var(--hba-gold-2); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
	#hbcoc-assistant .hba-launch, #hbcoc-assistant .hba-launch:active { transform: none; }
}
#hbcoc-assistant button:focus-visible, #hbcoc-assistant textarea:focus-visible { outline: 2px solid var(--hba-gold-2); outline-offset: 2px; }
#hbcoc-assistant.is-open .hba-launch { opacity: 0; pointer-events: none; transform: scale(.9); }
/* Out of the way while the site's mobile menu overlay is open. */
html:has(.hbn.is-open) #hbcoc-assistant:not(.is-open) .hba-launch { opacity: 0; visibility: hidden; pointer-events: none; }

/* panel */
.hba-panel {
	position: absolute; right: 0; bottom: 0;
	width: min(400px, calc(100vw - 32px));
	height: min(640px, calc(100vh - 40px));
	height: min(640px, calc(100dvh - 40px));
	display: flex; flex-direction: column;
	background: var(--hba-navy);
	border: 1px solid var(--hba-line);
	border-radius: 18px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
	overflow: hidden;
	animation: hba-in .32s var(--hba-ease);
}
.hba-panel[hidden] { display: none; }
@keyframes hba-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.hba-head {
	display: flex; align-items: center; gap: 12px;
	padding: 14px 14px 14px 16px;
	background: var(--hba-navy-2);
	border-bottom: 1px solid var(--hba-line);
}
.hba-mark {
	width: 38px; height: 38px; border-radius: 50%; flex: none;
	display: grid; place-items: center;
	background: var(--hba-grad); color: #1A1406;
	font-weight: 800; font-size: 14px;
}
.hba-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hba-title strong { font-size: 15px; font-weight: 700; color: var(--hba-text); }
.hba-title span { font-size: 12.5px; color: var(--hba-muted); }
.hba-reset, .hba-close {
	border: 1px solid var(--hba-line); background: transparent; color: var(--hba-soft);
	height: 34px; border-radius: 10px; display: grid; place-items: center;
	transition: background .2s, color .2s;
}
.hba-reset { padding: 0 10px; font-size: 12.5px !important; font-weight: 600 !important; }
.hba-close { width: 34px; }
.hba-reset:hover, .hba-close:hover { background: var(--hba-card); color: var(--hba-text); }

/* messages */
.hba-log {
	flex: 1; overflow-y: auto; overscroll-behavior: contain;
	padding: 16px; display: flex; flex-direction: column; gap: 10px;
	scrollbar-width: thin; scrollbar-color: var(--hba-line) transparent;
}
.hba-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; word-wrap: break-word; overflow-wrap: anywhere; }
.hba-msg p { margin: 0 0 .55em; }
.hba-msg p:last-child, .hba-msg ul:last-child, .hba-msg ol:last-child { margin-bottom: 0; }
.hba-msg ul, .hba-msg ol { margin: 0 0 .55em; padding-left: 1.25em; }
.hba-msg li { margin: .2em 0; }
.hba-msg strong { font-weight: 700; color: #fff; }
.hba-assistant { align-self: flex-start; background: var(--hba-card); border: 1px solid var(--hba-line); border-bottom-left-radius: 5px; }
.hba-assistant a { color: var(--hba-gold-2); text-decoration: underline; text-underline-offset: 2px; }
.hba-assistant a:hover { color: #fff; }
.hba-user { align-self: flex-end; background: var(--hba-grad); color: #1A1406; border-bottom-right-radius: 5px; font-weight: 600; }

.hba-dots { display: inline-flex; gap: 5px; padding: 4px 2px; }
.hba-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--hba-muted); animation: hba-dot 1.1s infinite ease-in-out; }
.hba-dots i:nth-child(2) { animation-delay: .15s; }
.hba-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes hba-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* quick topics */
.hba-chips {
	display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 2px;
	border-top: 1px solid var(--hba-line);
}
.hba-chips:empty { display: none; }
.hba-chip {
	flex: none; white-space: nowrap; line-height: 1.2 !important;
	border: 1px solid rgba(214, 168, 78, .45); background: rgba(214, 168, 78, .08); color: var(--hba-gold-2);
	border-radius: 999px; padding: 6px 12px; font-size: 12.5px !important; font-weight: 600 !important;
	transition: background .2s, border-color .2s;
}
.hba-chip:hover { background: rgba(214, 168, 78, .18); border-color: var(--hba-gold); }

/* input */
.hba-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 6px 16px; }
.hba-form textarea {
	flex: 1; resize: none; min-height: 44px; max-height: 120px;
	padding: 11px 14px; border-radius: 12px;
	border: 1px solid var(--hba-line); background: var(--hba-card); color: var(--hba-text);
	font: inherit; font-size: 16px; line-height: 1.35;
}
.hba-form textarea::placeholder { color: var(--hba-muted); }
.hba-send {
	width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px;
	background: var(--hba-grad); color: #1A1406; display: grid; place-items: center;
}
.hba-form.is-busy .hba-send { opacity: .5; pointer-events: none; }
.hba-foot { margin: 0; padding: 2px 16px 12px; font-size: 11.5px; color: var(--hba-muted); }
.hba-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* phones: full-screen sheet */
@media (max-width: 600px) {
	#hbcoc-assistant.is-open { inset: 0; right: 0; bottom: 0; }
	.hba-panel {
		position: fixed; inset: 0; width: 100%; height: 100%;
		border-radius: 0; border: 0;
		padding-bottom: env(safe-area-inset-bottom);
	}
	.hba-msg { max-width: 92%; }
}
html.hba-lock, html.hba-lock body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.hba-panel, .hba-dots i, .hba-launch { animation: none !important; transition: none !important; }
}
@media print { #hbcoc-assistant { display: none !important; } }
