I am working with the following document and would like the red title box to sit vertically centred right in the middle of the top rule of the text box. Of course, I could do this manually by adjusting the y-shift to the appropriate value, but I'd like something more automatic, as I may decide to change the box title at some point (say, I might choose to number them as Property 1.1, Example 1.2 etc). I thought maybe shifting by half the node height might do it, though I could be wrong about this. However, I have no idea how to specify the height of the node and apply it to y-shift. How could I achieve this?
\documentclass{article}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\newcommand{\eqtitle}[2]{\large \textbf{#1 #2}}
\begin{document}
\begin{tcolorbox}[
enhanced,
colback=white,
colframe=black,
arc=10pt,
top=11pt,
left=11pt,
right=11pt,
boxsep=0pt,
bottom=11pt,
boxrule=1pt,
drop fuzzy shadow,
overlay={
\node[inner sep=3pt,anchor=north west,fill=red,text=white,font=\bfseries, draw=black, line width=1pt, rounded corners=4pt] at ([xshift=11pt,yshift=0pt]frame.north west) {Property};
}
]
This is a property.
\end{tcolorbox}
\end{document}
PS: I'm aware that this is an unusual way of specifying a frame/outline (as an overlay) and title for a tcolorbox, but I'm doing it this way for other (unrelated) reasons that I won't go into.
Here is an image of the current (undesirable) output for reference: