.clearfix:before, .clearfix:after { content: ''; display: table; }
.clearfix:after { clear: both; }

.tooltip {
    display: inline;
    position: relative;
    /*z-index: 999;*/
    font-family: PTSerif-Regular;
}

/* Trigger text */

.tooltip-item {
    cursor: pointer;
    display: inline-block;
    font-weight: 700;
    width: 26px;
    height: 26px;
    border-radius: 13px;
    position: relative;
    top: 4px;
    left: 4px;
    background: center no-repeat;
    background-size: 40%;
    background-color: #FF3000;
    background-image: url(../../images/design/marginal.png);
    background-image:
            linear-gradient(transparent, transparent),
            url(../../images/design/marginal.svg);
}

/* Gap filler */

.tooltip-item::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 20px;
    bottom: 100%;
    left: 50%;
    pointer-events: none;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
}

.tooltip:hover .tooltip-item::after {
    pointer-events: auto;
}

/* Tooltip */

.tooltip-content {
    position: absolute;
    z-index: 9999;
    min-width: 320px;
    left: 50%;
    margin: 0 0 auto;
    top: 180%;
    text-align: left;
    background: #FFFFFF;
    color: #323232;
    opacity: 0;
    cursor: default;
    pointer-events: none;
    padding: 0.5em;

    text-align: left;
    font-size: 19px;
    letter-spacing: 0;
    line-height: 30px;

    box-shadow: 0 2px 10px 0 #B9C4C6;
    border-radius: 4px;
}

.tooltip-effect-1 .tooltip-content {
    -webkit-transform: translate3d(0, -10px, 0);
    transform: translate3d(0, -10px, 0);
    -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
    transition: opacity 0.3s, transform 0.3s;
}

.tooltip-effect-2 .tooltip-content {
    -webkit-transform-origin: 50% calc(100% + 10px);
    transform-origin: 50% calc(100% + 10px);
    -webkit-transform: perspective(1000px) rotate3d(1, 0, 0, 45deg);
    transform: perspective(1000px) rotate3d(1, 0, 0, 45deg);
    -webkit-transition: opacity 0.2s, -webkit-transform 0.2s;
    transition: opacity 0.2s, transform 0.2s;
}

.tooltip-effect-3 .tooltip-content {
    -webkit-transform: translate3d(0, 10px, 0) rotate3d(1, 1, 0, 25deg);
    transform: translate3d(0, 10px, 0) rotate3d(1, 1, 0, 25deg);
    -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
    transition: opacity 0.3s, transform 0.3s;
}

.tooltip-effect-4 .tooltip-content {
    -webkit-transform-origin: 50% 100%;
    transform-origin: 50% 100%;
    -webkit-transform: scale3d(0.7, 0.3, 1);
    transform: scale3d(0.7, 0.3, 1);
    -webkit-transition: opacity 0.2s, -webkit-transform 0.2s;
    transition: opacity 0.2s, transform 0.2s;
}

.tooltip-effect-5 .tooltip-content {
    width: 180px;
    margin-left: -90px;
    -webkit-transform-origin: 50% calc(100% + 6em);
    transform-origin: 50% calc(100% + 6em);
    -webkit-transform: rotate3d(0, 0, 1, 15deg);
    transform: rotate3d(0, 0, 1, 15deg);
    -webkit-transition: opacity 0.2s, -webkit-transform 0.2s;
    transition: opacity 0.2s, transform 0.2s;
    -webkit-transition-timing-function: ease, cubic-bezier(.17, .67, .4, 1.39);
    transition-timing-function: ease, cubic-bezier(.17, .67, .4, 1.39);
}

.tooltip:hover .tooltip-content {
    pointer-events: auto;
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0) rotate3d(0, 0, 0, 0);
    transform: translate3d(0, 0, 0) rotate3d(0, 0, 0, 0);
}

.tooltip-visible {
    pointer-events: auto;
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0) rotate3d(0, 0, 0, 0);
    transform: translate3d(0, 0, 0) rotate3d(0, 0, 0, 0);
}

.tooltip.tooltip-effect-2:hover .tooltip-content {
    -webkit-transform: perspective(1000px) rotate3d(1, 0, 0, 0deg);
    transform: perspective(1000px) rotate3d(1, 0, 0, 0deg);
}

/* Arrow */

.tooltip-content::after {
    content: '';
    top: -17px;
    left: 3%;
    border: solid transparent;
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border-color: transparent;
    border-bottom-color: #FFF;
    border-width: 10px;
    margin-left: -10px;
}

.position-left .tooltip-content::after {
    left: -100px;
    display: none;!important;
}

/* Tooltip content*/

.tooltip-content img {
    position: relative;
    height: 270px;
    display: block;
    float: left;
    margin-right: 1em;
}

.tooltip-text {
    font-size: 19px;
    display: block;
    /*padding: 1.31em 1.21em 1.21em 0;*/
    padding: 1.2em;
    color: #323232;
}

.tooltip-effect-5 .tooltip-text {
    padding: 1.4em;
}

.tooltip-text a {
    font-weight: bold;
}
