/* Style footnote links and numbers */
sup.fn {
    line-height: 0;
}

sup.fn a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

sup.fn a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Animation keyframes */
@keyframes slideFromTop {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideToBottom {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Popup styles */
.footnote-popup {
    display: none;
    z-index: 999999;
    position: absolute;
}

/* Show popup when active */
.footnote-popup.brxe-popup-show {
    display: block;
    animation: slideFromTop 0.2s ease forwards;
}

/* Closing animation */
.footnote-popup.closing {
    animation: slideToBottom 0.2s ease forwards;
}

.footnote-popup .popup-content {
    background: var(--bg-body);
    padding: 15px 26px 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    display: inline-block;
    font-family: "Inter";
    font-size: calc(var(--text-s) * .9);
    line-height: 2.3rem;
    min-width: 100px;
    max-width: 320px;
}

/* Close button styles */
.popup-close {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #666;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Show original footnotes but with some spacing */
.wp-block-footnotes {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

/* Remove the back-to-reference arrows in the footnotes list 
.wp-block-footnotes a[href*="-link"] {
    display: none;
}
*/