[tooltip] {
    position: relative;
    z-index: 1;
    white-space: pre-wrap;
}

[tooltip]::before,
[tooltip]::after {
    visibility: hidden;
    filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=0);
    opacity: 0;
    pointer-events: none;
    white-space: pre-wrap;
}

[tooltip]::before {
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-bottom: 5px;
    margin-left: -80px;
    padding: 7px;
    width: 160px;
    border-radius: 3px;
    background-color: hsl(0, 0%, 5%, 0.9);
    color: #fff;
    content: attr(tooltip);
    text-align: center;
    font-size: 14px;
    line-height: 1.2;
    transition-duration: 0.5s;
    white-space: pre-wrap;
}

[tooltip]::after {
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    width: 0;
    border-top: 5px solid hsl(0, 0%, 5%, 0.9);
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    content: ' ';
    font-size: 0;
    line-height: 0;
    transition-duration: 0.5s;
    white-space: pre-wrap;
}

[tooltip]:hover::before,
[tooltip]:hover::after {
    visibility: visible;
    filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=100);
    opacity: 1;
    white-space: pre-wrap;
}

