.tooltip-wrap {
    position: relative;
}

.tooltip-button {
    position: absolute;
    padding: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: 150%;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    top: calc(-100% - 3.5px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 240px;
    border-radius: 5px;
    z-index: 100;
}

.tooltip-button span {
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tooltip-button::after {
    position: absolute;
    content: '';
    bottom: -5.5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5.5px solid transparent;
    border-right: 5.5px solid transparent;
    border-top: 6px solid color-mix(in srgb, currentColor 50%, black);
}

.tooltip-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    z-index: -1;
}


@media (max-width: 767px) {
    .tooltip-button {
        top: calc(100% + 7.5px);
        left: 0;
        transform: none;
        padding-block: 4px;
        height: 30px;
        max-width: 180px;
    }

    .tooltip-button::after {
        top: -5.5px;
        left: 10px;
        transform: rotate(-180deg);
    }
}