/************** Tooltip CSS Only *********************/
$color_1: #000;
$color_2: #fff;
$normal_color: #b3ccff;
$error_color: #ff6d57;
$warn_color: #ff8e2b;
$info_color: #3986ac;
$success_color: #00bd65;

[class*="tt-"] {
    position: relative;
    display: inline-block;
    &:before {
        position: absolute;
        transform: translate3d(0, 0, 0);
        visibility: hidden;
        opacity: 0;
        z-index: 1000000;
        pointer-events: none;
        transition: 0.3s ease;
        transition-delay: 0ms;
        content: "";
        position: absolute;
        background: transparent;
        border: 7px solid transparent;
        z-index: 1000001;
    }
    &:after {
        position: absolute;
        transform: translate3d(0, 0, 0);
        visibility: hidden;
        opacity: 0;
        z-index: 1000000;
        pointer-events: none;
        transition: 0.3s ease;
        transition-delay: 0ms;
        background: $normal_color;
        color: $color_1;
        padding: 8px 10px;
        font-size: 12px;
        font-family: "NewBT", Tahoma, sans-serif;
        line-height: 12px;
        font-weight: normal !important;
        border-radius: 2px;
        white-space: nowrap;
        /*box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);*/
    }
    &:hover {
        &:before {
            visibility: visible;
            opacity: 1;
            transition-delay: 100ms;
        }
        &:after {
            visibility: visible;
            opacity: 1;
            transition-delay: 100ms;
        }
    }
}
[class*="tt-"][aria-label] {
    &:after {
        content: attr(aria-label);
    }
}
[class*="tt-"][data-hint] {
    &:after {
        content: attr(data-hint);
    }
}
[aria-label=""] {
    &:before {
        display: none !important;
    }
    &:after {
        display: none !important;
    }
}
[data-hint=""] {
    &:before {
        display: none !important;
    }
    &:after {
        display: none !important;
    }
}
.tt-tl {
    &:before {
        border-top-color: $normal_color;
        margin-bottom: -11px;
        bottom: 100%;
        left: 50%;
        left: calc(50% - 4px);
    }
    &:after {
        bottom: 100%;
        left: 50%;
        transform: translateX(-100%);
        margin-left: 12px;
    }
    &:hover {
        &:before {
            transform: translateY(-8px);
        }
        &:after {
            transform: translateX(-100%) translateY(-8px);
        }
    }
}
.tt-tr {
    &:before {
        border-top-color: $normal_color;
        margin-bottom: -11px;
        bottom: 100%;
        left: 50%;
        left: calc(50% - 4px);
    }
    &:after {
        bottom: 100%;
        left: 50%;
        transform: translateX(0);
        margin-left: -12px;
    }
    &:hover {
        &:before {
            transform: translateY(-8px);
        }
        &:after {
            transform: translateY(-8px);
        }
    }
}
.tt-t {
    &:before {
        border-top-color: $normal_color;
        margin-bottom: -11px;
        bottom: 100%;
        left: 50%;
        left: calc(50% - 4px);
    }
    &:after {
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
    }
    &:hover {
        &:before {
            transform: translateY(-8px);
        }
        &:after {
            transform: translateX(-50%) translateY(-8px);
        }
    }
}
.tt-bl {
    &:before {
        border-bottom-color: $normal_color;
        margin-top: -11px;
        top: 100%;
        left: 50%;
        left: calc(50% - 10px);
    }
    &:after {
        top: 100%;
        left: 50%;
        transform: translateX(-100%);
        margin-left: 12px;
    }
    &:hover {
        &:before {
            transform: translateY(8px);
        }
        &:after {
            transform: translateX(-100%) translateY(8px);
        }
    }
}
.tt-br {
    &:before {
        border-bottom-color: $normal_color;
        margin-top: -11px;
        top: 100%;
        left: 50%;
        left: calc(50% - 4px);
    }
    &:after {
        top: 100%;
        left: 50%;
        transform: translateX(0);
        margin-left: -12px;
    }
    &:hover {
        &:before {
            transform: translateY(8px);
        }
        &:after {
            transform: translateY(8px);
        }
    }
}
.tt-b {
    &:before {
        border-bottom-color: $normal_color;
        margin-top: -11px;
        top: 100%;
        left: 50%;
        left: calc(50% - 4px);
    }
    &:after {
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
    }
    &:hover {
        &:before {
            transform: translateY(8px);
        }
        &:after {
            transform: translateX(-50%) translateY(8px);
        }
    }
}
.tt-l {
    &:before {
        border-left-color: $normal_color;
        margin-right: -11px;
        margin-bottom: -6px;
        right: 100%;
        bottom: 50%;
    }
    &:after {
        margin-bottom: -14px;
        right: 100%;
        bottom: 50%;
    }
    &:hover {
        &:before {
            transform: translateX(-8px);
        }
        &:after {
            transform: translateX(-8px);
        }
    }
}
.tt-r {
    &:before {
        border-right-color: $normal_color;
        margin-left: -11px;
        margin-bottom: -6px;
        left: 100%;
        bottom: 50%;
    }
    &:after {
        margin-bottom: -14px;
        left: 100%;
        bottom: 50%;
    }
    &:hover {
        &:before {
            transform: translateX(8px);
        }
        &:after {
            transform: translateX(8px);
        }
    }
}
.tt-small {
    &:after {
        white-space: normal;
        line-height: 1.4em;
        word-wrap: break-word;
        word-break: initial;
        width: 80px;
    }
}
.tt-medium {
    &:after {
        white-space: normal;
        line-height: 1.4em;
        word-wrap: break-word;
        word-break: initial;
        width: 150px;
    }
}
.tt-large {
    &:after {
        white-space: normal;
        line-height: 1.4em;
        word-wrap: break-word;
        word-break: initial;
        width: 300px;
    }
}
.tt-xlarge {
    &:after {
        white-space: normal;
        line-height: 1.4em;
        word-wrap: break-word;
        word-break: initial;
        width: 500px;
    }
}
.tt-error {
    &:after {
        background-color: $error_color;
        color: $color_2;
    }
}
.tt-error.tt-tl {
    &:before {
        border-top-color: $error_color;
    }
}
.tt-error.tt-tr {
    &:before {
        border-top-color: $error_color;
    }
}
.tt-error.tt-t {
    &:before {
        border-top-color: $error_color;
    }
}
.tt-error.tt-bl {
    &:before {
        border-bottom-color: $error_color;
    }
}
.tt-error.tt-br {
    &:before {
        border-bottom-color: $error_color;
    }
}
.tt-error.tt-b {
    &:before {
        border-bottom-color: $error_color;
    }
}
.tt-error.tt-l {
    &:before {
        border-left-color: $error_color;
    }
}
.tt-error.tt-r {
    &:before {
        border-right-color: $error_color;
    }
}
.tt-warn {
    &:after {
        background-color: $warn_color;
        color: $color_2;
    }
}
.tt-warn.tt-tl {
    &:before {
        border-top-color: $warn_color;
    }
}
.tt-warn.tt-tr {
    &:before {
        border-top-color: $warn_color;
    }
}
.tt-warn.tt-t {
    &:before {
        border-top-color: $warn_color;
    }
}
.tt-warn.tt-bl {
    &:before {
        border-bottom-color: $warn_color;
    }
}
.tt-warn.tt-br {
    &:before {
        border-bottom-color: $warn_color;
    }
}
.tt-warn.tt-b {
    &:before {
        border-bottom-color: $warn_color;
    }
}
.tt-warn.tt-l {
    &:before {
        border-left-color: $warn_color;
    }
}
.tt-warn.tt-r {
    &:before {
        border-right-color: $warn_color;
    }
}
.tt-info {
    &:after {
        background-color: $info_color;
        color: $color_2;
    }
}
.tt-info.tt-tl {
    &:before {
        border-top-color: $info_color;
    }
}
.tt-info.tt-tr {
    &:before {
        border-top-color: $info_color;
    }
}
.tt-info.tt-t {
    &:before {
        border-top-color: $info_color;
    }
}
.tt-info.tt-bl {
    &:before {
        border-bottom-color: $info_color;
    }
}
.tt-info.tt-br {
    &:before {
        border-bottom-color: $info_color;
    }
}
.tt-info.tt-b {
    &:before {
        border-bottom-color: $info_color;
    }
}
.tt-info.tt-l {
    &:before {
        border-left-color: $info_color;
    }
}
.tt-info.tt-r {
    &:before {
        border-right-color: $info_color;
    }
}
.tt-success {
    &:after {
        background-color: $success_color;
        color: $color_2;
    }
}
.tt-success.tt-tl {
    &:before {
        border-top-color: $success_color;
    }
}
.tt-success.tt-tr {
    &:before {
        border-top-color: $success_color;
    }
}
.tt-success.tt-t {
    &:before {
        border-top-color: $success_color;
    }
}
.tt-success.tt-bl {
    &:before {
        border-bottom-color: $success_color;
    }
}
.tt-success.tt-br {
    &:before {
        border-bottom-color: $success_color;
    }
}
.tt-success.tt-b {
    &:before {
        border-bottom-color: $success_color;
    }
}
.tt-success.tt-l {
    &:before {
        border-left-color: $success_color;
    }
}
.tt-success.tt-r {
    &:before {
        border-right-color: $success_color;
    }
}
.tt-always {
    &:after {
        opacity: 1;
        visibility: visible;
    }
    &:before {
        opacity: 1;
        visibility: visible;
    }
}
.tt-always.tt-t {
    &:before {
        transform: translateY(-8px);
    }
    &:after {
        transform: translateX(-50%) translateY(-8px);
    }
}
.tt-always.tt-tl {
    &:before {
        transform: translateY(-8px);
    }
    &:after {
        transform: translateX(-100%) translateY(-8px);
    }
}
.tt-always.tt-tr {
    &:before {
        transform: translateY(-8px);
    }
    &:after {
        transform: translateY(-8px);
    }
}
.tt-always.tt-b {
    &:before {
        transform: translateY(8px);
    }
    &:after {
        transform: translateX(-50%) translateY(8px);
    }
}
.tt-always.tt-bl {
    &:before {
        transform: translateY(8px);
    }
    &:after {
        transform: translateX(-100%) translateY(8px);
    }
}
.tt-always.tt-br {
    &:before {
        transform: translateY(8px);
    }
    &:after {
        transform: translateY(8px);
    }
}
.tt-always.tt-l {
    &:before {
        transform: translateX(-8px);
    }
}
.tt-always.tt-left {
    &:after {
        transform: translateX(-8px);
    }
}
.tt-always.tt-right {
    &:before {
        transform: translateX(8px);
    }
    &:after {
        transform: translateX(8px);
    }
}
