/**
 * Copyright (c) 2012-2018 Red Hat, Inc.
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *   Red Hat, Inc. - initial API and implementation
 */
.tooltipPosition {
    position: absolute;
    display: inline-block;
    z-index: tooltipZIndex;
    pointer-events: none;
}

.tooltip {
    background-color: tooltipBackgroundColor;
    -moz-box-shadow: 2px 2px 10px #333;
    box-shadow: 2px 2px 10px #333;
    color: mainFontColor;
    font-size: 11px;
    padding: 5px 8px;
    display: inline-block;
    position: relative;
    margin: 0;
    max-width: 500px;
    word-wrap: break-word;
}

/*
 * Imageless triangles can be made using only css by adding a large border on one side,
 * then transparent borders on the two adjacent sides.
 */
.triangle {
    position: absolute;
    width: 0px;
    height: 0px;
}

.tooltipBelow {
    margin-top: 7px;
}

.tooltipBelow > .triangle {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid tooltipBackgroundColor;
    border-top: 0;
    left: 50%;
    top: -5px;
    margin-left: -4px;
}

/* A tooltip that is below but right aligned */
.tooltipBelowRightAligned {
    margin-top: 7px;
}

.tooltipBelowRightAligned > .triangle {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid tooltipBackgroundColor;
    border-top: 0;
    right: 2px;
    top: -5px;
    margin-left: -4px;
}

.tooltipAbove {
    margin-top: -7px;
}

.tooltipAbove > .triangle {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid tooltipBackgroundColor;
    border-bottom: 0;
    left: 50%;
    bottom: -5px;
    margin-left: -4px;
}

.tooltipRight {
    margin-left: 7px;
}

.tooltipRight > .triangle {
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 5px solid tooltipBackgroundColor;
    border-left: 0;
    top: 50%;
    bottom: -5px;
    margin-top: -4px;
    left: -5px;
}

.tooltipLeft {
    margin-right: 7px;
}

.tooltipLeft > .triangle {
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid tooltipBackgroundColor;
    border-right: 0;
    top: 50%;
    bottom: -5px;
    margin-top: -4px;
    right: -5px;
}
