/* fix logo size, align Trivadis with PL/SQL Guidelines */
.md-header__button.md-logo :-webkit-any(img,svg) {
    width: auto;
    height: 46px;
    padding-top: 10px;
}

/* fix image border */
.md-typeset img[align=left], .md-typeset svg[align=left] {
    margin: auto;
}

.md-typeset a {
    color: #ff1744;
    word-break: break-word;
    text-decoration: none;
}

[data-md-color-accent=red] .md-typeset a:hover {
    color: #ff1744;
    word-break: break-word;
    text-decoration: underline;
}

.md-nav__item
.md-nav__link--active, 
.md-nav__link:active {
    color: #ff1744;
    text-decoration: none;
}

[data-md-color-accent=red] .md-nav__link:hover {
    color: #ff1744;
    text-decoration: underline;
}

.md-typeset code {
    word-break: keep-all;
}

.md-typeset pre {
    word-break: keep-all;
}

.md-nav--primary .md-nav__item--active>.md-nav__link {
    color: #ff1744;
}

/* fixing colors because wkhtmltopdf does not understand colors such as "var(--md-typeset-a-color);" */
@media print {

    /* fix image size */
    .md-typeset img, .md-typeset svg {
        zoom: 80%;
    }

    /* fix image opacity for pictures in about page, where the default 1.0 results in a much lower opacity */
    .md-typeset img[align=left] {
        opacity: 0.99609375; /* 1 - 1/256 */
    }

    /* disable menu */
    .md-md-header {
        display: none;
    }

    /* disable header of footnotes */
    .footnote h1 {
        display: none;
    }

    /* fix font size of normal text */
    .md-typeset {
        font-size: 10pt;
    }

    /* fix font size of text in tables */
    .md-typeset table:not([class]) {
        font-size: 8pt;
    }

    /* fix colors of table headers */
    .md-typeset table:not([class]) th {
        color: white;
        background-color: rgba(0, 0, 0, 0.54);
        min-width: 60pt;
    }

    /* fix color of footnote and font */
    .md-typeset .footnote {
        color: black;
        font-size: 8pt;
    }

    /* fix font of code in footnote */
    .md-typeset .footnote code {
        font-size: 8pt;
    }

    /* hide footnode link */
    .md-typeset .footnote-backref::before {
        display: none;
    }

    /* fix code background color */
    .md-typeset code {
        font-size: 8pt;
        background-color: whitesmoke;
    }

    /* fix code foreground color */
    .md-typeset code, .md-typeset pre, .md-typeset kbd {
        color: #36464e;
    }

    /* fix code color for line numbers */
    .highlighttable .linenodiv pre {
        color: rgba(0, 0, 0, 0.54);
        text-align: right;
    }

    /* fix settings for line numbers */
    .highlighttable .linenos {
        padding: 6pt 6pt;
        font-size: 8pt;
        background-color: rgba(0,0,0,.07);
    }

    /* fix code highlighting colors */
    .codehilite .k, .highlight .k, .codehilite .kd, .highlight .kd, .codehilite .kn, .highlight .kn, .codehilite .kp, .highlight .kp, .codehilite .kr, .highlight .kr, .codehilite .kt, .highlight .kt {
        color: #3f6ec6;
    }
    .codehilite .kc, .highlight .kc, .codehilite .n, .highlight .n {
        color: #36464e;
    }
    .codehilite .p, .highlight .p {
        color: rgba(0, 0, 0, 0.54);
    }
    .codehilite .o, .highlight .o, .codehilite .ow, .highlight .ow {
        color: rgba(0, 0, 0, 0.54);
    }
    .codehilite .c, .highlight .c, .codehilite .cm, .highlight .cm, .codehilite .c1, .highlight .c1, .codehilite .ch, .highlight .ch, .codehilite .cs, .highlight .cs, .codehilite .sd, .highlight .sd {
        color: rgba(0, 0, 0, 0.54)
    }
    .codehilite .m, .highlight .m, .codehilite .mf, .highlight .mf, .codehilite .mh, .highlight .mh, .codehilite .mi, .highlight .mi, .codehilite .il, .highlight .il, .codehilite .mo, .highlight .mo {
        color: #d52a2a;
    }
    .codehilite .cpf, .highlight .cpf, .codehilite .l, .highlight .l, .codehilite .s, .highlight .s, .codehilite .sb, .highlight .sb, .codehilite .sc, .highlight .sc, .codehilite .s2, .highlight .s2, .codehilite .si, .highlight .si, .codehilite .s1, .highlight .s1, .codehilite .ss, .highlight .ss {
        color: #1c7d4d;
    }
    .codehilite .no, .highlight .no, .codehilite .nb, .highlight .nb, .codehilite .bp, .highlight .bp {
        color: #6e59d9;
    }

    /* add space between line numbers and code */
    span.linenos {
        padding-right: 12pt;
    }

    /* fix background color in body */
    body {
        background-color: white;
    }

    /* fix row seperators */
    .md-typeset table:not([class]) td {
        padding: .6rem .8rem;
        border-top: .05rem solid rgba(0,0,0,.07);
        vertical-align: top;
    }

    /* do not show link details in brackets content: " [" attr(href) "]" */
    .md-typeset a:after {
        display: none;
    }

    /* table-header-group leads to overlap with content */
    thead {
        display: table-row-group;
    }

    tr {
        page-break-inside: avoid;
    }

    h1 {
        page-break-before: always;
    }

    #about { 
        page-break-before: avoid;
    }

    [id="severity-of-the-rule"],
    [id="keywords-used"],
    [id="we-do-not-agree-with-all-your-standards"],
    [id="column"],
    [id="function"],
    [id="procedure"],
    [id="table"],
    [id="view"],
    [id="code-commenting"],
    [id="variables-types"], 
    [id="numeric-data-types"], 
    [id="character-data-types"], 
    [id="boolean-data-types"], 
    [id="large-objects"],
    [id="cursor-variables"],
    [id="dml-sql"], 
    [id="bulk-operations"], 
    [id="transaction-control"], 
    [id="control-structures"], 
    [id="case-if-decode-nvl-nvl2-coalesce"], 
    [id="flow-control"], 
    [id="exception-handling"], 
    [id="dynamic-sql"], 
    [id="stored-objects"], 
    [id="packages"],
    [id="procedures"], 
    [id="functions"], 
    [id="oracle-supplied-packages"],
    [id="object-types"],
    [id="triggers"],
    [id="sequences"],
    [id="sql-macros"],
    [id="patterns"],
    [id="access-objects-of-foreign-application-schemas"], 
    [id="validating-input-parameter-size"],
    [id="ensure-single-execution-at-a-time-of-a-program-unit"], 
    [id="use-dbms_application_info-package-to-follow-progress-of-a-process"], 
    [id="function-usage"],
    [id="db-codecop-for-sonarqube"],
    [id="db-codecop-command-line"],
    [id="db-codecop-validators"],
    [id="plscope-utils"] {
        page-break-before: always;
    }

    [id^="g-"] {
        page-break-before: always;
    }

    [id*="10-"] {
        page-break-before: avoid;
    }
}
