/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

.chat-pet-host {
	position: relative;
}

.chat-pet-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.chat-pet-overlay.relocating {
	position: fixed;
	z-index: 14;
}

.chat-pet-overlay.relocating > .chat-pet-button {
	pointer-events: none;
}

.interactive-session.chat-floating-persistent-content .chat-pet-overlay.chat-pet-run-layer {
	isolation: isolate;
}

.interactive-session.chat-floating-persistent-content .chat-pet-overlay.chat-pet-run-layer > .chat-pet-button {
	z-index: 1;
}

.chat-pet-button {
	position: absolute;
	right: var(--vscode-spacing-size320);
	bottom: 100%;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	outline: none;
	background: transparent;
	cursor: grab;
	overflow: visible;
	pointer-events: auto;
	touch-action: none;
	transition: transform 200ms ease-out;
}

.chat-pet-button.hidden {
	display: none;
}

.chat-pet-button.dragging {
	cursor: grabbing;
	will-change: translate;
	/* The tree sticky-scroll container uses 13. Keep the active drag above it. */
	z-index: 14;
}

.chat-pet-button,
.chat-pet-respawn-effect {
	z-index: 1;
}

.chat-pet-bounce-counter {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 24px;
	height: 24px;
	padding: 0 var(--vscode-spacing-size60);
	border-radius: var(--vscode-cornerRadius-circle);
	background: var(--vscode-badge-background);
	color: var(--vscode-badge-foreground);
	font-size: var(--vscode-fontSize-label2);
	font-weight: var(--vscode-fontWeight-semiBold);
	font-variant-numeric: tabular-nums;
	line-height: 1;
	pointer-events: none;
	transform: translate(-25%, -50%);
}

.chat-pet-bounce-counter.hidden {
	display: none;
}

.chat-pet-confetti-anchor {
	position: absolute;
	pointer-events: none;
}

.hc-black .chat-pet-bounce-counter,
.hc-light .chat-pet-bounce-counter {
	border: var(--vscode-strokeThickness) solid var(--vscode-contrastBorder);
}

.chat-pet-button.falling {
	cursor: default;
	pointer-events: none;
	transition: top 180ms cubic-bezier(0.42, 0, 1, 1);
}

.chat-pet-overlay.relocating > .chat-pet-button.falling {
	transition-property: top, left;
}

.chat-pet-button.throwing {
	cursor: default;
	pointer-events: none;
	transition: none;
	will-change: left, top, transform;
}

.chat-pet-button.dragging.soft-resisting {
	animation: chat-pet-drag-soft-resist 240ms steps(2, end) infinite;
}

.chat-pet-button.dragging.resisting {
	animation: chat-pet-drag-resist 120ms steps(2, end) infinite;
}

.chat-pet-button.entering {
	animation: chat-pet-enter 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.chat-pet-button.exiting {
	pointer-events: none;
	animation: chat-pet-exit 220ms ease-in forwards;
}

@keyframes chat-pet-enter {
	0% {
		opacity: 0;
		transform: translateY(var(--vscode-spacing-size160)) scale(0.5) rotate(-12deg);
	}

	65% {
		opacity: 1;
		transform: translateY(calc(-1 * var(--vscode-spacing-size40))) scale(1.08) rotate(4deg);
	}

	100% {
		opacity: 1;
		transform: translateY(0) scale(1) rotate(0);
	}
}

@keyframes chat-pet-exit {
	0% {
		opacity: 1;
		transform: translateY(0) scale(1) rotate(0);
	}

	35% {
		transform: translateY(calc(-1 * var(--vscode-spacing-size40))) scale(1.04) rotate(-4deg);
	}

	100% {
		opacity: 0;
		transform: translateY(var(--vscode-spacing-size160)) scale(0.55) rotate(10deg);
	}
}

.monaco-workbench .chat-pet-overlay > .chat-pet-button:focus {
	outline: none;
}

.chat-pet-visual {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 48px;
	height: 48px;
	transform-origin: bottom left;
	pointer-events: none;
}

.chat-pet-sprite {
	position: absolute;
	bottom: 0;
	left: 0;
	display: block;
	width: 48px;
	height: 48px;
	overflow: hidden;
	image-rendering: pixelated;
	pointer-events: none;
}

.chat-pet-sprite.hidden {
	display: none;
}

.chat-pet-eye-accessory {
	position: absolute;
	bottom: 0;
	left: 0;
	display: block;
	width: 48px;
	height: 48px;
	overflow: hidden;
	image-rendering: pixelated;
	pointer-events: none;
}

.chat-pet-propeller-pose {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 48px;
	height: 48px;
	pointer-events: none;
	transform-origin: 30% 80%;
}

.chat-pet-propeller {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.chat-pet-propeller.hidden {
	display: none;
}

.chat-pet-propeller-canvas {
	display: block;
	width: 48px;
	height: 48px;
	image-rendering: pixelated;
	pointer-events: none;
	transform-origin: 50% 12.5%;
}

.chat-pet-eye-accessory.hidden {
	display: none;
}

.chat-pet-eye-accessory-canvas {
	display: block;
	height: 48px;
	image-rendering: pixelated;
	pointer-events: none;
}

.chat-pet-button[data-facing='left'] .chat-pet-sprite,
.chat-pet-button[data-facing='left'] .chat-pet-eye-accessory,
.chat-pet-button[data-facing='left'] .chat-pet-propeller {
	right: 0;
	left: auto;
}

.chat-pet-button[data-facing='left'] .chat-pet-propeller {
	transform: scaleX(-1);
}

.chat-pet-button[data-facing='left'] .chat-pet-sprite > .chat-pet-canvas,
.chat-pet-button[data-facing='left'] .chat-pet-eye-accessory-canvas {
	transform: scaleX(-1);
}

.chat-pet-button[data-facing='left'] .chat-pet-eye-accessory.fixed-orientation .chat-pet-eye-accessory-canvas {
	transform: none;
}

.chat-pet-button[data-facing='left'][data-state='sing'] .chat-pet-sprite > .chat-pet-canvas,
.chat-pet-button[data-facing='left'][data-state='sing'] .chat-pet-eye-accessory-canvas {
	transform: none;
}

.chat-pet-canvas {
	display: block;
	height: 48px;
	image-rendering: pixelated;
	pointer-events: none;
}

.chat-pet-spritesheet {
	display: none;
}

.chat-pet-respawn-effect {
	position: absolute;
	width: 48px;
	height: 48px;
	image-rendering: pixelated;
	pointer-events: none;
}

.chat-pet-respawn-effect.hidden {
	display: none;
}

.chat-pet-speech-bubble {
	position: absolute;
	left: var(--vscode-spacing-size40);
	top: calc(-1 * var(--vscode-spacing-size320));
	display: block;
	width: 72px;
	height: 72px;
	overflow: hidden;
	image-rendering: pixelated;
	pointer-events: none;
}

.chat-pet-speech-canvas {
	width: 72px;
	height: 72px;
}

.chat-pet-speech-bubble.hidden {
	display: none;
}

.chat-pet-button[data-state='rendering'].speech-bubble-left .chat-pet-speech-bubble {
	left: calc(-1 * var(--vscode-spacing-size280));
	transform: scaleX(-1);
}

.chat-pet-button.dragging .chat-pet-speech-bubble,
.chat-pet-button.throwing .chat-pet-speech-bubble {
	display: none;
}

.chat-pet-button[data-state='complete'] .chat-pet-sprite,
.chat-pet-button[data-state='complete'] .chat-pet-eye-accessory {
	transform-origin: 50% 60%;
	animation: chat-pet-complete-motion 960ms steps(1, end);
}

.chat-pet-button[data-state='jump'][data-hop-direction='left'] .chat-pet-sprite > .chat-pet-canvas,
.chat-pet-button[data-state='jump'][data-hop-direction='left'] .chat-pet-eye-accessory-canvas {
	transform: scaleX(-1);
}

.chat-pet-button[data-state='jump'][data-hop-direction='right'] .chat-pet-sprite > .chat-pet-canvas,
.chat-pet-button[data-state='jump'][data-hop-direction='right'] .chat-pet-eye-accessory-canvas {
	transform: none;
}

.chat-pet-button[data-state='yapping'] .chat-pet-sprite,
.chat-pet-button[data-state='yapping'] .chat-pet-eyes,
.chat-pet-button[data-state='yapping'] .chat-pet-eye-accessory,
.chat-pet-button[data-state='yapping'] .chat-pet-propeller-pose {
	transform-origin: 30% 80%;
	animation: chat-pet-yapping-fall 480ms steps(4, end) forwards;
}

.chat-pet-button[data-state='yappingMouthOpen'] .chat-pet-sprite,
.chat-pet-button[data-state='yappingMouthOpen'] .chat-pet-eye-accessory,
.chat-pet-button[data-state='yappingMouthOpen'] .chat-pet-propeller-pose {
	transform-origin: 30% 80%;
	transform: translateY(calc(-1 * var(--vscode-spacing-size40))) rotate(-90deg);
}

.chat-pet-button[data-propeller='true'][data-state='falling'] .chat-pet-propeller-canvas {
	animation: chat-pet-propeller-spin 320ms steps(1, end) infinite;
}

.chat-pet-button[data-propeller='true'].falling {
	transition-timing-function: linear;
}

.chat-pet-button[data-propeller='true'][data-state='falling'].animation-paused .chat-pet-propeller-canvas {
	animation-play-state: paused;
}

.chat-pet-button.on-the-run,
.chat-pet-button.returning-from-run {
	z-index: auto;
}

.chat-pet-button.on-the-run {
	transform: translateY(var(--vscode-spacing-size400));
}

.chat-pet-button.dragging .chat-pet-sprite,
.chat-pet-button.dragging .chat-pet-eyes,
.chat-pet-button.dragging .chat-pet-eye-accessory {
	transform: none;
	animation: none;
}

.chat-pet-eyes {
	color: #191a1b;
	position: absolute;
	inset: 0;
	visibility: hidden;
	pointer-events: none;
}

.chat-pet-eyes.tracking,
.chat-pet-eyes.blinking {
	visibility: visible;
}

.chat-pet-eyes.bobbed {
	transform: translateY(var(--vscode-spacing-size20));
}

.chat-pet-eye {
	position: absolute;
	top: 30px;
	width: 8px;
	height: 8px;
	overflow: hidden;
}

.chat-pet-eye.left {
	left: 18px;
}

.chat-pet-eye.right {
	left: 30px;
}

.chat-pet-button[data-facing='left'] .chat-pet-eye.left {
	left: 22px;
}

.chat-pet-button[data-facing='left'] .chat-pet-eye.right {
	left: 10px;
}

.chat-pet-pupil {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 4px;
	height: 4px;
	background: currentColor;
}

.chat-pet-button[data-state='idle'] .chat-pet-eye,
.chat-pet-button[data-state='rendering'] .chat-pet-eye,
.chat-pet-button[data-state='achievementUnlocked'] .chat-pet-eye,
.chat-pet-button[data-state='clapping'] .chat-pet-eye,
.chat-pet-button[data-state='yapping'] .chat-pet-eye,
.chat-pet-button[data-state='typing'] .chat-pet-eye,
.chat-pet-button[data-state='painting'] .chat-pet-eye,
.chat-pet-button[data-state='buttonPress'] .chat-pet-eye {
	height: 12px;
}

.chat-pet-button[data-state='idle'] .chat-pet-pupil,
.chat-pet-button[data-state='rendering'] .chat-pet-pupil,
.chat-pet-button[data-state='achievementUnlocked'] .chat-pet-pupil,
.chat-pet-button[data-state='clapping'] .chat-pet-pupil,
.chat-pet-button[data-state='yapping'] .chat-pet-pupil,
.chat-pet-button[data-state='typing'] .chat-pet-pupil,
.chat-pet-button[data-state='painting'] .chat-pet-pupil,
.chat-pet-button[data-state='buttonPress'] .chat-pet-pupil {
	height: 8px;
}

.chat-pet-button[data-state='love'] .chat-pet-eye {
	top: 31px;
	height: 11px;
}

.chat-pet-button[data-state='love'] .chat-pet-pupil {
	height: 7px;
}

.chat-pet-eyes.blink .chat-pet-pupil {
	animation: chat-pet-eye-blink 260ms steps(1, end);
}

.chat-pet-button[data-state='idle'] .chat-pet-eyes.blink .chat-pet-pupil,
.chat-pet-button[data-state='rendering'] .chat-pet-eyes.blink .chat-pet-pupil,
.chat-pet-button[data-state='achievementUnlocked'] .chat-pet-eyes.blink .chat-pet-pupil,
.chat-pet-button[data-state='clapping'] .chat-pet-eyes.blink .chat-pet-pupil,
.chat-pet-button[data-state='yapping'] .chat-pet-eyes.blink .chat-pet-pupil,
.chat-pet-button[data-state='typing'] .chat-pet-eyes.blink .chat-pet-pupil,
.chat-pet-button[data-state='painting'] .chat-pet-eyes.blink .chat-pet-pupil,
.chat-pet-button[data-state='buttonPress'] .chat-pet-eyes.blink .chat-pet-pupil,
.chat-pet-button[data-state='love'] .chat-pet-eyes.blink .chat-pet-pupil {
	animation-name: chat-pet-tall-eye-blink;
}

.chat-pet-button.dragging .chat-pet-pupil {
	visibility: hidden;
}

.chat-pet-button.dragging .chat-pet-eye::before,
.chat-pet-button.dragging .chat-pet-eye::after {
	content: '';
	position: absolute;
	top: 5px;
	left: 0;
	width: 8px;
	height: 2px;
	background: currentColor;
}

.chat-pet-button.dragging .chat-pet-eye::before {
	transform: rotate(45deg);
}

.chat-pet-button.dragging .chat-pet-eye::after {
	transform: rotate(-45deg);
}

@keyframes chat-pet-drag-resist {
	0%,
	100% {
		transform: translateX(calc(-1 * var(--vscode-spacing-size20))) rotate(-2deg);
	}

	50% {
		transform: translateX(var(--vscode-spacing-size20)) rotate(2deg);
	}
}

@keyframes chat-pet-drag-soft-resist {
	0%,
	100% {
		transform: translateX(-1px) rotate(-1deg);
	}

	50% {
		transform: translateX(1px) rotate(1deg);
	}
}

@keyframes chat-pet-complete-motion {
	0% {
		transform: translateY(0) rotate(0);
	}

	14.2857% {
		transform: translateY(calc(-1 * var(--vscode-spacing-size40))) rotate(51deg);
	}

	28.5714% {
		transform: translateY(calc(-1 * var(--vscode-spacing-size80))) rotate(103deg);
	}

	42.8571% {
		transform: translateY(calc(-1 * var(--vscode-spacing-size80))) rotate(154deg);
	}

	57.1429% {
		transform: translateY(calc(-1 * var(--vscode-spacing-size80))) rotate(206deg);
	}

	71.4286% {
		transform: translateY(calc(-1 * var(--vscode-spacing-size80))) rotate(257deg);
	}

	85.7143% {
		transform: translateY(calc(-1 * var(--vscode-spacing-size40))) rotate(309deg);
	}

	100% {
		transform: translateY(0) rotate(360deg);
	}
}

@keyframes chat-pet-yapping-fall {
	0% {
		transform: translateY(0) rotate(0);
	}

	100% {
		transform: translateY(calc(-1 * var(--vscode-spacing-size40))) rotate(-90deg);
	}
}

@keyframes chat-pet-propeller-spin {
	0%,
	100% {
		transform: rotate(0);
	}

	25% {
		transform: rotate(90deg);
	}

	50% {
		transform: rotate(180deg);
	}

	75% {
		transform: rotate(270deg);
	}
}

@keyframes chat-pet-eye-blink {
	0%,
	11.537%,
	88.462%,
	100% {
		clip-path: inset(0);
	}

	11.538%,
	88.461% {
		clip-path: inset(1px 0);
	}
}

@keyframes chat-pet-tall-eye-blink {
	0%,
	11.537%,
	88.462%,
	100% {
		clip-path: inset(0);
	}

	11.538%,
	88.461% {
		clip-path: inset(3px 0);
	}
}

.monaco-workbench.monaco-reduce-motion .chat-pet-button {
	transition: none;
}

.chat-pet-overlay > .chat-pet-button.animation-paused.dragging,
.chat-pet-button.animation-paused .chat-pet-sprite,
.chat-pet-button.animation-paused .chat-pet-eye-accessory,
.chat-pet-button.animation-paused .chat-pet-propeller-pose,
.chat-pet-button.animation-paused .chat-pet-pupil {
	animation-play-state: paused;
}

.monaco-workbench.monaco-reduce-motion .chat-pet-button.entering,
.monaco-workbench.monaco-reduce-motion .chat-pet-button.exiting,
.monaco-workbench.monaco-reduce-motion .chat-pet-button.dragging.soft-resisting,
.monaco-workbench.monaco-reduce-motion .chat-pet-button.dragging.resisting,
.monaco-workbench.monaco-reduce-motion .chat-pet-button[data-state='complete'] .chat-pet-sprite,
.monaco-workbench.monaco-reduce-motion .chat-pet-button[data-state='complete'] .chat-pet-eye-accessory,
.monaco-workbench.monaco-reduce-motion .chat-pet-button[data-propeller='true'] .chat-pet-propeller-canvas,
.monaco-workbench.monaco-reduce-motion .chat-pet-button[data-state='yapping'] .chat-pet-sprite,
.monaco-workbench.monaco-reduce-motion .chat-pet-button[data-state='yapping'] .chat-pet-eye-accessory,
.monaco-workbench.monaco-reduce-motion .chat-pet-button[data-state='yapping'] .chat-pet-propeller-pose,
.monaco-workbench.monaco-reduce-motion .chat-pet-eyes,
.monaco-workbench.monaco-reduce-motion .chat-pet-pupil {
	animation: none;
}

.monaco-workbench.monaco-reduce-motion .chat-pet-button[data-state='yapping'] .chat-pet-sprite,
.monaco-workbench.monaco-reduce-motion .chat-pet-button[data-state='yapping'] .chat-pet-eyes,
.monaco-workbench.monaco-reduce-motion .chat-pet-button[data-state='yapping'] .chat-pet-eye-accessory,
.monaco-workbench.monaco-reduce-motion .chat-pet-button[data-state='yapping'] .chat-pet-propeller-pose {
	transform: translateY(calc(-1 * var(--vscode-spacing-size40))) rotate(-90deg);
}
