/**
 *  https://www.florin-pop.com/blog/2019/05/pure-css-tooltip/
 */

.tooltip {
    position: relative;
}

/* .tooltip::after {
    background-color: #333;
    border-radius: 10px;
    color: #b254ff;
    display: none;
    padding: 10px 15px;
    position: absolute;
    text-align: center;
    z-index: 999;
} */

.tooltip::after {
    background-color: #fff;
    border-radius: 10px;
    border: #000 1px solid;
    color: #000;
    display: none;
    padding: 5px 10px;
    position: absolute;
    text-align: center;
    z-index: 999;
    font-size: 16px;
    /* font-family: monospace; */
    font-style: normal;
    letter-spacing: normal;
}

.tooltip::after {
    content: attr(title);
}

.tooltip.top::after {
    top: 0;
    left: 50%;
    transform: translate(-50%, calc(-100% - 10px));
}

.tooltip.bottom::after {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, calc(100% + 10px));
}

.tooltip.right::after {
    top: 0;
    right: 0;
    transform: translateX(calc(100% + 10px));
}

.tooltip.left::after {
    top: 0;
    left: 0;
    transform: translateX(calc(-100% - 10px));
}

.tooltip:hover::after, .tooltip:focus::after, .tooltip:active::after {
    display: block;
}

.tooltip::before{
    background-color: #333;
    content: ' ';
    display: none;
    position: absolute;
    width: 15px;
    height: 15px;
    z-index: 999;
}

.tooltip:hover::before, .tooltip:focus::before, .tooltip:active::before  {
    display: block;
}

.tooltip.top::before {
    top: 0;
    left: 50%;
    transform: translate(-50%, calc(-100% - 5px)) rotate(45deg);
}

.tooltip.bottom::before {
    bottom: 0;
    left: 50%;
    transform: translate(-50%, calc(100% + 5px)) rotate(45deg);
}

.tooltip.right::before {
    top: 50%;
    right: 0;
    transform: translate(calc(100% + 5px), -50%) rotate(45deg);
}

.tooltip.left::before {
    top: 50%;
    left: 0;
    transform: translate(calc(-100% - 5px), -50%) rotate(45deg);
}
