/***** ATOMS ******************************************************************/

.widget {
    cursor: pointer;
    user-select: none;
}

/***** NOTE CARD **************************************************************/

.card-note {
    padding: 0 .8rem;
    line-height: 1.6;
}

.card-note > :first-child {
    margin-top: .8rem !important;
}

.card-note > :last-child {
    margin-bottom: .8rem !important;
}

.card-note a {
    overflow-wrap: break-word;
}

.card-note ul,
.card-note ol {
    padding-left: 1.6rem;
}

.card-note img,
.card-note video {
    max-width: 100%;
    border-radius: .2rem;
}

.card-note code {
    background: var(--bg-secondary);
    padding: .1rem .4rem;
    border-radius: .2rem;
}

.card-note table code {
    background: none;
    border-radius: 0;
    padding: 0;
}

.card-note pre code {
    display: block;
    padding: .8rem 2rem .8rem .8rem;
    overflow-x: auto;
    border: 1px solid var(--border-secondary);
}

.card-note .table-wrapper {
    overflow-x: auto;
}

.card-note strong {
    text-decoration: underline;
}

.card-note .task-list-item:has(>input:checked) {
    color: var(--text-muted);
    text-decoration: line-through;
}

.card-note mark {
    padding: 0 .1rem;
}

.card-note .sheet {
    height: auto;
}

.card-note hr {
    width: 100%;
    border-top: none;
    border-color: var(--border-secondary);
}

/***** NOTE FORM **************************************************************/

.note-form-content {
    display: block;
    padding: .8rem;
    margin: .8rem 0 0 0;
    resize: none;
    background-color: var(--bg-primary);
    border-color: var(--border-primary);
    line-height: 1.6;
}

/***** CODE MIRROR ************************************************************/

.CodeMirror {
    background-color: var(--bg-primary);
    color: var(--text);
    border: 1px solid var(--border-primary);
    border-radius: .4rem;
    margin: .8rem 0 10rem 0;
    padding: .8rem;
    line-height: 1.6;
}

.CodeMirror-cursor {
    border-color: var(--text);
}

.cm-header-1 {
    font-size: 24px !important;
    line-height: 24px !important;
}

.cm-header-2 {
    font-size: 18.72px !important;
    line-height: 18.72px !important;
}

.cm-header-3 {
    font-size: 16px !important;
    line-height: 16px !important;
}

.cm-header-4 {
    font-size: 13.28px !important;
    line-height: 13.28px !important;
}

.cm-header-5 {
    font-size: 10.72px !important;
    line-height: 10.72px !important;
}

.cm-comment,
.cm-formatting-code,
.cm-formatting-code-block {
    font-family: "Fira Code", monospace;
}

.cm-formatting-link,
.cm-url,
.cm-link {
    color: var(--accent) !important;
}

.CodeMirror-selected {
    background: var(--bg-selection) !important;
}

@media (max-width: 800px) {
    .CodeMirror {
        margin: .8rem 0;
    }
}

/***** SimpleMDE DROPDOWN EXTENSION *******************************************/

.smde-dropdown {
    position: fixed;
    z-index: 1;
    max-width: 200px;
}

.smde-dropdown:has(input:not(:focus)) {
    opacity: .8;
}

.smde-highlight {
    position: fixed;
    background: var(--bg-selection);
    z-index: 1;
}

@media print {

    :root {
        --bg-page: #ffffff;
        --bg-primary: #ffffff;
        --bg-primary-alt: #f0f0f0;
        --bg-secondary: #eeeeee;
        --bg-secondary-alt: #cccccc;
        --text: #000000;
        --text-dim: #222222;
        --text-muted: #444444;
        --accent: #0f9fff;
        --bg-accent: #b8dcf5;
    }

    .navbar,
    .column-side,
    .card-actions,
    pre button {
        display: none;
    }

    .card {
        border: none;
    }

    pre code {
        --bg-secondary: #303030;
        text-wrap: wrap;
    }

}