/**
=====================================================================================
 C O P Y R I G H T
-------------------------------------------------------------------------------------
 Copyright (c) 2022 by Robert Bosch GmbH. All rights reserved.

 Author(s):
 - Markus Braun, :em engineering methods AG (contracted by Robert Bosch GmbH)
=====================================================================================
*/

/**
    Doxygen + Doxygen Awesome customizations by doxysphinx
*/

html {
    --content-maxwidth: auto !important;
    --header-background: transparent !important;
    --page-background-color: transparent !important;
    --spacing-large: 0px;
    --separator-color: #dedede;
}

/**
    Doxygen area related css fixes
*/

.doxygen-content {

    /* Header related stuff */
    #top {

        /* hide search-box */
        #MSearchBox {
            visibility: collapse;
        }

        /* hide menu */
        #main-nav {
            display: none;
        }

        /* left align header area + headings */
        #titlearea {
            padding-left: 0;

            #projectalign {
                padding-left: 0 !important;
            }

            table {
                display: table
            }
        }

        /* fix breadcrumb separator icon scaling */
        #nav-path li.navelem:before {
            transform: translateY(-1px);
        }

    }

    .header {
        .headertitle {
            .title {
                padding-left: 0 !important;
            }
        }
    }

    /* content fix */
    .contents {
        padding-left: 0 !important;

        .memitem {
            dl {
                margin: 0 !important;
            }

            .memdoc {
                margin-top: 10px;
            }
        }

        table.need {
            display: table !important;
        }

        table.memberdecls {
            overflow: unset;
            border-collapse: unset;
        }


        /* hide strange new doxygen awesome box-border shadow styles (because they look really ugly in sphinx) */
        h2.groupheader {
            box-shadow: none;
            border-bottom: 1px solid var(--separator-color);
        }

        /* css hack for inline rst content.
           as sphinx will automatically create paragraphs (<p>) around all blocks, we'll always get new paragraphs
           for our inline content in doxygen html. So we add a "marker span block" right before the inline content
           block and then style the "paragraphiness (/blockrendering)" away here with the next sibling selector (+).
        */
        //        .doxysphinx-p {
        //            display: block;
        //        }

        .doxysphinx-inline-parent p {
            display: inline;
        }
    }

    /** content fixes - members (e.g. in class view) */
    h2.memtitle {
        margin-bottom: 0;
        font-size: 100% !important;
    }

    div.memitem div.memdoc dl dt {
        display: block !important;
        margin: 0 !important;
        font-size: 100% !important;
        background: none !important;
        color: black !important;
        border: none !important;
        padding: 0 !important;
        position: initial !important;
    }

    div.memproto {
        margin-bottom: 0;
    }

    /** table fixes - e.g. directory tables */
    #main-content .section .directory td.entry {
        display: table-cell !important;
        white-space: pre-wrap !important;
    }

    .need {
        .line {
            all: revert;
        }
    }
}

/**
    General Sphinx fixes
*/

/* hide sphinx heading - because doxygen pages already have a heading */
.section>h1:first-of-type,
section>h1:first-of-type {
    display: none;
}




/**
Patches for integrating doxygen awesome with sphinx rtd theme
*/

#doc-content {
    margin-left: 0 !important;
    /* fix for menu space (which isn't visible anyways...) */
}

/**************************************************
THEME SPECIFIC FIXES
***************************************************/

/**
SPHINX RTD THEME

as all content in RTD Theme is stored under a section with class "wy-nav-content-wrap"
we store our fixes below that.
*/

section.wy-nav-content-wrap {

    /* Global general settings */

    /*Adjust the visible text area of RTD theme to be 80%*/
    .wy-nav-content {
        max-width: 80% !important;
    }

    /*Global table settings*/

    /*Forces the table content (td) and headers (th) to warp*/
    .wy-table-responsive table td,
    .wy-table-responsive table th {
        white-space: normal !important;
    }

    /* Custom general settings*/

    /*Forces need-tables and need-tables to be top-left aligned*/
    table.NEEDS_TABLE,
    table.NEEDS_DATATABLES {
        margin: 0;
    }

    /* Disables set class for next paragraph - eg. floating of images*/
    .clear-both {
        clear: both
    }

    /*Custom tables settings*/

    /* Class which can be applied to tables. Text is aligned within the cells to the top and left (for table header and cells)*/
    .table-top-left td,
    .table-top-left th {
        vertical-align: top !important;
        text-align: left;
    }

    /* Class to apply stub-collumns also to simple or grid tables */
    /* Class to apply stub-collumns also to simple or grid tables */
    .table-stub th:first-child,
    .table-stub td:first-child {
        font-weight: 700 !important;
    }


    /*Classic info table*/
    .table-info td:not(:first-child) {
        background-color: #fcfcfc !important;
    }

    .table-info th:first-child,
    .table-info td:first-child {
        background-color: #f3f6f6 !important;
        font-weight: 700 !important;
    }

    /* fix breadcrumb separator icon scaling */
    .doxygen-content {
        #top {
            #nav-path li.navelem:before {
                transform: translateY(-7px);
            }
        }
    }
}

/**
SPHINX BOOK THEME

*/
