/* Glossary Tooltip Styling */
.legal-term {
    border-bottom: 2px solid #00c2cb;
    /* Turquoise underline */
    cursor: help;
    position: relative;
    display: inline;
    padding-bottom: 1px;
    transition: all 0.2s ease;
    font-weight: 500;
    scroll-margin-top: 100px;
    /* Offset for fixed header */
}

.legal-term:hover {
    background-color: rgba(0, 194, 203, 0.1);
    color: #008a91;
}

/* Tooltip container */
.glossary-tooltip {
    position: absolute;
    z-index: 10000;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 194, 203, 0.2);
    border-radius: 0;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 194, 203, 0.05);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    pointer-events: auto;
    /* Enable interaction */
}

.glossary-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.glossary-tooltip h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 700;
    color: #00c2cb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.glossary-tooltip h4::before {
    content: 'i';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #00c2cb;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.glossary-tooltip .definition {
    margin-bottom: 12px;
    font-weight: 400;
}

.glossary-tooltip .example {
    font-size: 13px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    border-left: 3px solid #00c2cb;
    font-style: italic;
    color: #555;
}

.glossary-tooltip .footer {
    margin-top: 12px;
    font-size: 12px;
    color: #95a5a6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Arrow removed as per user request */

/* Offset for table rows in glossary when linked to */
tr[id^="term-"] {
    scroll-margin-top: 100px;
}