.tooltip { position: relative; display: inline-block; &.hidden { transform: scale(0.1); } } .tooltip-content { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0.5rem; background-color: #fff; border-radius: 0.5rem; box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 20%); position: absolute; top: 0; left: 0; z-index: 1; cursor: pointer; transition: all 0.4s ease-in-out; transform: scale(1.1); }