sel-chat-coach / src /app /globals.css
james-d-taboola's picture
feat: improve coach modal open/close animation symmetry
8d54069
@tailwind base;
@tailwind components;
@tailwind utilities;
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
/* Custom scrollbar for selector containers */
.overflow-y-auto::-webkit-scrollbar {
width: 6px;
}
.overflow-y-auto::-webkit-scrollbar-track {
background: transparent;
}
.overflow-y-auto::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 3px;
}
.overflow-y-auto::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}
/* Coach modal shrink animation */
@keyframes shrink-to-button {
0% {
transform: translate(0, 0) scale(1);
opacity: 1;
}
100% {
transform: translate(var(--target-x), var(--target-y)) scale(0);
opacity: 0;
}
}
.animate-shrink-to-button {
animation: shrink-to-button 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes fade-out {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
.animate-fade-out {
animation: fade-out 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
/* Speech bubble bounce-in animation */
@keyframes bounce-in {
0% {
transform: scale(0) translateY(20px);
opacity: 0;
}
50% {
transform: scale(1.05) translateY(-5px);
}
100% {
transform: scale(1) translateY(0);
opacity: 1;
}
}
.animate-bounce-in {
animation: bounce-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
/* Expand from coach button animation - reverse of shrink-to-coach-button */
@keyframes expand-from-coach-button {
0% {
transform: translate(var(--translate-x), var(--translate-y)) scale(0);
opacity: 0;
}
100% {
transform: translate(0, 0) scale(1);
opacity: 1;
}
}
.animate-expand-from-coach-button {
animation: expand-from-coach-button 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
transform-origin: center center;
}
/* Speech bubble scale-out animation */
@keyframes scale-out {
0% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(0);
opacity: 0;
}
}
.animate-scale-out {
animation: scale-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
transform-origin: bottom left;
}
/* Shrink to coach button animation */
@keyframes shrink-to-coach-button {
0% {
transform: translate(0, 0) scale(1);
opacity: 1;
}
100% {
transform: translate(var(--translate-x), var(--translate-y)) scale(0);
opacity: 0;
}
}
.animate-shrink-to-coach-button {
animation: shrink-to-coach-button 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
transform-origin: center center;
}