:root>* {
    --md-primary-fg-color: rgba(0, 0, 113, 1); /* dark blue */
    --md-primary-fg-color--light: rgba(70, 90, 255, 1); /* medium blue */
    --md-primary-fg-color--dark: rgba(185, 0, 255, 1); /* purple */
    --gx-turquoise: rgba(70, 218, 255, 1); /* turquoise */
}

/* Tables */
table {
    border-top: 6px solid rgb(185, 0, 255) !important;
    border-bottom: 4px solid rgb(185, 0, 255) !important;
}

tr:nth-child(even) {
    background-color: #efefef;
}

th {
    background-color: #ECECEC;
}

/* Headers */
h1 {
    border-bottom: 2px solid rgba(185, 0, 255, 1.0) !important;
}

h2 {
    border-bottom: 1px solid rgba(185, 0, 255, 0.5) !important;
}

h3 {
    border-bottom: 0.5px solid rgba(185, 0, 255, 0.2) !important;
}

.feedback_context_menu {
    display: none;
    position: absolute;
    border: solid 1px grey;
    padding: 5px;
    border-radius: 5px;
    background: white;
    font-size: .7rem;
    line-height: 1.6;
    box-shadow: 5px 5px 5px lightgray;
    cursor: pointer;

}

/* Print-specific styling */
@media print {
    /*----Fonts----*/
    @font-face {
        font-family: TitiliumRegular;
        font-weight: 400;
        src: url('./fonts/TitilliumWeb-Regular.ttf') format('ttf');
    }

    body {
        font-family: TitiliumRegular;
        color: #6e6e6d;
        width: auto;
    }

    @font-face {
        font-family: TitiliumSemiBold;
        font-weight: 400;
        src: url('./fonts/TitilliumWeb-Bold.ttf') format('ttf');
    }

    @font-face {
        font-family: TitiliumItalic;
        font-weight: 400;
        src: url('./fonts/TitilliumWeb-Italic.ttf') format('ttf');
    }

    /* page options */
    @page {
        size: A4;
        margin: 1.3cm;
        @top-right {
            color: rgb(185, 0, 255);
            font-weight: 900;
            font-size: small;
            content: counter(page);
            height: 0.5cm;
            text-align: center;
            width: 0.5cm;
        }
    }

    @page :blank {
        @top-left {
            background: none;
            content: ''
        }

        @top-center {
            content: none
        }

        @top-right {
            content: none
        }
    }

    @page no-chapter {
        @top-left {
            background: none;
            content: none
        }

        @top-center {
            content: none
        }

        @top-right {
            content: none
        }
    }

    @page first {
        @top-left {
            background: url('./background-title-with-logo.png') no-repeat center;
        }
    }

    @page chapter {
        @top-left {
            background: url('./background-all.png') no-repeat center;
        }

        @top-right {
            content: none
        }
    }

    /*----Cover Page----*/
    #print-site-cover-page {
        break-after: always;
        page: first;
        text-align: left;
        font-family: TitiliumSemiBold;
        color: white;
        font-size: 70px;
    }

    /*----Table of Contents----*/
    .toc+ul,
    .toc+ul li {
        list-style-type: none;
    }

    .toc+ul li a {
        text-decoration: none;
        color: #6e6e6d;
    }

    .toc+ul>li>a {
        font-family: TitiliumSemiBold;
        color: #000094;
    }

    .toc ul {
        margin-bottom: 24px;
    }

    .toc+ul li a::after {
        color: #6e6e6d;
        content: target-counter(attr(href), page);
        float: right;
    }

    /*----Titles----*/
    h1 {
        color: aliceblue;
        padding-top: 35%;
        font-size: 3rem;
        font-weight: 300;
        z-index: 1;
    }

    h1:not(.first-title) {
        page: chapter;
        break-after: always;
    }

    h1 span {
        display: block;
        margin-bottom: 12pt;
        font-size: 8rem;
        color: rgb(185, 0, 255);
    }

    h2 {
        margin-top: 42px;
        border-bottom: 1px solid rgb(185, 0, 255);
        padding-bottom: 12px;
    }

    h2,
    h3,
    h4 {
        color: #000094d8;
    }

    h2,
    h3 {
        font-size: 13pt;
    }


    /*----Content----*/
    img {
        max-width: 100%;
        transform: translate(-50%, 0);
        margin: 2rem 0 2rem 50%;
    }

    p,
    ul,
    li,
    a {
        font-size: 11pt;
    }

    ul {
        list-style-type: circle;
    }

    em {
        font-family: TitiliumItalic;
    }

    strong {
        font-family: TitiliumSemiBold;
    }

    table {
        border-top: 4px solid rgb(185, 0, 255) !important;
        border-bottom: 4px solid rgb(185, 0, 255) !important;
    }

    td,
    th {
        /* border: 5px solid #fff !important; */
        border: 3px solid #fff !important;
        /* font-style:normal; */
        color: #000094;
        padding: 1em;
    }

    tr:nth-child(2n+1) {
        background-color: #f3f6f6;
        border: 1px solid #ffffff;
    }

    thead th {
        font-size: 11pt;
        font-family: TitiliumSemiBold;
        background-color: #ECECEC;
        text-align: center;
    }

    tbody,
    tbody a {
        font-size: 10pt;
        font-family: TitiliumRegular;
    }

    td code {
        color: #E74C3C;
        white-space: pre-wrap;
        word-wrap: break-word;
        background-color: #ffffff;
        padding: 5px 5px;
        border: solid 1px #e1e4e5;
        font-size: 75%;
    }

    pre {
        background-color: rgb(248, 248, 248);
        border-bottom: rgb(225, 228, 229);
        padding: 12px;
    }

    pre code {
        font-family: TitiliumRegular;
        white-space: pre;
        word-wrap: normal;
    }

    p code,
    li code {
        color: #E74C3C;
        white-space: pre-wrap;
        word-wrap: break-word;
        background-color: #ffffff;
        padding: 5px 5px;
        border: solid 1px #e1e4e5;
        font-size: 75%;
    }

    .language-text {
        font-family: TitiliumRegular;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    /* emojis rendering */
    .emojione {
        width: 16px;
    }

    /* Specific handling for !!! example blocks */
    .admonition.example {
        page-break-inside: avoid;
        page-break-before: auto;
    }

    /* Avoid breaking inside tables */
    table, tr, td, th {
        page-break-inside: avoid !important;
    }

    /* Prevent breaks in Plotly charts */
    .js-plotly-plot, .plot-container, .svg-container, svg.main-svg {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        overflow: visible !important;
    }

    /* Hide Plotly toolbar in PDF */
    .plotly .modebar {
        page-break-inside: avoid !important;
        display: none !important;
    }
}
