﻿.md-content h1 {
    font-size: 32px;
    font-weight: 400;
    color: #222;
    text-wrap: balance;
    line-height: 1.3;
    margin: 0 0 .2em;
    letter-spacing: 0;
    margin-bottom: 6.5px;
}

.md-content h1:after {
    content: "";
    background-color: #47d18c;
    display: block;
    width: 100%;
    line-height: 1.3;
    margin: 0 0 .2em;
    letter-spacing: 0;
    word-wrap: break-word;
    margin: 5px auto 20px;
    height: 3px;
}


.md-content h2 {
    font-size: 26px;
    font-weight: 400;
    color: #222;
    clear: both;
    margin-top: 19.5px;
    margin-bottom: 6.5px;
}

.md-content h2:after {
    content: "";
    background-color: #47d18c;
    display: block;
    width: 100%;
    margin: 5px auto 20px;
    height: 2px;
}

.md-content h3 {
    font-size: 22px;
    font-weight: 400;
    color: #222;
    clear: both;
    line-height: 1.3;
    margin: 0 0 .2em;
    letter-spacing: 0;
    word-wrap: break-word;
    margin-bottom: 6.5px;
}

.md-content h3:after {
    content: "";
    background-color: #47d18c;
    display: block;
    width: 100%;
    margin: 5px auto 20px;
    height: 1px;
}

.md-content h4 {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
    margin: 0 0 .2em;
    letter-spacing: 0;
    text-transform: normal;
    word-wrap: break-word;
    margin-top: 19.5px;
    margin-bottom: 6.5px;
}

.md-content h5 {
    display: inline; /* gjør at det ikke bryter linje */
    font-size: inherit; /* bruk samme skriftstørrelse som vanlig tekst */
    font-weight: bold; /* eller custom styling */
    color: #222;
    margin: 0; /* nullstill marginene */
    font-weight: bold;
    font-style: italic; /* kursiv */
}

.md-content h5 + p {
    display: inline; /* første p etter h4 blir inline */
}

.md-content h5 + p::after {
    content: "";
    display: block;
    height: 1rem;
}

.md-content ul {
    list-style: initial;
    padding: 15px;
    margin: 0 0 0 19.5px;
    line-height: 30px;
    padding-top: 4px !important;
}


.read {
    background: white;
    padding: 20px;
    position: relative;
    width: auto;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    border-left: 1px solid #e0dcdc;
    border-right: 1px solid #e0dcdc;
    border-top: 0;
    border-bottom: 0;
    overflow: visible;
    border-radius: 0;
    color: #242527;
    margin: 40px 0;
    line-height: 1.6;
    font-size: 14px;
    background-color: #e6e7ec !important;
    border-color: #979aa4 !important;
}

    .read:before {
        content: "";
        background-image: url(../images/icons/dot.svg), url(../images/icons/dot.svg) !important;
        background-position: left, right;
        background-size: contain !important;
        background-repeat: no-repeat;
        height: 8px !important;
        left: -4px !important;
        right: -4px !important;
        -webkit-transform: rotateY(180deg);
        transform: rotateY(180deg);
        top: -7px;
        display: block;
        position: absolute;
    }

    .read:after {
        content: "";
        background-image: url(../images/icons/dot.svg), url(../images/icons/dot.svg) !important;
        background-position: left, right;
        background-size: contain !important;
        background-repeat: no-repeat;
        height: 8px !important;
        left: -4px !important;
        right: -4px !important;
        -webkit-transform: rotateY(180deg);
        transform: rotateY(180deg);
        bottom: -6px;
        display: block;
        position: absolute;
    }

    .read p:last-of-type {
        margin-bottom: 0;
    }


.note {
    background: white;
    padding: 20px;
    position: relative;
    width: auto;
    border-left: 1px solid #e0dcdc;
    border-right: 1px solid #e0dcdc;
    border-top: 1px solid #e0dcdc;
    border-bottom: 1px solid #e0dcdc;
    overflow: visible;
    overflow: visible;
    border-radius: 0;
    color: #242527;
    margin: 40px 0;
    line-height: 1.6;
    font-size: 14px;
}

    .note::before {
        content: '';
        background-image: url(images/border_texture_wide.png);
        background-size: 100% 100%;
        height: 20px;
        position: absolute;
        left: -1px;
        right: -1px;
        -webkit-transform: rotateY(180deg);
        transform: rotateY(180deg);
        top: -13px;
    }

    .note::after {
        content: '';
        background-image: url(images/border_texture_wide.png);
        background-size: 100% 100%;
        height: 20px;
        position: absolute;
        left: -1px;
        right: -1px;
        -webkit-transform: rotateX(180deg);
        transform: rotateX(180deg);
        bottom: -10px;
    }

    .note p:last-of-type {
        margin-bottom: 0;
    }



.md-content table {
    line-height: 24px;
    background: var(--theme-table-bg, none);
    border: none;
    table-layout: auto;
    width: 100%;
}

    .md-content table thead {
        border-bottom: 3px solid #d0cac5;
    }

        .md-content table thead tr {
            height: 45px;
        }

    .md-content table th {
        font-size: 14px;
        font-weight: bold;
        padding: 10px 20px;
        border: 1px solid #edeae8;
        border-bottom: 2px solid #d0cac5;
        text-align: center;
        background: #fff;
        color: #242527;
        text-align: left;
        padding: 12px 20px;
        line-height: 20px;
        font-weight: bold;
    }

    .md-content table tbody tr {
        background: #fff;
    }

        .md-content table tbody tr:nth-child(odd) {
            background: #faf8f7;
        }

        .md-content table tbody tr td {
            overflow-wrap: break-word;
            border: 1px solid #EDEAE8;
            font-size: 14px;
            padding: 5px 20px !important;
            padding: 20px;
            background: 0;
            max-width: 400px;
        }

.ref-monster, .monster-link {
    color: #bc0f0f;
    cursor: pointer;
    font-weight: bold;
    border-bottom: none
}

.ref-skill {
    color: #11884c;
    cursor: pointer;
    font-weight: bold;
    border-bottom: none
}

.ref-item {
    color: #0f5cbc;
    cursor: pointer;
    font-weight: bold;
    border-bottom: none;
    font-style: italic;
}

.spell-link {
    text-decoration: underline;
    text-decoration-style: dashed;
    cursor: pointer;
    border-bottom: none;
}

.ref-variantrule {
    color: #47D18C !important;
}


body {
    background: url(../images/background_texture.png) #f9f9f9
}

img {
    max-width: 100%;
    height: auto;
}

.drawer {
    /*         position: fixed;
                inset: 0;
                background: rgba(0,0,0,.25);
                opacity: 0;
                pointer-events: none;
                transition: opacity .15s ease; */
}

    .drawer.open {
        opacity: 1;
        pointer-events: auto;
    }

.drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(680px, 90vw);
    background: #fff;
    box-shadow: -8px 0 24px rgba(0,0,0,.2);
    padding: 1rem;
    overflow: auto;
    transform: translateX(100%);
    transition: transform .2s ease;
    z-index: 100;
    position: fixed;
}

.drawer.open .drawer-panel {
    transform: translateX(0);
}

.drawer-left .drawer-panel {
    left: 0;
    right: auto; /* ankres venstre */
    box-shadow: 8px 0 24px rgba(0,0,0,.2); /* skygge på høyresiden */
    transform: translateX(-100%); /* skjult til venstre */
}

.drawer .close {
    position: sticky;
    top: .5rem;
    float: right;
    font-size: 1.2rem;
}
