.tippy-box {
    font-size: var(--font-size-hint);
    font-family: var(--font-family-1);
    line-height: var(--line-height-hint);
    border-radius: 4px;
    box-shadow: 0 0 7px 0 rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.tippy-content {
    padding: 10px;
}

.tippy-content .spaced-typesetting > span ~ span {
    display: block;
    margin-top: 10px;
}

/* sizing */
.tippy-box[data-theme~='notification'],
.tippy-box[data-theme~='warning'],
.tippy-box[data-theme~='tooltip'] {
    min-width: 280px;
    max-width: 280px;
}

/* background colors */
.tippy-box,
.tippy-box[data-theme~='tooltip'] {
    background-color: var(--surface-inverse);
}

.tippy-box[data-theme~='notification'] {
    background-color: var(--color-tertiary);
}

.tippy-box[data-theme~='error'],
.tippy-box[data-theme~='warning'] {
    background-color: var(--color-error);
}

/* text-colors */
.tippy-box,
.tippy-box[data-theme~='tooltip'] {
    color: var(--on-surface-inverse);
}

.tippy-box[data-theme~='notification'],
.tippy-box[data-theme~='warning'],
.tippy-box[data-theme~='error'] {
    color: var(--color-greyscale-50);
}

/* link style and color */
.tippy-content a {
    display: inline;
    position: relative;
    color: var(--color-greyscale-50);
    text-decoration: none;
    line-height: var(--line-height-hint);
    cursor: pointer;
    transition: background-size 200ms;
    background-image: linear-gradient(var(--color-greyscale-50), var(--color-greyscale-50)), linear-gradient(var(--color-greyscale-50), var(--color-greyscale-50));
    background-repeat: no-repeat;
    background-size: 100% 1px, 0 2px;
    background-position: center calc(1.25em + 1px), center 1.25em;
}

.tippy-content a:hover,
.tippy-content a:focus {
    background-size: 100% 1px, 100% 2px;
}

.tippy-content a:active {
    background-position: center calc(1.25em + 1px), center calc(1.25em + 1px);
}

.tippy-box[data-theme~='tooltip'] a {
    color: var(--on-surface-inverse-primary);
    background-image: linear-gradient(var(--on-surface-inverse-primary),
    var(--on-surface-inverse-primary)),
    linear-gradient(var(--on-surface-inverse-primary),
            var(--on-surface-inverse-primary));
}

/* closing X spacing and size */
.tippy-box[data-theme~='tooltip-manual'] > .tippy-content,
.tippy-box[data-theme~='notification'] > .tippy-content,
.tippy-box[data-theme~='warning'] > .tippy-content {
    padding-right: 35px;
}

.tippy-box[data-theme~='tooltip'] .icon-cross {
    display: none;
}

.tippy-box[data-theme~='tooltip-manual'] .icon-cross,
.tippy-box[data-theme~='notification'] .icon-cross,
.tippy-box[data-theme~='warning'] .icon-cross {
    display: block;
    position: absolute;
    top: var(--font-size-hint);
    right: 10px;
    cursor: pointer;
    pointer-events: all;
    height: var(--font-size-hint);
    fill: var(--on-surface-inverse);
}

/* separator line */
.tippy-box[data-theme~='notification'] hr,
.tippy-box[data-theme~='warning'] hr,
.tippy-box[data-theme~='tooltip'] hr {
    border-top: 1px solid var(--color-greyscale-300);
    border-bottom: none;
    border-left: none;
    border-right: none;
}

/* additional error styling */
.tippy-box[data-theme~='error'] {
    pointer-events: all;
}

.tippy-box[data-theme~='error'][data-placement^='top'] > .tippy-arrow::before {
    border-top-color: var(--color-error);
}

.tippy-box[data-theme~='error'][data-placement^='bottom'] > .tippy-arrow::before {
    border-bottom-color: var(--color-error);
}

.tippy-box[data-theme~='error'][data-placement^='left'] > .tippy-arrow::before {
    border-left-color: var(--color-error);
}

.tippy-box[data-theme~='error'][data-placement^='right'] > .tippy-arrow::before {
    border-right-color: var(--color-error);
}

/* arrow */
.tippy-arrow {
    color: var(--surface-inverse)
}
