.tooltip { position: relative; display: inline-block; height: 1.5rem; vertical-align: -0.375rem; &:hover .tooltip__content { display: inline-block; } } .tooltip__handle { background-color: var(--color-dark); border-radius: 50%; height: 1.5rem; width: 1.5rem; line-height: 1.5rem; font-size: 1.2rem; color: white; display: inline-block; text-align: center; margin: 0 10px; cursor: default; position: relative; &::before { content: '\f128'; position: absolute; top: 0; left: 0; font-family: "Font Awesome 5 Free"; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 15px; } &:hover { background-color: var(--color-light); } } .tooltip__content { position: absolute; display: none; top: -10px; transform: translateY(-100%); right: 3px; width: 275px; z-index: 10; background-color: #fafafa; border-radius: 4px; padding: 13px 17px; box-shadow: 0 0 20px 4px rgba(0, 0, 0, 0.1); &::after { content: ''; width: 16px; height: 16px; background-color: #fafafa; transform: rotate(45deg); position: absolute; right: 10px; bottom: -8px; } } @media (max-width: 768px) { .tooltip { display: block; margin-top: 10px; .tooltip__content { left: 3px; right: 3px; width: auto; } } }