/*
 * MIT License
 *
 * Copyright (c) 2023-2024 Maciej 'maQ' Kusz <maciej.kusz@gmail.com>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

.vega-embed details {
    display: none;
}

/* Backlinks styles */

.obsidian_backlink a {
    color: var(--md-typeset-a-color);
    background-color: var(--md-default-bg-color);
    padding: 1px 1px 1px 1px;
    border: 1px solid var(--md-typeset-a-color);
}

.obsidian_backlink a:hover {
    color: var(--md-default-bg-color);
    background-color: var(--md-typeset-a-color);
}

.obsidian_backlink i {
    border-bottom: 1px dotted var(--md-typeset-a-color);
}

.obsidian_backlink i {
    border-bottom: 1px dotted var(--md-typeset-a-color);
}

.obsidian_backlink_title, .obsidian_backlink details, .obsidian_backlink hr, .obsidian_backlink p {
    margin-top: 0.375em;
    margin-bottom: 0.375em;
}

.obsidian_backlink_title {
    color: var(--md-default-fg-color--light)
}

.obsidian_backlink svg {
    height: 0.825rem;
}

/* Backlink admonition style */

:root {
    --md-admonition-icon--backlink: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M10.59 13.41c.41.39.41 1.03 0 1.42c-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0a5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24a2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24m2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0a5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24a2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24a.973.973 0 0 1 0-1.42Z"/></svg>');
}

.md-typeset .admonition.backlink,
.md-typeset details.backlink {
    color: var(--md-default-fg-color--light);
    border-color: var(--md-default-fg-color--light);
}

.md-typeset .backlink > .admonition-title,
.md-typeset .backlink > summary {
    background-color: var(--md-default-bg-color);
}

.md-typeset .backlink > .admonition-title::before,
.md-typeset .backlink > summary::before {
    background-color: var(--md-default-fg-color--light);
    -webkit-mask-image: var(--md-admonition-icon--backlink);
            mask-image: var(--md-admonition-icon--backlink);
}
