// _tooltips.scss

.tooltip::before {
    background: transparent none repeat scroll 0 0;
    border: 8px solid transparent;
}

.tooltip {
    font-family: 'Rubik', sans-serif;
}

.tooltip {
    max-width: 200px;
    padding: 8px;
    color: $white;
    opacity: 1;
    background-color: $bg-black-light;
    border-radius: 3px;
    letter-spacing: 1px;
    
    &.tooltip-sm-width {
        max-width: 140px;
        font-size: 11px;
        word-wrap: break-word;
    }
    
    &.in {
        opacity: 1;
    }

    &.top,
    &.bottom {
        background: none;
        
        .tooltip-arrow {
            margin-left: -8px;
            border-left: 8px solid transparent;
            border-right: 8px solid transparent;
        }
        
    }
    
    &.top {
        
        .tooltip-arrow {
            border-top: 8px solid $bg-black-light;
        }
        
        .tooltip-inner { 
            margin-bottom: 3px;
        }
        
    }
    
    &.bottom {
        
        .tooltip-arrow {
            border-bottom: 8px solid $bg-black-light;
        }
        
        .tooltip-inner { 
            margin-top: 3px;
        }
        
    }
    
    &.left,
    &.right {
        background: none;
        
        .tooltip-arrow {
            margin-top: -8px;
            border-top: 8px solid transparent;
            border-bottom: 8px solid transparent;
        }
        
    }
    
    &.left {
        
        .tooltip-arrow {
            border-left: 8px solid $bg-black-light;
        }
        
        .tooltip-inner { 
            margin-right: 3px;
        }
        
    }
    
    &.right {
        
        .tooltip-arrow {
            border-right: 8px solid $bg-black-light;
        }
        
        .tooltip-inner { 
            margin-left: 3px;
        }
        
    }
    
    .tooltip-inner {
        background-color: $bg-black-light;
        font-size: 12px;
        text-align: left;
    }

    &.right-arrow::before {
         border-right-color: hsla(0, 0%, 20%, 0.9);
         content: "";
         left: -16px;
         top: 15px;
         position: absolute;
    }
    
    &.top-arrow::before {
         border-top-color: hsla(0, 0%, 20%, 0.9);
         content: "";
         left: 30px;
         bottom: -16px;
         position: absolute;
    }
    
    &.top-arrow-sm::before {
         border-top-color: hsla(0, 0%, 20%, 0.9);
         content: "";
         left: 50%;
         bottom: -16px;
         position: absolute;
         margin-left: -8px;
    }

    &.bottom-arrow::before {
         border-bottom-color: hsla(0, 0%, 20%, 0.9);
         content: "";
         left: 90px;
         top: -16px;
         position: absolute;
    }
    
}

.helptip {
    box-sizing: border-box;
    height: 14px;
    margin-left: 20px;
    position: relative;

    &:before {
        color: $blue-deep;
        background: $white;
        border: 2px solid $blue-deep;
        content: "?";
        font-size: 8px;
        font-weight: 800;
        height: 14px;
        left: -20px;
        line-height: 10px;
        position: absolute;
        text-align: center;
        width: 14px;
        border-radius: 50%;
    }
}
