/*
 * Styles shared by the cpp-linter docs sites. Each site loads this file from
 * https://cpp-linter.github.io/stylesheets/shared.css before its own stylesheet,
 * so rules that only one site needs belong in that site's stylesheet instead.
 */

th {
    background-color: var(--md-default-fg-color--lightest);
}

/* "important" admonitions */
.md-typeset .admonition.important,
.md-typeset details.important {
    border-color: #00b8d4;
}

.md-typeset .important>.admonition-title::before,
.md-typeset .important>summary::before {
    background-color: #00b8d4;
    -webkit-mask-image: var(--md-admonition-icon--info);
    mask-image: var(--md-admonition-icon--info);
}

.md-typeset .important>.admonition-title,
.md-typeset .important>summary {
    background-color: #00b8d41a;
}

/* badges next to inputs and options */
.md-typeset .mdx-badge {
    font-size: .85em;
}

.md-typeset .mdx-badge--right {
    float: right;
    margin-left: .35em;
}

[dir=ltr] .md-typeset .mdx-badge__icon {
    border-top-left-radius: .1rem;
    border-bottom-left-radius: .1rem;
}

[dir=rtl] .md-typeset .mdx-badge__icon {
    border-top-right-radius: .1rem;
    border-bottom-right-radius: .1rem;
}

.md-typeset .mdx-badge__icon {
    background: var(--md-accent-fg-color--transparent);
    padding: .2rem;
}

.md-typeset .mdx-badge__icon:last-child {
    border-radius: .1rem;
}

[dir=ltr] .md-typeset .mdx-badge__text {
    border-top-right-radius: .1rem;
    border-bottom-right-radius: .1rem;
}

[dir=rtl] .md-typeset .mdx-badge__text {
    border-top-left-radius: .1rem;
    border-bottom-left-radius: .1rem;
}

.md-typeset .mdx-badge__text {
    box-shadow: 0 0 0 1px inset var(--md-accent-fg-color--transparent);
    padding: .2rem .3rem;
}

/* the "experimental" badge icon: an inline SVG in MkDocs, a ::before mask in Sphinx */
@keyframes heart {

    0%,
    40%,
    80%,
    to {
        transform: scale(1);
    }

    20%,
    60% {
        transform: scale(1.15);
    }
}

.md-typeset .mdx-badge--heart {
    color: #ff4281;
}

.md-typeset .mdx-badge--heart.twemoji {
    animation: heart 1s infinite;
}

.md-typeset .mdx-badge--heart::before {
    background-color: #ff4281;
}

.md-typeset .mdx-heart::before {
    animation: heart 1s infinite;
}

/* code annotation buttons: round, pulsing in the accent color */
a.md-annotation__index {
    border-radius: 2.2ch;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 var(--md-accent-fg-color);
        transform: scale(.95);
    }

    75% {
        box-shadow: 0 0 0 .625em transparent;
        transform: scale(1);
    }

    to {
        box-shadow: 0 0 0 0 transparent;
        transform: scale(.95);
    }
}
