@import "../mixins";

.tooltip {
    box-sizing: border-box;

    display: block;
    position: absolute;
    z-index: 10000;
    font-family: $font-family;

    background: #111;
    // border-radius: 0.5rem;
    margin: 0 auto;
    text-align: left;
    font-size: 0.9rem;
    color: #eee;

    width: auto;
    height: auto;
    min-width: 8rem;
    min-height: 2rem;

    transition: opacity 100ms ease-out, height 100ms ease, width 100ms ease;
    pointer-events: none;
}

.tooltip__dots {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.tooltip__dot {
    font-size: 0.9rem;
    margin-left: -0.5rem;
    width: 1.25rem;
    height: 1.25rem;
}

.tooltip-data {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    @include user-select(none);
}

.tooltip--hidden {
    opacity: 0;
    height: 0px;
    width: 0px;
}

dl {
    margin: 0;
    padding: 0;
}

.tooltip-data__row > dt,
.tooltip-data__row > dd {
    margin: 0;
    padding: 0;
    position: relative;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);

    z-index: 10002;
}

.tooltip-data__row {
    min-width: 120px;

    margin: 0;
    padding: 0;

    display: flex;
    align-items: start;
    justify-content: space-between;
}

.tooltip-data__row:first-child {
    margin-top: 0;
}

.tooltip-data__row:last-child {
    margin-bottom: 0;
}

.tooltip-data__row > dt {
    padding: 0.2rem;
    // text-overflow: ellipsis;
    overflow: hidden;
    height: 2rem;
}

.tooltip-data__row__bar {
    background: #666;
    z-index: 10001;
    transition: all 100ms ease;
    position: absolute;
    left: 0;
    height: 1.5rem;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.tooltip-data__row > dd {
    padding: 0.2rem;
    text-align: right;
    min-width: 2rem;
}

.tooltip__text {
    font-size: 0.8rem;
    margin: 0;
    padding: 0.5rem 0.25rem;
    max-width: 250px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.tooltip__text__small {
    font-size: 0.8rem;
    margin: 0;
    padding: 0.5rem 0.25rem;
    width: auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.tooltip__text--column {
    display: block;
    padding: 0.5rem;
    width: auto;
}

.tooltip__title {
    margin: 0;
    padding: 0;
    line-height: 1;
}
