/*== start of code for tooltips ==*/
.tool {
    cursor: help;
    position: relative;
    font-weight: 600;
}

/*== common styles for both parts of tool tip ==*/
.tool::before,
.tool::after {
    left: 50%;
    opacity: 0;
    position: absolute;
    z-index: -100;
}

.tool:hover::before,
.tool:focus::before,
.tool:hover::after,
.tool:focus::after {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 100;
}

/*== pointer tip ==*/
.tool::before {
    border-style: dashed;
    border-width: 1em 0.75em 0 0.75em;
    border-color: #35A8DF transparent transparent transparent;
    bottom: 80%;
    content: "";
    margin-left: -0.8em;
    transition: all 0.01s cubic-bezier(0.84, -0.18, 0.31, 1.26),
    opacity 0.01s 0.01s;
    transform: scale(0.6) translateY(-90%);
}

.tool:hover::before,
.tool:focus::before {
    transition: all 0.01s cubic-bezier(0.84, -0.18, 0.31, 1.26) 0.0s;
}

/*== speech bubble ==*/
.tool::after {
    background: linear-gradient(90deg, rgba(24, 99, 155, 1) 0%, rgba(48, 168, 224, 1) 100%);
    border-radius: 5px;
    bottom: 165%;
    color: #edeff0;
    content: attr(data-tip);
    margin-left: -7em;
    padding: 1em;
    transition: all 0.05s cubic-bezier(0.84, -0.18, 0.31, 1.26) 0.2s;
    transform: scale(0.6) translateY(50%);
    width: 14em;
}

.tool:hover::after,
.tool:focus::after {
    transition: all 0.01s cubic-bezier(0.84, -0.18, 0.31, 1.26);
}

@media (max-width: 760px) {
    .tool::after {
        font-size: 0.75em;
        margin-left: -5em;
        width: 10em;
    }
}
