/* ================================================================================
Style for Citation System
================================================================================
*/

.citation-marker {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #3B82F6; /* CHANGED: A more modern, vibrant, and professional blue */
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    line-height: 20px;
    font-weight: bold;
    cursor: pointer;
    margin: 0 3px;
    transition: background-color 0.2s ease-in-out;
    vertical-align: super;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.citation-marker:hover {
    background-color: #2563EB; /* CHANGED: A darker shade of the modern blue for hover */
}

.fact-sentence.highlighted {
    background-color: #e9f5ff;
    transition: background-color 0.2s ease-in-out;
}

/* ================================================================================
Tooltip Styles
================================================================================
*/

.citation-tooltip {
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 320px;
    max-width: 90vw;
    z-index: 1000;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

/* Default arrow pointing up */
.citation-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
}

/* --- START: FIX --- */
/* New style for the arrow when the tooltip is positioned below the marker */
.citation-tooltip.arrow-down::after {
    top: 100%;
    bottom: auto;
    border-color: #333 transparent transparent transparent;
}
/* --- END: FIX --- */


.citation-tooltip a {
    color: #82c5ff;
    text-decoration: underline;
}

.citation-tooltip a:hover {
    color: #a9d9ff;
}
