/* Glossary term styling */
.glossary-term {
    position: relative;
    cursor: help; /* Indicates a tooltip is available */
    font-weight: bold; /* Make the text bold */
    color: var(--e-global-color-411709d); /* Apply the global color variable */
    text-decoration: none; /* Remove the dotted underline */
}

/* Tooltip styling */
.glossary-term::after {
    content: attr(title); /* Display the glossary definition */
    position: absolute;
    bottom: 100%; /* Default position: above the term */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8); /* Semi-transparent black background */
    color: #fff; /* White text */
    padding: 8px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap; /* Prevent wrapping */
    z-index: 1000; /* Ensure it appears above other elements */
    display: none; /* Hide by default */
    pointer-events: none; /* Prevent interaction */
}

/* Show tooltip on hover */
.glossary-term:hover::after {
    display: block;
}

/* Adjust tooltip for screen edges */
.glossary-term[data-tooltip-position="right"]::after {
    left: auto;
    right: 0;
    transform: translateX(0);
}

.glossary-term[data-tooltip-position="left"]::after {
    left: 0;
    transform: translateX(0);
}
