/* Base wrapper styling */
a[hovertitle], 
div[hovertitle] {
  position: relative;
  display: inline-block;
  color: #74bcee;
}

/* Tooltip Body */
a[hovertitle]:hover::after, 
div[hovertitle]:hover::after {
  content: attr(hovertitle);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  
  /* Typography & Layout */
  padding: 6px 12px;
  color: #74bcee;
  font-size: 10px;
  text-align: center;
  white-space: pre-wrap;
  min-width: 80px;
  max-width: 300px;
  z-index: 100;
  
  /* Roll20 Gradient & Border Style */
  background-image: linear-gradient(to bottom, #444444, #000000, #000000, #222222);
  border: 1px solid #000000;
  border-radius: 6px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

/* Top Arrow Pointer (#222222 with Black Border) */
a[hovertitle]:hover::before, 
div[hovertitle]:hover::before {
  content: "";
  position: absolute;
  top: calc(100% + 3px); /* Tucks the lower half of the diamond behind the main tooltip */
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  
  /* Diamond Shape Dimensions */
  width: 10px;
  height: 10px;
  
  /* Fill & Border Styling */
  background-color: #333333;
  border-top: 1px solid #000000;
  border-left: 1px solid #000000;
  
  z-index: 101; /* Sits above the body border for a smooth join */
  pointer-events: none;
}