.inline-tooltips {
    position: relative;
    cursor: help;
    text-decoration: underline;
    text-decoration-color: #464646;
    font-weight: bold;
}

.inline-tooltips::after {
    content: attr(data-tooltip);
    position: absolute;
    background-color: #464646;
    color: rgb(255, 255, 255);
    padding: 20px 20px;
    border-radius: 4px;
    white-space: normal;
    /* Changed: Allows wrapping */
    max-width: 250px;
    /* Constrains width for wrapping */
    width: max-content;
    /* Adapts to content but respects max-width */
    max-height: 250px;
    /* Optional: Limits height, add overflow: auto if needed */
    overflow-wrap: break-word;
    /* Breaks long words */
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
    z-index: 1000;
}

.inline-tooltips[data-tooltip-position="top"]::after {
    bottom: 125%; /* Position above the text */
    left: 50%;
    transform: translateX(-50%);
}

.inline-tooltips[data-tooltip-position="bottom"]::after {
    top: 125%; /* Position below the text */
    left: 50%;
    transform: translateX(-50%);
}

.inline-tooltips[data-tooltip-position="left"]::after {
    right: 125%; /* Position to the left */
    top: 50%;
    transform: translateY(-50%);
}

.inline-tooltips[data-tooltip-position="right"]::after {
    left: 125%; /* Position to the right */
    top: 50%;
    transform: translateY(-50%);
}

.inline-tooltips:hover::after {
    opacity: 1;
    visibility: visible;
}
