/*
 * Styling for the read-only Obsidian vault under /wissen.
 *
 * Everything is scoped to `vault-` classes so it can sit next to Bulma without
 * touching the rest of the site.
 */

.vault-note-list {
    list-style: none;
    margin-left: 0;
}

.vault-note-list li {
    border-bottom: 1px solid #ededed;
    padding: 0.5rem 0;
}

.vault-note-list li:last-child {
    border-bottom: none;
}

.vault-note-list p {
    margin-top: 0.15rem;
    margin-bottom: 0;
}

.vault-card {
    display: block;
    height: 100%;
    color: inherit;
}

.vault-card:hover {
    background-color: #fafafa;
}

/* Rendered note --------------------------------------------------------- */

.vault-note {
    overflow-wrap: anywhere;
}

.vault-note .vault-heading {
    scroll-margin-top: 1rem;
}

.vault-note .vault-rule {
    margin: 1.5rem 0;
}

.vault-note .vault-link.is-missing {
    color: #b5b5b5;
    border-bottom: 1px dotted #b5b5b5;
    cursor: help;
}

.vault-note .vault-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.vault-note .vault-task input {
    margin-right: 0.35rem;
}

.vault-note .vault-code {
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow-x: auto;
    padding: 0.75rem 1rem;
}

.vault-note .vault-code-inline {
    background-color: #f5f5f5;
    border-radius: 3px;
    padding: 0.1em 0.35em;
}

.vault-note .vault-quote {
    border-left: 4px solid #dbdbdb;
    background-color: #fafafa;
    padding: 0.6rem 1rem;
}

.vault-note mark {
    background-color: #fff3a3;
    padding: 0 0.15em;
}

.vault-note .vault-embed {
    display: inline-block;
}

/* Callouts -------------------------------------------------------------- */

.vault-callout {
    border-left: 4px solid #3e8ed0;
    background-color: #f3f8fd;
    border-radius: 0 4px 4px 0;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
}

.vault-callout-title {
    font-weight: 600;
    margin-bottom: 0.35rem !important;
}

.vault-callout-body > *:last-child {
    margin-bottom: 0;
}

.vault-callout-warning,
.vault-callout-caution,
.vault-callout-attention {
    border-left-color: #ffe08a;
    background-color: #fffaeb;
}

.vault-callout-danger,
.vault-callout-error,
.vault-callout-bug,
.vault-callout-failure,
.vault-callout-missing {
    border-left-color: #f14668;
    background-color: #feecf0;
}

.vault-callout-tip,
.vault-callout-hint,
.vault-callout-important,
.vault-callout-success,
.vault-callout-check,
.vault-callout-done {
    border-left-color: #48c78e;
    background-color: #effaf5;
}

.vault-callout-quote,
.vault-callout-cite,
.vault-callout-example,
.vault-callout-abstract,
.vault-callout-summary,
.vault-callout-tldr {
    border-left-color: #b5b5b5;
    background-color: #fafafa;
}

/* Table of contents ------------------------------------------------------ */

.vault-toc {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.vault-toc ul {
    list-style: none;
    margin-left: 0;
    font-size: 0.85rem;
}

.vault-toc li {
    padding: 0.1rem 0;
}

.vault-toc-level-2 {
    padding-left: 0.75rem;
}

.vault-toc-level-3 {
    padding-left: 1.5rem;
}

/* Markdown source -------------------------------------------------------- */

.vault-source {
    background-color: #f5f5f5;
    border-radius: 4px;
    font-size: 0.75rem;
    max-height: 30rem;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Arztbrief: the block library on the right ------------------------------ */

/*
 * The library sticks to the top of the viewport on wide screens so the search
 * stays reachable while the letter on the left grows. Below Bulma's tablet
 * breakpoint the columns stack and sticky would only get in the way.
 */
@media screen and (min-width: 1024px) {
    .letter-library {
        position: sticky;
        top: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

.letter-block-list {
    list-style: none;
    margin-left: 0;
}

.letter-block-list li {
    border-bottom: 1px solid #ededed;
    padding: 0.4rem 0;
}

.letter-block-list li:last-child {
    border-bottom: none;
}

/* The expanded preview of a block keeps its own line breaks. */
.letter-block-preview {
    white-space: pre-wrap;
    margin-top: 0.25rem;
}

/*
 * One block in the result editor (/textbausteine), nested inside the
 * "Ergebnis" box. Uses Bulma's own scheme-aware background/border variables
 * instead of a fixed utility class like has-background-white-bis, which is
 * hard-coded to a light color and glares in dark mode.
 */
.letter-result-entry {
    background-color: var(--bulma-scheme-main-ter);
    border: 1px solid var(--bulma-border-weak);
}
