/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");

tooltip,
html|tooltip {
    appearance: none;

    /* Ensure we override any margin properties, as user agent margin-top can override this */
    margin: -18px !important;
    padding: 18px;

    background-color: transparent;
    border: none;

    border-radius: 0px;

    & .tooltip-label {
        padding: 8px 10px;

        appearance: auto;
        -moz-default-appearance: tooltip;

        /* Use InfoBackground and InfoText for non-lwt themes */
        background-color: InfoBackground;
        color: InfoText;

        /* Prevent overflow wrapping of the label */
        white-space: pre;

        text-align: start;

        /* Otherwise, use an appropriate color for our color scheme */
        &:-moz-lwtheme {
            appearance: none;

            border-radius: 10px;

            background-color: light-dark(rgba(255, 255, 255, 0.98), rgba(0, 0, 0, 0.92));
            color: light-dark(black, white);

            box-shadow: 0 6.4px 14.4px 0 rgba(0, 0, 0, .132),
                0 1.2px 3.6px 0 rgba(0, 0, 0, .108);
        }
    }

    &:not([position]) .tooltip-label {
        margin-top: 21px;
    }
}