/*
 * The voice helper (Vapi widget, pasted into the live footer) — "Talk to the Shop".
 * The widget draws its own black pill; this skins it in the Blackout look and
 * assistant.js parks it by the "Start a project" button instead of bottom-right,
 * where it covered the accessibility button.
 * Animates only transform, opacity and background-position.
 */
.oss-assist { z-index: 99990 !important; }

.oss-assist:not(.oss-assist--open) > div {
	position: relative;
	height: 44px !important;
	padding: 0 18px 0 12px !important;
	border-radius: 2px !important;
	background: #0b0b0b !important;
	border: 1px solid rgba(255, 106, 40, .55);
	box-shadow: 0 6px 22px rgba(0, 0, 0, .55) !important;
	overflow: visible;
	isolation: isolate;
}

/* Fire bar along the bottom, sliding (matches the red bar under the buttons). */
.oss-assist:not(.oss-assist--open) > div::after {
	content: "";
	position: absolute;
	left: -1px; right: -1px; bottom: -1px;
	height: 3px;
	background: linear-gradient(90deg, #7a0d0d, #ff3b1f, #ff9a2e, #ff3b1f, #7a0d0d);
	background-size: 300% 100%;
	animation: oss-assist-bar 3.2s linear infinite;
}

/* Soft ring breathing out from the pill: says "tap me" without shouting. */
.oss-assist:not(.oss-assist--open) > div::before {
	content: "";
	position: absolute;
	inset: -1px;
	border: 1px solid rgba(255, 106, 40, .75);
	border-radius: 2px;
	pointer-events: none;
	z-index: -1;
	animation: oss-assist-ring 2.6s ease-out infinite;
}

/* The wave icon: orange, slowly turning. */
.oss-assist:not(.oss-assist--open) svg { animation: oss-assist-spin 9s linear infinite; }
.oss-assist:not(.oss-assist--open) svg rect { fill: #ff6a28 !important; }
.oss-assist:not(.oss-assist--open) svg circle { stroke: #ff6a28 !important; }

/* New name, drawn here so the widget's own text is left alone. */
.oss-assist:not(.oss-assist--open) span { font-size: 0 !important; }
.oss-assist:not(.oss-assist--open) span::after {
	content: "Talk to the Shop";
	display: block;
	color: #f1ece4;
	font: 900 15px/1 "Big Shoulders Display", Impact, sans-serif;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
}

.oss-assist:not(.oss-assist--open) > div:hover { border-color: #ff9a2e; }
.oss-assist:not(.oss-assist--open) > div:hover span::after { color: #ff9a2e; }

@keyframes oss-assist-bar  { to { background-position: -300% 0; } }
@keyframes oss-assist-ring {
	0%   { transform: scale(1);              opacity: .8; }
	70%  { transform: scale(1.14, 1.5);      opacity: 0; }
	100% { transform: scale(1.14, 1.5);      opacity: 0; }
}
@keyframes oss-assist-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.oss-assist:not(.oss-assist--open) > div::after,
	.oss-assist:not(.oss-assist--open) > div::before,
	.oss-assist:not(.oss-assist--open) svg { animation: none; }
}

/* Chat window open (the widget swaps the pill for a 28rem x 40rem panel):
   keep it on screen, under the header, whatever the screen size. */
.oss-assist--open > div {
	width: min(28rem, calc(100vw - 16px)) !important;
	height: min(40rem, calc(100vh - var(--oss-assist-top, 90px) - 16px)) !important;
}
