/* Highlighted entity styling */
.seo101-highlight {
    background-color: yellow;
    cursor: pointer;
    position: relative;
    padding: 2px 4px;  /* Add some padding to make the highlight more noticeable */
    border-radius: 3px; /* Add rounded corners */
    transition: background-color 0.3s ease; /* Smooth transition for background color */
}

/* Tooltip styling for entity description on hover */
.seo101-highlight[data-description]:hover::after {
    content: attr(data-description);
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 8px; /* Increased padding for better readability */
    border-radius: 5px;
    white-space: nowrap;
    z-index: 10;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 300px;
    text-align: center;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* Add a subtle shadow for better visibility */
    opacity: 0;
    transition: opacity 0.3s ease; /* Smooth transition for tooltip appearance */
}

.seo101-highlight[data-description]:hover::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent; /* Triangle pointing to the text */
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show the tooltip and the triangle on hover */
.seo101-highlight[data-description]:hover::after,
.seo101-highlight[data-description]:hover::before {
    opacity: 1;
}

/* Tooltip class styling (if used outside of data-description) */
.tooltip {
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px;
    border-radius: 5px;
    z-index: 1000;
    transform: translate(-50%, -120%);
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* Add a subtle shadow for better visibility */
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tooltip.show {
    opacity: 1;
}

/* Additional styling for a smooth highlight toggle */
.highlight-toggle-button {
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #007cba;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.highlight-toggle-button:hover {
    background-color: #005a87;
}
